A bridge that connects ELM327 / STN1170 CAN adapters to SavvyCAN using the GVRET protocol over TCP. Also supports file-only logging in GVRET CSV or CRTD format.
Requires Python 3.8+ and pyserial:
pip install pyserial# HS-CAN (500 kbps, 11-bit) on COM3, listening on 127.0.0.1:23
python savvycan_bridge.py --config STN1170_HSCAN_500000 -p COM3
# Ford MS-CAN (125 kbps)
python savvycan_bridge.py --config STN1170_MSCAN_125000 -p COM3In SavvyCAN: connect as GVRET to 127.0.0.1:23.
For file-only logging (no SavvyCAN):
python savvycan_bridge.py -p COM3 --file-only --output-file capture.bin --format binarySee python savvycan_bridge.py --help for the full option list.
JSON files in configs/ provide reusable adapter settings. Pass --config <name> (without .json) or --config path/to/file.json. Legacy aliases STN1170_HSCAN and STN1170_MSCAN_Ford are still accepted.
| Profile | Bus | Bitrate | Frame IDs |
|---|---|---|---|
STN1170_HSCAN_500000 |
HS-CAN | 500 kbps | 11-bit |
STN1170_MSCAN_125000 |
MS-CAN | 125 kbps | 11-bit |
To add a profile, drop a JSON file in configs/ with serial, can, and device sections β see the existing files for shape.
binaryβ GVRET binary (default; required for live SavvyCAN streaming)gvretβ GVRET CSV (text, human-readable, compatible with SavvyCAN file import)crtdβ CRTD text log
- ELM327 β standard OBD-II CAN adapters
- STN1170 β adds flow control, ID filtering, and monitor modes
The STN profiles use raw CAN presets (STP 31 for HS-CAN, STP 51 for MS-CAN)
and start monitoring with STM, falling back to STMA/ATMA for adapters that
do not support raw STN monitoring.
- Port unavailable β close other apps holding the port; run with
--list-portsto confirm the device is present. - Init failed β try
--debugto see the adapter's responses, or--skip-initif the adapter is already configured externally. - No frames β verify CAN-bus wiring, make sure the STN profile uses raw
STP 31/STP 51plusSTM, and try--debugto inspect raw serial. - Garbled data β recheck
--baudand flow control (--test-flow-controlprobes available modes).
Use --env-check to print Python and pyserial versions.
python -m pytest tests/- savvycan_bridge.py β bridge entrypoint
- configs/ β adapter profiles
- tests/ β pytest suite
- docs/ β protocol notes