08-12-2009 09:56 AM
Hi!
I'm trying to make a program thet reads data thet a GPS is writing to a serial port, and then store this in a file. As a extra thing I'm trying to add a part thet finds the correct serial port that the GPS is connected to and then automaticly uses this port to start a visa sesion. I trye to do this by first finding all connected ports, and then try to read the buffer out of them. in the buffer that has been read I then serch for a patern that starts every string sent by the GPS. But sometimes my read starts in the midle of a string, and hence the patern I'm looking for is not there, and no port is set to be the right one.. so is there a way to wait with the read untill some thing is sent by the GPS..
Every string the GPS sends is started by $ and ended bu \r\n
Solved! Go to Solution.
08-12-2009 12:31 PM