Custom CAN Bus Data Capture with CXECU

🎓 Level: Advanced - This tutorial requires technical knowledge of CAN Bus systems, hexadecimal frame analysis, and bit-level operations.
Do you need to monitor handbrake usage in your fleet? Want to know when drivers activate the brake or clutch pedal? The CXECU tool from Rinho devices allows you to configure dynamic parsers to capture any parameter transmitted by the vehicle via CAN Bus.
In this tutorial, you'll learn how to capture the handbrake status of the Fiat Cronos using real CAN bus data, configure the Rinho device, and create automatic events when the handbrake is activated.
🎯 Real application: We use the handbrake as a case study with real Fiat Cronos data, but this same methodology applies to any CAN parameter: seat belts, door opening, oil temperature, tire pressure, etc.
📖 If you're not familiar with CAN Bus fundamentals yet, we recommend reading first What is CANBUS and why is it key in fleet management?
The Problem: Monitoring the Handbrake
Imagine this real scenario:
Your Fiat Cronos fleet operates in mountainous areas. Some drivers are not correctly using the handbrake when parking on slopes, which generates:
- ⚠️ Accident risk if the vehicle moves
- 🔧 Premature wear of the transmission
- 📊 Lack of visibility about this behavior
The solution: Configure the Rinho device to capture the handbrake status directly from the CAN bus and generate automatic alerts when the driver doesn't use it correctly.
💡 Requirement: This tutorial requires Rinho devices with integrated CAN Bus module, such as Rinho Spider IoT or Rinho Smart IoT. These devices include specialized hardware to connect to the vehicle's CAN bus and process messages in real-time.
What is CXECU?
CXECU is the CAN parser configuration module of Rinho devices. It allows you to define exactly how to interpret CAN messages transmitted by the vehicle to extract specific values.
Key Concepts
| Concept | Description |
|---|---|
| CXECU | Configurable parsers for extracting data from CAN messages |
| CXCAN | Global bus configuration (speed, protocol) |
| Parser | Rule that interprets specific bits from a CAN message |
| Indexes | 28 available slots (CXECU00-CXECU27) for configurations |
The system has 28 predefined indexes, and indexes 20-27 are reserved for custom parameters:
20: custom.fuel_liters - Fuel in liters
21: custom.fuel_milliliters - Fuel in milliliters
22: custom.handbrake_status - Handbrake (0/1) ⭐
23: custom.brake_pedal_status - Brake pedal (0/1) ⭐
24: custom.accelerator_pct - Custom accelerator (%)
25: custom.door_driver - Driver door (0/1)
26: custom.door_passenger - Passenger door (0/1)
27: custom.clutch_pedal_status - Clutch pedal (0/1) ⭐
Step-by-Step Tutorial: Fiat Cronos
Let's configure the capture of the handbrake of the Fiat Cronos using real data extracted from the vehicle's CAN bus.
🚗 Test vehicle: The data presented was obtained from a Fiat Cronos 1.3 Drive. This configuration should work on other models of the Cronos family, but we always recommend verifying the CAN messages of your specific vehicle.
🔍 Note on analysis: The data you'll see below was obtained using
SCXCAN1,500K,LISTENmode to capture and analyze bus messages. Once the parameters are identified, the final configuration usesSCXCAN1,500K,OBDII,29to combine standard OBD-II parameters with CXECU custom ones.
Step 1: CAN Message Analysis
First, we need to understand how the vehicle transmits the handbrake information.
After analyzing the Fiat Cronos CAN bus with sniffing tools in LISTEN mode, we found:
📊 Handbrake - Message ID 0x256
| Status | Byte 0 | Active Bits | Hex Value |
|---|---|---|---|
| Deactivated | 00000000 |
None | 0x00 |
| Activated | 00001000 |
Bit 3 | 0x08 |
Extraction logic:
handbrake_status = (Byte_0 & 0x08) ? 1 : 0
If we apply the 0x08 mask to the byte:
0x08 & 0x08 = 0x08→ Activated (bit 3 = 1)0x00 & 0x08 = 0x00→ Deactivated (bit 3 = 0)
Step 2: Configure the CAN Bus
Before configuring the parser, we need to enable the CAN bus with the correct speed and protocol.
The Fiat Cronos uses a 500 Kbps CAN bus with OBDII protocol and 29-bit extended CAN:
>SCXCAN1,500K,OBDII,29<
📚 See full documentation: CXCAN Command
Command breakdown:
1→ Enable the CAN module500K→ Speed of 500 Kbps (standard in modern cars)OBDII→ Standard OBD-II protocol29→ 29-bit extended CAN ID (instead of the standard 11-bit)
Verify the configuration:
>QCXCAN<
Expected response:
>RCXCAN1,500K,OBDII,29...
Step 3: Configure the Handbrake Parser
Now let's configure the parser at index 22 (reserved for custom.handbrake_status):
>SCXECU22E,256,3,1,1,0,0,1,BE,U<
📚 See full documentation: CXECU Command
Detailed breakdown of each parameter:
| Parameter | Value | Description |
|---|---|---|
| Index | 22 |
Slot for custom.handbrake_status |
| Status | E |
Enabled |
| CAN ID | 256 |
Message ID in hexadecimal (0x256) |
| Start Bit | 3 |
Bit 3 of Byte 0 (position 3 in message) |
| Length | 1 |
1 bit length |
| Factor | 1 |
Multiplier (extracted_value × 1) |
| Offset | 0 |
Offset (+0) |
| Min | 0 |
Minimum valid value |
| Max | 1 |
Maximum valid value |
| Endian | BE |
Big Endian |
| Sign | U |
Unsigned |
Conversion formula:
final_value = (extracted_bit × 1) + 0 = extracted_bit
In this case, since we extract only one bit, the final value will be 0 or 1.
Verify the configuration:
>QCXECU22<
Expected response:
>RQCXECU22E,00000256,3,1,1.000,0.0,0,1,BE,U...
Step 4: Query the Real-Time Value
Once the parser is configured, we can query the current handbrake status:
>QECU22<
Possible responses:
>RECU22,0... // Handbrake deactivated
>RECU22,1... // Handbrake activated
Capturing More Parameters from the Cronos
Besides the handbrake, the Fiat Cronos transmits other useful parameters via CAN Bus:
Brake Pedal - ID 0x0FA
// Brake pedal: Byte 0, Bits 3-2 (0x0C)
// Released: 0x80, Pressed: 0x8C
>SCXECU23E,0FA,2,2,1,0,0,3,BE,U<
Bit analysis:
- Byte 0 of message
0x0FA - Bits 3-2 (mask
0x0C) - Released:
0x80(1000 0000) → bits [3:2] =00 - Pressed:
0x8C(1000 1100) → bits [3:2] =11(3 in decimal)
Clutch Pedal - ID 0x1F0
// Clutch: Byte 0, Bits 7-6
// Released: 0x00, Half: 0x40 (bit 6), Full: 0x80 (bit 7)
>SCXECU27E,1F0,6,2,1,0,0,3,BE,U<
Bit analysis:
- Byte 0 of message
0x1F0 - Bits 7-6 (2 bits)
- Values:
0(released),1(half),2(full)
Complete Configuration for the 3 Parameters
// Complete CAN Bus configuration for Fiat Cronos
>SCXCAN1,500K,OBDII,29<
// Handbrake (index 22)
>SCXECU22E,256,3,1,1,0,0,1,BE,U<
// Brake pedal (index 23)
>SCXECU23E,0FA,2,2,1,0,0,3,BE,U<
// Clutch pedal (index 27)
>SCXECU27E,1F0,6,2,1,0,0,3,BE,U<
// Query values
>QECU22< // Handbrake: 0 or 1
>QECU23< // Brake pedal: 0 (released) or 3 (pressed)
>QECU27< // Clutch: 0 (released), 1 (half), 2 (full)
Event Configuration with UV Variables and RL Rules
Values captured with CXECU can be used in universal variables (UV) and RL rules of the event engine to create conditional logic and generate automatic alerts when changes are detected in monitored parameters.
Query ECU Values with QECU
CXECU values are available through the QECU[idx] command:
// Query handbrake (index 22)
>QECU22<
>RECU22,1... // 1 = activated
// Query brake pedal (index 23)
>QECU23<
>RECU23,3... // 3 = fully pressed
Use ECU in UV Variables with Formulas
UV (User Variables) can evaluate expressions that include ECU values. The syntax is:
📚 See full documentation: UV Command
>SUV[idx][type] command,start,end,min,max<
Available types:
F→ Float (numbers with decimals)U→ Unsigned integerS→ Signed integer
Examples for Fiat Cronos:
// UV00 = 1 when handbrake is activated (QECU22 >= 1)
>SUV00FQECU22%d:30,7,0,0,1,999<
// UV01 = 1 when brake pedal is pressed (QECU23 >= 3)
>SUV01FQECU23%d:30,7,0,0,3,999<
// UV02 = 1 when clutch is pressed (QECU27 >= 1)
>SUV02FQECU27%d:30,7,0,0,1,999<
Syntax explanation:
SUV00F→ Configure UV00 with Float type (no space between F and command)QECU22%d:30,7→ Query ECU index 22, decimal format, timeout 30s, from character 70,0→ Start position 0, length 0 (take complete response)1,999→ Range: min=1 (inclusive), max=999 (exclusive)- UV = 1 when value is in range [min, max)
- UV = 0 when value is outside range
Create Position Reports with RL Rules
Once UVs are configured, you can use them in RL rules to generate automatic position reports:
📚 See full documentation: RL Command
// Rule: Send position report when handbrake is activated
>SRL50E;TRG=UV00+;ACC={GCQ55H}<
Explanation:
SRL50E→ Rule 50 enabledTRG=UV00+→ Trigger when UV00 goes from 0 to 1 (rising edge)ACC={GCQ55H}→ Generate position report with code 55 and high priority (H)
📚 Command to generate reports: GCQ - Report Generation
Complete Example: Handbrake Monitoring System
File: cronos_handbrake_events.txt
// ================================================
// Handbrake Monitoring System
// Uses CXECU + UV + RL Rules
// ================================================
// 1. Configure CAN bus
>SCXCAN1,500K,OBDII,29<
// 2. Configure handbrake parser
>SCXECU22E,256,3,1,1,0,0,1,BE,U<
// 3. Create UV00 variable that evaluates if brake is activated
>SUV00FQECU22%d:30,7,0,0,1,999<
// 4. Rule: Event when handbrake ACTIVATES
>SRL50E;TRG=UV00+;ACC={GCQ55H}<
// 5. Rule: Event when handbrake DEACTIVATES
>SRL51E;TRG=UV00-;ACC={GCQ56H}<
// Verify configuration
>QUV00< // See UV00 status
>QECU22< // See parser value
Advantages of this method:
- ✅ Greater flexibility: You can combine multiple conditions
- ✅ Custom events: Send specific codes with GCQ
- ✅ Native rules engine: Uses firmware's RL system
- ✅ Better performance: More efficient evaluation on device
Load the Configuration
Commands can be sent to the device via SMS, web platform or serial terminal (USB/UART):
>SCXCAN1,500K,OBDII,29<
>SCXECU22E,256,3,1,1,0,0,1,BE,U<
>SUV00FQECU22%d:30,7,0,0,1,999<
>SRL50E;TRG=UV00+;ACC={GCQ55H}<
>SRL51E;TRG=UV00-;ACC={GCQ56H}<
Management Commands
Query Configuration
>QCXCAN< // Query CAN bus configuration
>QCXECU[idx]< // Query specific parser (e.g.: QCXECU22)
>QECU[idx]< // Query current value (e.g.: QECU22)
Possible responses for QCXECU:
// Parser enabled
>RQCXECU22E,00000256,3,1,1.000,0.0,0,1,BE,U...
// Parser disabled
>RQCXECU22D,00000256,3,1,1.000,0.0,0,1,BE,U...
// Not configured
>RQCXECU22,NOTCFG,USE:SCXECU22enable,can_id,start,len,factor,offset,min,max,endian,sign...
Quick Enable/Disable
>SCXECU22E< // Enable already configured parser
>SCXECU22D< // Temporarily disable parser
This is ideal for:
- 🔧 Maintenance: Temporarily disable monitoring
- 🔍 Diagnostics: Isolate problematic parameters
- ⚡ Optimization: Reduce processor load
Clear Configurations
>CCXECU22< // Clear specific parser
>CCXECU99< // Clear ALL parsers
📚 See full documentation: CXECU Command
Recommended Workflow
1. Initial Analysis (LISTEN Mode)
If you don't have the vehicle's CAN bus information, first you need to do an analysis in LISTEN mode to identify messages:
a) Configure CAN bus in listen mode (LISTEN):
>SCXCAN1,500K,LISTEN<
b) Enable CAN frame logging (via serial terminal):
>SDB0+CAN<
📚 See full documentation: DB Command
This will show all CAN frames on the serial terminal for analysis.
💡 Important note:
LISTENmode is for analysis only. It allows capturing all CAN bus messages without interfering with the vehicle.
c) Use CAN analysis tools (optional):
- Hardware: OBD-II CAN adapter (ELM327, CANable, PCAN)
- Software: CANalyzer, Wireshark, SavvyCAN
d) Identify messages:
- Activate/deactivate the handbrake repeatedly
- Observe which CAN message changes value
- Note the ID, byte, and specific bit
e) Once messages are identified, switch to OBD-II:
// Switch from LISTEN to OBDII for normal use
>SCXCAN1,500K,OBDII,29<
⚠️ Important: After analysis, always configure with
OBDII,29for production use. This allows:
- Capture standard OBD-II parameters (RPM, speed, temperature, etc.)
- Capture custom parameters with CXECU (handbrake, pedals, etc.)
2. Configure the Parser
With the analysis information, configure the corresponding parser:
>SCXECU22E,[ID],[bit],[length],1,0,0,1,BE,U<
3. Verify
>QCXECU22< // Verify parser configuration
>QECU22< // Verify real-time values
Physically activate and deactivate the handbrake and observe the values.
4. Configure Events with UV and RL
Once verified that the parser works correctly, configure UV variables and RL rules to generate automatic events (see section Event Configuration with UV Variables and RL Rules).
5. Adjust if Necessary
If values are not correct, review:
| Aspect | Verification |
|---|---|
| ✅ Baudrate | Must match vehicle (500K is common in cars) |
| ✅ Start bit | Count from 0 within corresponding byte |
| ✅ Length | Number of bits to extract (1-32) |
| ✅ Endianness | Big Endian (BE) vs Little Endian (LE) |
| ✅ CAN ID | Verify in hexadecimal (e.g.: 256 = 0x256) |
Troubleshooting
Common Problem: Parser Doesn't Capture Values
Symptoms:
QECU22always returns0or incorrect values- Configuration appears correct but doesn't work
Diagnostic checklist:
| Verification | How to Verify | Solution |
|---|---|---|
| CAN bus enabled | >QCXCAN< should return active configuration |
Execute >SCXCAN1,500K,OBDII,29< |
| Parser enabled | >QCXECU22< should show E at start |
Execute >SCXECU22E< |
| Message transmitted | Use LISTEN mode or CAN debug | Verify if ID appears on bus |
| Correct bit | Compare mask with actual value | Adjust start_bit and length |
| Factor/Offset | Verify conversion formula | Adjust multiplier and offset |
Real Example: Handbrake Debugging
Problem: QECU22 value always returns 0, even with handbrake activated.
Diagnosis:
-
Verify message is transmitted:
// Enable CAN logging (if available) // Look for messages with ID 0x256 -
Verify correct bit:
- Handbrake uses bit 3 (mask 0x08)
- Start bit should be
3, not0
-
Verify configuration:
>QCXECU22< // Should show: >RQCXECU22E,00000256,3,1,... // ^ start bit should be 3 -
Test manually:
- Activate and deactivate brake repeatedly
- Query
>QECU22<after each change - Should alternate between 0 and 1
When to Use CXECU?
⚠️ Important: CXECU is designed to capture CAN messages that are continuously transmitted on the bus (broadcast) that are not included in standard protocols.
Ideal use cases:
| Protocol | Use with CXECU | Description |
|---|---|---|
| J1939 | ✅ Ideal | Heavy vehicles - continuous engine and transmission data |
| LISTEN | ✅ Analysis only | Listen mode to identify messages (not for production) |
| PLAIN | ✅ Ideal | Basic CAN without specific protocol |
| OBD-II | ✅ Complementary ⭐ | For proprietary messages that standard protocol doesn't interpret |
The Fiat Cronos Case
The Fiat Cronos is a perfect example of OBD-II + CXECU:
- Standard OBD-II captures: RPM, speed, engine temperature, standard fuel level, error codes (DTC), etc.
- Custom CXECU captures: Handbrake (ID 0x256), brake pedal (ID 0x0FA), clutch pedal (ID 0x1F0)
These last ones are Fiat proprietary messages that the OBD-II protocol is not designed to interpret. That's why the configuration is:
>SCXCAN1,500K,OBDII,29< // OBD-II base + CXECU custom
This way you get the best of both worlds: standard parameters + custom parameters.
Conclusion
With CXECU you learned to:
✅ Analyze real CAN messages from the Fiat Cronos ✅ Configure a parser to extract handbrake status ✅ Create automatic events that alert when brake is activated ✅ Capture multiple parameters (brake, clutch, pedals)
This same methodology can be applied to any vehicle that transmits data via CAN Bus. You just need to:
- 🔍 Analyze the CAN bus with sniffing tools
- 📊 Identify the message, byte and bit of desired parameter
- ⚙️ Configure the CXECU parser with obtained data
- 📡 Create automatic events with UV variables and RL rules
Need help? Rinho's technical team offers:
- 📋 Parser configuration for your vehicle model
- 🔍 CAN bus analysis and parameter extraction
- 🛠️ Specialized technical support for complex cases
- 📚 Custom documentation for your fleet
With Rinho Spider IoT and Rinho Smart IoT devices, take vehicle telematics to the next level.
📚 For complete technical documentation, visit our CANBUS commands guide in the official documentation.