Generic Mode Network and Device Communication
51 (62)
11.5
CAN Messages in Binary Format
CAN Messages coded in binary format are called X-type messages.
Basic features of binary format:
•
allows faster transmission of CAN messages
•
data of the CAN message is transmitted uncoded in a binary value
•
fields are not separated by blanks
•
fields are without CR/LF characters
X-type messages are used to transmit CAN messages over a Bluetooth connection to another
device. The receiving device forwards the message to all established Bluetooth connections
and if the local CAN controller is started the message is transmitted to the CAN network.
Standard CAN Message
X FI ID_HB ID_LB D0 D1 D2 D3 D4 D5 D6 D7
Extended CAN Message
X FI ID_HW_HB ID_HW_LB ID_LW_HB ID_LW_LB D0 D1 D2 D3 D4 D5 D6 D7
Parameter
Parameter
Description
FI
(bit field)
FF (bit 7): Frame format ( 0 — Standard, 1 — Extended)
RTR (bit 6): Frame type ( 0 — Data, 1 — Remote)
DLC (bit 0–3): Data length 0–8
ID_HB
High byte of Standard CAN ID (0–7F)
ID_LB
Low byte of Standard CAN ID (0–FF)
ID_HW_HB
High word, high byte of Extended CAN ID (0–1F)
ID_HW_LB
High word, low byte of Extended CAN ID (0–FF)
ID_LW_HB
Low word, high byte of Extended CAN ID (0–FF)
ID_LW_LB
Low word, low byte of Extended CAN ID (0–FF)
D0–D7
Up to 8 data bytes (0–FF)
Example
0x58, 0x85, 0x01, 0x02, 0x03, 0x04, 0x19, 0x2A, 0x3B, 0x4C, 0x5D
0x58
X (binary message type)
0x85
FF=1 (Ext); RTR=0 (Data); DLC = 5
0x01020304
ID
0x19, 0x2A, 0x3B, 0x4C, 0x5D
5 data bytes
Possible Return Values
Error
Description
E 85 Tx SW queue OVERRUN
Overrun of the transmitting queue, for example CAN
controller is in
error warning
or
bus off
state or data could
not be transmitted fast enough due to slow baud rate.
CANblue II User Manual
4.01.0126.20000 EN 3.2