Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading network card 1

Status
Not open for further replies.

nzoli

Programmer
Feb 17, 2011
22
0
0
HU
Hi All!

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
Zoltan Nagy
 
Zoltan,

I'm sorry but I think we're going to need a bit more information before anyone can help you very much.

Are you asking how to get data from the internet via VFP?

If so, I would look at WestWind's WW packages and see if they can help.



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
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.

sorry for my english :)
 
In that case you are going to have a bit of work to do.

I would recommend that you look at the documentation on Rick's WestWind site regarding the communication tools he has there.

You are going to need a public IP to do this.


Good luck

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
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?

Regards

GenDev
 
Thanks for these answers!

I will check out all of them :)
 
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.

Bye, Olaf.
 
Dear OlafDoschke!

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.

This is the task which we would like a help :)

Thanks for your answer!
Best Regards!
 
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.

Take a look here
The first part, the first code box must be copied into an empty prg and then be run with the port number as parameter.

It runs a form showing each incoming data in an autoscrolling editbox. That's it.

Bye, Olaf.
 
Dear Olaf!
Thanks for your answer!

First of all I will try your link!

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.

best regards
 
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.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top