Tutorial — CAN 2.0B with SocketCAN¶
RPBridge exposes CAN via a gs_usb-compatible vendor interface. The
mainline drivers/net/can/usb/gs_usb.ko driver binds it automatically
on Linux ≥ 5.14, so this tutorial assumes nothing RPBridge-specific
beyond the device being plugged in.
1. Confirm the netdev¶
2. Configure bitrate and bring up¶
sudo ip link set can0 type can bitrate 500000 sample-point 0.875
sudo ip link set can0 up
ip -br link show can0
# can0 UNKNOWN ...
3. Transmit and receive¶
4. Generate and dump traffic¶
5. Stats and error counters¶
6. Supported bitrates¶
| Bitrate | Sample point | Notes |
|---|---|---|
| 125 kbit/s | 87.5 % | Long-link-friendly. |
| 250 kbit/s | 87.5 % | Industrial default. |
| 500 kbit/s | 80 % | Automotive default. |
| 1 Mbit/s | 75 % | Requires clean wiring + short stubs. |
CAN-FD is not supported in rev-B. can2040 is a classic CAN 2.0B controller; a future hardware revision could add an external MCP2518FD over SPI if FD becomes a requirement.