This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I am analysing EtherCAT frame using wireshark and I found something doesn't fit to ESC documentation. In document ESC technology I can find out that EtherCAT header looks like this:
In wireshark capture I can see this:
Length: 0x059
Res: 0x0
Type: 0x1
According to picture from documentation I would say that EtherCAT header should look like this:
0x059 0x00 0x01 which is 0x5901 together (equals 01011001 00000001 b).
As you can see wireshark shows that second byte is different and EtherCAT header equals 0x5910 which is 01011001 00010000 b. It looks like order is different and it is: Length -- Type -- Reserved. In documentation I can't see anything about swaping bytes.
That situation makes me a little bit confused.
How can I explain it?
I appreciate any help.
Best regards,
Dawid.
I appreciate your help, thank you.
Here is another example of strange byte order from the same frame.
Let's taka a look on a NOP datagram. Here is offset addr field:
As you can see, bytes are swapped and to be honest I don't know why.
Here is Length field:
In manuals I read that order is: Len-R-C-M but in wireshark capture it looks like this: Len-M-C-R. Even if I would swap bytes like in offset address field I would say it was like that: 01 04. Without swaping: 04 01. I don't understand why the second octet is bit-reversed. Or the other hand - it looks like the order is reversed (M-C-R-Len) and bytes are swapped. But as I said - I completely have no idea what is going on here and I can't see any explanation in manual. E.g., source and destination addresses and ethertype are sent without any swapping and it looks exactly like in manual.
Another example to explain what I mean. Let's consider two bytes: 0x01(MSB) 0xF0 (LSB). In big endian value is 0x01F0. In little endian value is 0xF001. But when I look on wireshark capture my data (0x01(MSB) 0xF0 (LSB)) would be sent as 0x010F and I don't understand why the lower bytes are bit reversed.