Records a CAN bus to a pcap file with a Canis Labs CANPico plugged into a laptop's USB. It is listen-only by default: the CANPico never drives the bus.
It was built for the Caterham CAN Logger Display project, to give:
- an independent view of the car's bus: what the ECU, Easimap and the dash actually send;
- bench tests of the dash: recording what it sends, without a commercial USB-CAN adapter;
- bench traffic:
./replayplays a recording back into a dash or a CAN node. It transmits, so it's bench only.
Wireshark opens the files, and the Caterham ECU skills' mbetool reads them:
can-summary, decode-can and easimap-trace.
make venv # once: a local Python with pyserial
./capture # listen-only, 500 kbit/s, until Ctrl-C
./capture -o idle.pcap --seconds 60 --log # stop after 60 s; also a candump-style .log- While recording, it shows frames a second, error events and the busiest IDs, once a second.
- At the end, it switches the CANPico off the bus and prints a count per ID.
captureuses this folder's.venvwhen it exists, so there's nothing to activate.
| Option | What the CANPico does on the bus | Where |
|---|---|---|
(default) --mode listen |
Nothing at all: no frames, no acknowledgements, no error flags | Safe on a car. Something else must acknowledge the frames |
--mode ack |
Acknowledges the frames it receives; sends none | Only when nothing else on the bus acknowledges |
--bench-beacon |
Transmits a frame on 0x0CBB0001 every 10 ms, so a dash on the bench has traffic to find the bitrate from |
Bench only. Never on a car |
./replay --bench car.pcap # play a recording into a dash or node on the bench
./replay --bench --id 0x0CBB0001 --loop car.pcap # just the broadcast, round and roundIt reads pcap, pcapng, candump -L logs and mbetool can-dump CSV, and keeps the recorded
timing (--speed, --start, --seconds). It refuses to run without --bench, skips a
frame rather than wait when nothing acknowledges, and leaves the CANPico offline. Details
are in docs/using-it.md.
--bitrate takes 125000, 250000, 500000 (the default) or 1000000.
A recording of your car is private vehicle data. For example, Easimap's identify reply includes the ECU's ID string.
.gitignorekeeps*.pcap,*.pcapngand*.logout of this repository.- Keep recordings off GitHub altogether.
| Document | What's in it |
|---|---|
| docs/using-it.md | Connecting on the bench and the car, termination (JP1), recording, replaying on the bench, checking a capture, troubleshooting |
| docs/architecture.md | How it works: the recorder on the CANPico, the line protocol, the pcap format, timestamps |
| docs/requirements.md | The requirements, with IDs |
| docs/test-plan.md | Host tests, bench and car checks |
| docs/adr/ | Architecture decision records |
- The laptop side is covered by
make test, which feeds made-up frames through a fake CANPico, including a timer wrap, and reads the pcap back. - The same CANPico has replayed recorded traffic into the dash and captured the dash's read requests on the bench, using simpler scripts.
./replayis those scripts made into a tested command; its own hardware check is in the test plan. - It has recorded a live bus: on 2026-11-27, a Caterham 420R's bus at the OBD port, listen-only, with Easimap reading. The other hardware checks are listed in the test plan.
- Changes are listed in CHANGELOG.md.