I searched the forum for my question, but didn't find any answer. I have a GPS Tracker. It send datas to my computer over internet. How can I read the network card with vfp for this data. (the package is start with "$" and end with "!")
Thanks for your answer!
Yes I would like to read directly the newtwork card for this datas.
For example: The tracker send it's datas to x.x.x.x ip and xxxx port between the $ and ! sign.
I need to filter the network datas for this packages. And than I would like to display the position, draw a route etc. on the google maps.
A piece of software known as Wiretap - previously known as Ethereal- will read all incoming bytes of data through a network card and produce a log file. Maybe this is a start point for your VFP application?
It's very unusual to sniff data packages. Can't you configure where your GPS Tracker sends his data? Is it using a software coming with the GPS Tracker that receives data. You may have aso called proprietary protocol between such software and the tracker.
No matter what protocol, if it's based on TCP/IP you can use a winsock control in VFP and let it act as a server waiting for requests. As you say the tracker sends it's data, it sounds as if the software receiving the data acts as a server, the tracker as a client sending something similar to a http POST request.
Or do you really mean the tracker acts as a server listening to requests on ip xxx.xxx.xxx.xxx on port xxxx?
Anyway, the answer is using winsock in VFP to either listen to requests or send requests and listen to the answers coming back.
You should first find out, what's really true here, is the tracker acting as a server or client in regard to sending it's data? Typically devices act as a server, eg routers typically have a configuration you can open in a browser. So it would be quite unusual if the tracker would act as a http client.
This is a tracker produced by us, sending pure NMEA183 data packages over GPRS Internet, to a FIXED IP address and a FIXED port number. Now we are using a TCP/IP to RS232 converter to capture the IP data. Our present software is using these data from the RS232 input. This converter have to be replaced by direct capturing TCP/IP flow. According to your proposal we should like to realize in VFP the winsock control by using it as a server listening the requests from the tracker acting as a client.
Makes me think that you seem unfamiliar with your own product. Why the overhead of TCP/IP to rs232? If you manufacture both the hard and software, why not either create the software to process TCP/IP or the hardware to rs232?
Even being a newbie in VFP using Winsock would be the usual solution to process TCP/IP in any programming language.
So our GPS tracker sending it's data through the GPRS/3G internet. It can't send the datas to rs232 because the tracker isn't in my town.
I need to use that converter because I can read only the serial port with vfp. This converter is not our own product, It's a little webserver with an Eternenet input, and an RS232 output. I would like to run my software without this converter!
That's why I would like to know how can I read that network card.
OK, understood. Nevertheless any software language is capable to listen to TCP/IP pakets on a given Port coming in to the computers IP adress via Winsock.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.