Byte Mode Commands¶
The Byte Command Protocol defines two Protocol Data Unit (PDU) formats: the standard PDU format and the extended PDU format, used for commands that address additional CAN channels or vendor-specific modules. The following sections describe both formats, and the subsequent pages describe the individual commands built on top of them.
PDU Format (Byte Mode)¶
A PDU consists of a set of fields (bytes) that define which command to communicate. The command can request or return a value or configuration.
The following sections describe how to structure the data field for each command. The overall PDU structure looks as follows:
| Field | Value | Description |
|---|---|---|
| SOF (Start of Frame) | 0x43 |
SOF marks the beginning of the PDU.C (0x43) is the default setting. For some devices this value can be changed. This manual always shows the default setting. |
| Length | 0x00-0xFF |
The Length field indicates the length (in bytes) of the Command + Data fields. |
| Command | 0x00-0xFF |
Command byte. Values 0x00 to 0xFE are direct commands, the value 0xFF means that the next byte contains a command extension. |
| Data | xx |
Data content |
| Checksum | xx |
XOR checksum of SOF, Length, Command, and Data fields. |
| EOF (End of Frame) | 0x0D |
EOF byte marks the end of the PDU.0x0D (Carriage Return) is the default setting. For some devices this value can be changed. This manual always shows the default setting. |
-- means that this value is not of interest.
xx means that the field contains the configuration or reply value.
Every message that changes or requests the settings of the Proemion CAN device gets a reply with the same command byte, containing the new settings.
Note
Request commands normally do not require additional parameters (no Data field). Exceptions are mentioned in the command description.
Example¶
| Field | Value | Description |
|---|---|---|
| SOF (Start of Frame) | 0x43 |
SOF marks the beginning of the PDU. |
| Length | 0x0B |
The Length field indicates the length (in bytes) of the Command + Data fields. |
| Command | 0x00 |
11-bit ID CAN message |
| Data | 0x07, 0x89, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18 |
ID (0x789) (MSB first), followed by the CAN message data content |
| Checksum | 0xCE |
XOR checksum of SOF, Length, Command, and Data fields. |
| EOF (End of Frame) | 0x0D |
EOF byte marks the end of the PDU. |
Extended PDU Format (Byte Mode)¶
| Field | Value | Description |
|---|---|---|
| SOF (Start of Frame) | 0x43 |
SOF marks the beginning of the PDU.C (0x43) is the default setting. For some devices this value can be changed. This manual always shows the default setting. |
| Length | 0x00-0xFF |
The Length field indicates the length (in bytes) of the Command + Data fields. |
| Extended Command | 0xD0-0xDF |
Command byte, values 0xD0 to 0xDF are extended commands. |
| Data | xx |
Byte 0: CAN channel (starting at 0 for CAN 1), 128…255 reserved for a module (Wi-Fi® / GSM / GPS…)Byte 1: Command Byte 2: Data content |
| Checksum | xx |
XOR checksum of SOF, Length, Command, and Data fields. |
| EOF (End of Frame) | 0x0D |
EOF byte marks the end of the PDU. |
-- means that this value is not of interest.
xx means that the field contains the configuration or reply value.
Example: Extended Command¶
| Field | Value | Description |
|---|---|---|
| SOF (Start of Frame) | 0x43 |
SOF marks the beginning of the PDU. |
| Length | 0x0D |
The Length field indicates the length (in bytes) of the Command + Data fields. |
| Command | 0xD0 |
Extended Command |
| Data | 0x010x000x07, 0x89,0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18 |
CAN channel: 2 Command: 11-bit ID CAN message, ID ( 0x789, MSB first)CAN message data content |
| Checksum | 0x19 |
XOR checksum of SOF, Length, Command, and Data fields. |
| EOF (End of Frame) | 0x0D |
EOF byte marks the end of the PDU. |