PDA

View Full Version : ethernet packet recording?


ironzombie99
11-08-2007, 10:37 PM
This post maybe a little out of the "league" for some of you but it is network related.

Supposedly there is a microcontroller with an embedded Ethernet daughter board. I am going to send data from the microcontroller through the embedded Ethernet board (that part is simple at least for me) and the line is running to a pc.

For starters the packet that the embedded Ethernet board sends out is an normal Ethernet packet....with that settled the actual question to you networking guys is that I would like the packet to be saved as a text file on the pc possibly as it is received for right now, how can i go about doing that?

I know there is ethereal to view packets and you can save them from there but i need something to do it automatically. Will some kind of simple program have to be written in order to parse the packet for the information?


*By the way the reason i am using wired Ethernet right now in this example is that it will be part of a larger network, not just one controller to pc connection, by end of the project there maybe 4 or so controllers going through a switch or hub to a pc. The PC as of now is not planned to be connected to internet, just dedicated to this project.

mbossman2
11-09-2007, 08:13 AM
the best way to do this is with a switch probe or packet sniffer.

these can be highly effective but do have limitations: on a decent sized network you can run into bandwidth issues and other performance issues as the network may be able to generate more information than the device can receive (the connected switch port is slower than the total amount of traffic).

the better ones, of course, are expensive but a pretty good one you can get is from Ethereal (www.ethereal.com)

I am curious, what kind of data are you trying to capture from this controller?

ironzombie99
11-09-2007, 12:35 PM
basically its like this in that i will be taking analog data from the sensor and converting it to digital and then sending it out to the pc and i want to retrieve the digital data from the payload portion of the packet and possibly the source ip address. How the data is going to be used on the pc is undetermined yet, not quite there yet.

sensor --> a/d converter --> microcontroller --> embedded Ethernet board --> pc

mbossman2
11-09-2007, 01:22 PM
the source IP address is no big issue, you don't need to scoop packets for that.

Is this controller "mated" to the PC by a specific manufacturer application running on the PC or is this a home grown solution?

if it is the former, be careful that you don't spend a ton of time and effort to find out that the packets are encrypted and require the application to unlock them to display the data.

ironzombie99
11-09-2007, 02:13 PM
it will be a homebrew solution on the pc

mbossman2
11-09-2007, 03:52 PM
then you should be able to capture and decode the packet without an issue. use ethereal it's a good package...and if at all possible, hardcode the IP address for the microcontroller, it'll make locating and isolating the packets much easier.

ironzombie99
11-09-2007, 04:18 PM
it would be running static ip address.

Thanks for the help.