How does the Raw Ethernet frame looks like w.r.t xpc target example "Real Time Transmit and Receive over Ethernet"?

10 views (last 30 days)
I am testing the "Real Time Transmit and Receive over Ethernet" Example with its dedicated demo files 'xpcEnetDemo1Tx.mdl' and 'xpcEnetDemo1Rx.mdl'.
Host PC1: notebook installed with Matlab 2012b, xPC Target 5.3 version(supported by R2012b)
Target PC1: Industrial PC --> Boot Disk was performed successfully.
At first, i performed the Host to Target Communication and Model based Ethernet Communication successfully with respect to Host PC1 and Target PC1.
The demo file 'xpcEnetDemo1Tx.mdl' was executed on the Target PC1 to transmit the signals as Ethernet Packets.
Then, i looked into the block "Create Ethernet Packet" and try to understand the representation of the Raw Ethernet frame?
From the implementation of "Create Ethernet Packet" block, the Raw Ethernet frame representation is in the following way:
(6 octets) (6 octets) (2 octets) (16 octets)
| Destination MAC | Source MAC | EtherType | Packet Payload |
Address Address
Is the above an accurate representation of the Raw Ethernet frame with respect to the demo file 'xpcEnetDemo1Tx.mdl'?
Does the packet payload in turn contain headers for other protocols(for e.g., addressing protocol, internet protocol, TCP protocol, etc.) carried in the Raw Ethernet frame?
If anyone of you had investigated this particular detail, please give me your feedback!

Accepted Answer

Suneesh
Suneesh on 19 Feb 2014
Edited: Suneesh on 19 Feb 2014
Your understanding is accurate. The Ethertype in the example is the length of the data packet. this is because the parameter 'EtherType' in block 'Create Ethernet packet' is set to '0' which is used to indicate that the EtherType field should be set to the length of data. This is as per IEEE 802.3. The Raw Ethernet example does not contain ARP, IP etc.
The best way to analyze this is by sniffing the packets using Wireshark.
  2 Comments
Sriniwas@AT
Sriniwas@AT on 20 Feb 2014
Edited: Sriniwas@AT on 21 Feb 2014
Thanks Suneesh for your immediate response! I have indeed used Wireshark software tool to capture the raw ethernet frames transmitted from Target PC1 using the demo file "xpcEnetDemo1Tx.mdl". It was much more clear.
Suneesh, i have one more doubt. This time on the receiving end of raw ethernet frames using Host PC2 and Target PC2 with its dedicated demo file "xpcEnetDemo1Rx.mdl".
The raw ethernet frames coming out from Target PC1 are captured for 5 sec using "Wireshark".
If i happen to run the demo file "xpcEnetDemo1Rx.mdl" and wanted to have a look at the received complete raw ethernet frame by measuring the signal coming out from the 'Ethernet Rx' supported by the xpc target simulink library, i can compare the frames captured by the Wireshark and frames received by 'Ethernet Rx' block just before 'Extract Ethernet Packet' block in the simulink model "xpcEnetDemo1Rx.mdl" .
I placed an output port block to measure the output signal of 'Ethernet Rx' block.
I finished measuring the output signal of 'Ethernet Rx' block for 5sec. But the output signal of 'Ethernet Rx' block only consisted of zeros, which doesn't really make any sense.
Is there a specific procedure to measure the output signal of 'Ethernet Rx' block?
If you came across this situation, please give me your suggestions.
Suneesh
Suneesh on 20 Feb 2014
Edited: Suneesh on 20 Feb 2014
It is not fruitful to view the signals at the output port of 'EthernetRx'. The output of this block is of type UINT32. These are just pointers to the ethernet packets captured by the hardware and needs to be passed only to the 'Ethernet Extract Packet'

Sign in to comment.

More Answers (0)

Categories

Find more on Multicore Processor Targets in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!