cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet to serial.

hello
Associate II
Posted on July 04, 2012 at 10:38

Hi,

i have 

IAR KickStart Kit for STM32F107VC and i use some code for Ethernet and its running well, it can send the UDP packet and receive it, now i want to see the recived packet so i am trying to send all the incoming packet through the USART and in hyperterminal i want to see the recived packet.

how it can be done.

the recived UDP packet (Frame)should look like what we see in Wireshark (network protocol analyzer)... full frame with all details. 

any suggestion please?

7 REPLIES 7
Posted on July 04, 2012 at 12:54

I'm sure the WireShark guys spent a lot of time on that.

Suggest you start by doing a hex dump of the headers and data.

Start by decomposing the 802.3 headers in the Ethernet frame, then decompose the UDP and TCP/IP frame. Need some information, Google around a bit, look at the specifications and RFC documents. Unpack the headers, output the IP address, port, and packet type fields, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hello
Associate II
Posted on July 04, 2012 at 13:08

Hi,

thanks.

reading the received buffer will work out?

if i have all raw data i can create small GUI and display it on computer about the content of UDP packet..
hello
Associate II
Posted on July 04, 2012 at 13:08

just i need all the received Ethernet frames what i received on Ethernet port and it should be sent to Computer through USART and i can investigate the content and then i can create GUI for it.

Posted on July 04, 2012 at 13:27

Back when I when I was tunneling Ethernet over serial I used the SLIP protocol.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hello
Associate II
Posted on July 04, 2012 at 13:43

@ clive1 thanks for your reply.

i am beginner for this so can you expline how it can be done with my board?

Posted on July 04, 2012 at 16:15

This really isn't my battle, I'm not going to implement this. You have a massive amount of resources at your disposal, and employers generally expect you to figure things out. Start by solving the simple problems, and work your way to the complex ones.

Read the packets directly from the Ethernet buffer, and copy the bytes over the serial using the escape characters as required.

http://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol

SLIP is very effective because it packetizes, resynchronizes, and is simple.

There is also PPP, but that is far more complicated.

If you own both ends of the serial connection you can create your own protocols/transports, but this requires a through understanding of the problem.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hello
Associate II
Posted on July 04, 2012 at 18:31

@ clive1 thank you for your suggestion.

i am doing this for my education and my own interest, so only i have less help to start with...

atlest now i have idea from you people what are all the problem in this case and have some idea to start my work now....

Thank you...