![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I had a similar problem, as mentioned in your first post,that the string does not always start with "$GP..." so I am checking it using strindexof():
instring = Serial.InputString ... sats() = StrSplit(instring,",") .. If StrIndexOf (sats(0) , "SA",0) > -1 Then gsa 'for string $GPGSA the complete application code is here http://www.basic4ppc.com/forum/showt...=9108#post9108
__________________
David Erez Ramat Hasharon, Israel |
|
||||
|
Hello Erel, hello Derez!
I can't say, in which line the application locks up. The only thing is to end the app with the task-manager. I think, that the problem is in the sub timer2_tick, because the image4 (it's a little icon 15x15) doesn't change after breaking the server connection. My english is not so good, so I don't know the function of client.value=server.accept. Is it nessesary to use this line? ![]() |
|
||||
|
Hello!
I have written a smal testapp to see, where the problem is. When the server sends no data, the application will stop as long, as the server sends data again. When there is data again, the Application runs without any problems. Is there no data, i only can stop the app with the task-manager. Here the code: Sub App_Start Form1.Show timer3.Enabled=true 'timer3=1000 ms' client.New1 Client.Connect ("87.139.??.???",11112) filestream.New1(client.GetStream,false) End Sub Sub Timer3_Tick If client.DataAvailable=true Then filestream.ReadString label5.Text="data!" Else label5.Text="no data!" End If End Sub The server-connection is always available! ![]() Now i have tested more: The server sends every two seconds a NMEA-protocol. When the timer3 is 2000, the app will run without problems. Is the timer3 500ms, the app will stop, when there is no data. Is the timer3 1000ms, sometimes the app will lockup and another time, the app run without problems, when there is no data. But I need a timerintervall from 500, because when the timer is bigger than 500, i only get old data, not the actually. Last edited by schimanski : 02-08-2008 at 03:59 PM. Reason: More tests... |
|
||||
|
Hello Erel!
I can't post the server code, because it's not my application. It is a police-server with an GPS-application, that only provides GPS-data for every officer, who is in duty. Today we have only Notebooks with the same software to get this data. Now, i want' to write a client-application for PDA. I only can say, that the server provides every two seconds a NMEA-String (RMC & GGA) on one port and when there is no data, the server stops providing, but the connection is always available. I don't know the developer of this application, so I can't ask him. I can' t understand the effects of the different timerintervalls. ![]() |
|
||||
|
This is is a wild guess but is it anything to do with the fact that if you wait two seconds then a full message is probably available but polling more often than that it is likely that only part of a message is available. Does your app make the assumption that a full message always arrives as a single read? My experience of the network library is that even small messages can arrive as separate packets so you have to be prepared to reassemble multiple reads into a single message - which is what I believe the GPS library GPSStream method does.
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| One server adn more clients | Byak@ | Questions & Help Needed | 2 | 08-12-2008 11:59 AM |
| Comunicating with a Telnet Server | lu_ozzie | Questions & Help Needed | 16 | 05-05-2008 06:25 PM |
| Simple NMEA logger | Bruno | Share Your Creations | 0 | 05-02-2008 08:43 PM |
| Checksum in nmea | wolfgang | Code Samples & Tips | 0 | 02-15-2008 02:42 PM |
| New server | Erel | Forum Discussion | 12 | 11-06-2007 05:21 PM |