CXCAN Command - CAN Bus Configuration
Configures the usage mode of the integrated CAN module. Data capture and subsequent analysis depend on the protocol, the bus speed and the identifier format used by the vehicle.
What is it for?
| Use case | Description |
|---|---|
| ⛽ Fuel consumption | Read ECU data from the vehicle |
| 🚗 Engine data | RPM, temperature, pressure |
| 📊 Advanced telemetry | OBD-II / J1939 information |
| 🚚 Transport fleets | Monitoring trucks and buses |
Commands
Configure
SCXCANa,bbbb,cc..cc,dd,eee,fQuery
QCXCANResponse
RCXCANa,bbbb,cc..cc,dd,eee,fParameters
| Field | Description | Allowed values | Default |
|---|---|---|---|
| a | CAN module enable | 0 = disabled · 1 = enabled | 0 |
| bbbb | Bus speed | 250K · 500K · 1M | 500K |
| cc..cc | Protocol | OBDII · J1939 · IESCAN · LISTEN · PLAIN | OBDII |
| dd | CAN identifier format | 11 (standard) · 29 (extended) | 11 |
| eee | FuelTripSoftEnable | 0 = calculation disabled · 1 to 150 = enabled with percentage factor | 0 |
| f | FuelTripSoftEngineType | 0 = gasoline · 1 = diesel | 0 |
Fields are positional and truncatable: only those present are applied, from left to right. >SCXCAN1< changes just the enable flag and keeps the rest; >SCXCAN1,500K,OBDII< changes the first three. Intermediate fields cannot be skipped: to reach dd you must also send bbbb and cc..cc.
Bus speed (bbbb)
The suffix indicates the unit: K = Kbaud, M = Mbaud.
| Value | Speed | Typical use |
|---|---|---|
250K | 250 Kbps | Heavy vehicles running J1939 (trucks, buses, machinery) |
500K | 500 Kbps | Most light vehicles with OBD-II |
1M | 1 Mbps | High speed CAN buses (from firmware v1.09.21) |
Only 250K, 500K and 1M actually program the bus. The firmware also accepts and persists
25K, 50K, 100K and 125K: the command replies fine and QCXCAN returns the stored value, but
when the controller initializes there is no timing for those speeds and the bus ends up running at
500 Kbit. In other words, configuring 125K looks like it worked and the device reads no frames
at all.
A value outside that list (for example 800K) is indeed discarded and the bus keeps the previous
speed.
The speed must match the vehicle bus exactly: if it does not, the device reads no frames at all.
Protocol (cc..cc)
| Value | What it does | When to use it |
|---|---|---|
OBDII | Queries the ECU with standard OBD-II PIDs and acquires VIN and fault codes | Cars, pickups and light utility vehicles |
J1939 | Decodes PGNs from the SAE J1939 standard | Trucks, buses, agricultural and road machinery |
IESCAN | Decodes frames from the IESCAN standard | Vehicles with an IESCAN interface |
LISTEN | Passive listening: the transceiver runs in listen-only mode and transmits nothing to the bus | Diagnostics and sniffing without disturbing the vehicle bus |
PLAIN | Raw frame reception with no protocol decoding | Vehicles read with custom parsers via CXECU |
The protocol is written OBDII (with two letter I’s), not OBD2 or OBD-II. An unrecognized value is silently discarded: the device keeps the previous protocol and reading does not work as expected. The same applies to J1939, IESCAN, LISTEN and PLAIN, always in uppercase.
Identifier format (dd)
| Value | Format | Typical use |
|---|---|---|
11 | Standard identifier (CAN 2.0A, 11 bits) | Light vehicles with OBD-II |
29 | Extended identifier (CAN 2.0B, 29 bits) | J1939 and heavy vehicle buses |
The only value that enables the extended format is 29. Any other value is interpreted as 11.
Software FuelTrip (eee, f)
When the vehicle does not publish fuel rate, the device can estimate it by software from the engine signals.
- eee (FuelTripSoftEnable):
0disables the calculation. A value from1to150enables it and sets the percentage correction factor:100equals a x1.00 factor,120equals x1.20 and80equals x0.80. It is used to calibrate the estimate against real measured consumption. Values above150are discarded. - f (FuelTripSoftEngineType):
0for gasoline engines,1for diesel.
The result is read with CAN05 and feeds the TRIP module.
How to verify the configuration
SCXCAN always replies with the effective configuration that was stored, in the same format as QCXCAN. Comparing what was sent with what came back is the way to confirm that every parameter was accepted.
>SCXCAN1,500K,OBD2<
// Misspelled protocol
>RCXCAN1,500K,J1939,29,0,0<
// The device kept the previous protocol| Response | Meaning |
|---|---|
RCXCANa,bbbb,cc..cc,dd,eee,f | Effective configuration after applying the command |
RCXCANERR | The command arrived with no parameters |
RCXCAN NA | The model has no CAN module (see Compatibility) |
Examples
Configure CAN with J1939 at 250K
>SCXCAN1,250K,J1939,29,0,0<
// 1 → Enabled
// 250K → 250 Kbaud speed
// J1939 → Protocol for heavy vehicles
// 29 → Extended identifier
// 0,0 → Software FuelTrip disabledOnce the protocol/speed is configured, there is no need to set it again every time reading is enabled or disabled.
Configure CAN with OBD-II at 500K (the most common setup)
>SCXCAN1,500K,OBDII,11,100,0<
// 500K → 500 Kbaud speed
// OBDII → Standard OBD-II PIDs
// 11 → Standard identifier
// 100 → Software FuelTrip enabled, x1.00 factor
// 0 → Gasoline engineConfigure CAN at 1 Mbps
>SCXCAN1,1M,J1939,29,0,0<
// 1M → 1 Mbps speed (1000 Kbaud), from firmware v1.09.21Passive listening for diagnostics
>SCXCAN1,500K,LISTEN,11,0,0<
// LISTEN → The transceiver does not transmit: it will not interfere with the vehicle busEnable reading
>SCXCAN1<Disable reading
>SCXCAN0<Common mistakes
| Sent | What happens | Correct |
|---|---|---|
OBD2, obdii, OBD-II | Protocol not recognized: the previous one stays | OBDII |
800K | Speed not recognized: the previous one stays | 250K, 500K or 1M |
25K, 50K, 100K, 125K | Accepted and stored, but the bus ends up at 500 Kbit | 250K, 500K or 1M |
>SCXCAN1,,,29< | Empty fields do not skip positions | >SCXCAN1,500K,OBDII,29< |
| Speed different from the bus | The device receives no frames | Check the vehicle’s actual bus speed |
Compatibility
Rinho Zero IoT has no CAN transceiver: the command replies RCXCAN NA. Reading the vehicle bus requires Spider IoT or Smart IoT.
Physical bus connection (CAN-H / CAN-L) by model:
See Also
- CANxx Commands - Query the data read from the bus
- ECU Command - ECU value reading
- CXECU Command - Custom CAN signal parsers