There are two operational modes:
Serial ASCII Protocol ON
In this mode any CAN message can be transmitted or received. A custom ASCII protocol is used that has the following format:
#ID,DLC,A,B...<cr>
Where:
ID = CAN message ID
DLC = Length of CAN message (0 to 8)
A,B,… = individual data bytes
So, for example, sending “100,2,1,2” would transmit a CAN message with ID 0x100, and two data bytes being 0x01 and 0x02.
In order to transmit on CAN you must configure a TX message in the configuration – because any message ID can be sent, with any payload, the configuration of the TX message should be left at ID=0x0 with no data defined.
In order to receive from the CAN bus a RX message must be defined configuration – because any message ID can be received, with any payload, the configuration of the RX message should be left at ID=0x0 with no data defined.
Serial ASCII Protocol OFF
In this mode, any character received on the serial port will be encoded into a CAN message. If you send the string YELLOW into the serial port then a CAN message will be emitted as:
[TX:ID][6][‘Y’][‘E’][‘L’][‘L’][‘O’][‘W’]
If you send “YELLOWCOG” there will not be enough room in one standard eight-byte CAN message so two messages will be emitted, as such:
[TX:ID][8][‘Y’][‘E’][‘L’][‘L’][‘O’][‘W’][‘C’][‘O’]
[TX:ID][1][‘G’]
The exact way the message is split will depend on the (unpredictable) timing of the Pilot hardware. As long as the data rates are sustainable then no byte will be missed.
For received CAN messages the direction is reversed. Any data received as the payload on the configured receive CAN ID will be transmitted out the serial port as the same raw binary data. e.g. if the CAN message is comprised of ASCII viewable characters then you will get out will be readable text.
In order to transmit on CAN you must configure a TX message in the configuration – the ID should be the CAN ID you want the raw data mirrored to, the payload should be empty.
In order to receive from the CAN bus a RX message must be defined configuration – the ID should be the CAN ID you want the raw data mirrored from, the payload should be empty.