
Vhandy Technology
GCAN-212 user manual
12. GCAN-212 (CANET) data definition
One piece of Ethernet data can contain multiple pieces of CAN bus data,
each piece of CAN data converted to Ethernet is 13 bytes, so the length of
an Ethernet packet must be a multiple of 13.
Ethernet and CAN bus data flow definition
A CAN frame contains 13 bytes.
Frame information, 1 byte in length, used to identify some information of
the CAN frame, such as type and length.
BIT7
BIT6
BIT5
BIT4
BIT3
BIT2
BIT1
BIT0
FF
RTR
UDP
Reserve
B3
B2
B1
B0
FF:
The identification bit of standard frame and extended frame, 1 is
extended frame, 0 is standard frame.
RTR:
Identification bit of remote frame and data frame, 1 is remote frame,
0 is data frame.
UDP:
The identification bits of UDP and TCP, 1 is UDP, 0 is TCP (set to 1
when using UDP mode to transmit data, and set to 0 when using TCP mode
to transmit data).
B3
~
B0:
Data length bits, which identify the data length of the CAN frame.
Frame ID, length 4 bytes, standard frame valid bit 11 bits, extended frame valid
bit 29 bits.
Byte 1
Byte 2
Byte 3
Byte 4
12
34
56
78
Frame data, the length is 8 bytes, and the effective length is determined by the
value of B3~B0 in the frame information
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
11
22
33
44
55
66
77
88
For example:
The following example is a TCP extended data frame, the frame ID is