NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Niels Larsen on July 01, 2008, 12:47:17 PM

Title: NetSimple Server
Post by: Niels Larsen on July 01, 2008, 12:47:17 PM
Hi

I have build a small app contaning a netsimpel server, listning to a port. In the other end I have af GPS tracker, sending position every 10 sekund, using GPRS.
In my app i get som incoming data every 10 sekunds - that's fine. BUT I only get to $ signs - very wierd?!?!
When I stops my tracker my app stops reciving the $ signs, so I have some kind of connection.
Any idea of what's going wrong??

Very best regards
Niels Larsen, Denmark
Title: Re: NetSimple Server
Post by: Mike Grigsby on July 01, 2008, 05:00:25 PM
Hi Niels, I'm having trouble understanding exactly what you're doing, but sounds like a mismatched data type or something.  If you're using string, consider revising to cstring maybe? What kind of data type(s) are you using?
Title: Re: NetSimple Server
Post by: seancameron on July 01, 2008, 11:16:11 PM
It sounds like you are receiving binary data and trying to display it in a text control (or something similar). What data are you expecting to get from the GPS tracker? You will need to handle processing and parsing the data yourself (for example if could be binary data, it could be Unicode text and so on).
Title: Re: NetSimple Server
Post by: pcrafton on July 03, 2008, 12:29:16 PM
What I have done is configure a COM port using WinEvent to capture my GPS data. You will have to write a configuration routine, store the COM port Baud rates, etc, and read that data in to init the COM port. Then I listen in my timer.  I look for the $GPRMS in my incoming stream (This has the Lat, Long, Speed, Direction) and then wait for the ending <10> char, at which point I pass the string to a routine to parse the $GPRMS NEMA sentence, and do what ever, display, transmit (via Nettalk) the data.

I hope that helps some.

Paul Crafton
Title: Re: NetSimple Server
Post by: Niels Larsen on July 08, 2008, 10:06:34 AM
Thanks everyone for your response.
I'll let you know if I find a solution.

Cheers
Niels