User`s guide
www.uTasker.com
µ
Tasker – AT91SAM7X Tutorial
V1.4
uTaskerV1.4_SAM7X.doc/0.03 32/36 31.07.2009
Now it is not exactly easy to understand the data but you should just be able to make out the
MAC address at the beginning and the content of the ping test usually consists of
abcdefghijk… which is easily recognised. (Warning: it is possible that the frame which you
actually captured is not the ping test but some other network activity, or even an ARP frame
if the PC sending the ping had to re-resolve its MAC address. If this happens to be the case,
set a break point at the location which the program is at and let it run again and hopefully it
will come to this location the next time with the correct contents…).
Go back to the watch windows where the structure of rx_frame is being displayed and
expand the sub-structure ptEth. This will start making life rather easier since it is showing
us that the Ethernet frame is made up of a destination MAC address, a source MAC address,
an Ethernet frame type and some data. Expand each sub-structure to see their exact
contents, although it is not yet worth expanding the data field since we don’t know what
protocol its contents represent so it will not be displayed better at the moment.
D. Frame protocol
Step slowly using F10 and you will see that the frame is check for the ARP protocol, which it
won’t be if it is the ping request which we are analysing. It then calls fnHandleIP(), which
we will enter using F11 since all such TCP/IP frames are built on the IP protocol.
After a couple of basic checks of IP frame validity, the pointer received_ip_packet is
assigned to the data part of the received frame. Again this structure is very valuable to us
since it can be dragged into the watch windows and now we suddenly understand how the IP
fields are constructed. We can expand any field we want to see, such as the IP address of
the source sending the IP frame. Note that when looking at IP frames is may be worth
requesting the debugger to display the contents in decimal rather than in hexadecimal by
using right click and then selecting the display mode. The IP addresses are then better
understandably and afterwards you can set the mode back to hexadecimal display since it is
better for most other data fields.