CAN 2.0B

Reads and transmits on the CAN bus

Listen-only, OBD-II and J1939 modes, scheduled requests configured over MQTT, and only changed values published.

The GX5s on a CAN bus with two ECUs: it sends a request, an ECU replies, and only changed values go out over MQTT GX5s ECU ECU CAN-H / CAN-L request reply MQTT: changed values only

The GX5s has a CAN 2.0B interface on its harness. The firmware reads and transmits on the bus, and runs CAN only while ignition is on.

Modes

Mode What it does
off CAN disabled.
listen Receives only: never drives or acknowledges the bus.
obd2 Sends OBD-II requests and decodes the replies. Acknowledges and transmits.
j1939 Sends J1939 requests and decodes the replies. Acknowledges and transmits.

Requests

  • Mode, bitrate and filter are configured over MQTT and kept on the device.
  • Up to 16 request slots, each a raw frame sent on its own interval: an OBD-II PID request or a J1939 PGN request alike.
  • OBD-II: ISO-TP single, first and consecutive frames with flow control; 16-bit PIDs for service 0x22; gateway addressing on 0x6xx ids; one request at a time.
  • J1939: address claim, and multi-packet messages (TP.BAM and TP RTS/CTS) with end-of-message acknowledgement; an optional "requested PGNs only" filter.

Publishing

The latest value per ECU and PID (or per PGN and source) is kept, and only changes are published over MQTT, as text frames in a JSON array.

Not yet supported

Tesla and ALDL (GM serial) decoders, CANopen, and raw capture of broadcast frames in OBD-II mode. The firmware is open source if you need one sooner.

Source: firmware decisions (ADR 0001) in the gx5s repository.