Skip to content

erik683/shady-elm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Shady Elm

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.

Install

Requires Python 3.8+ and pyserial:

pip install pyserial

Quick start

# 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 COM3

In 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 binary

See python savvycan_bridge.py --help for the full option list.

Configuration profiles

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.

Output formats

  • binary β€” GVRET binary (default; required for live SavvyCAN streaming)
  • gvret β€” GVRET CSV (text, human-readable, compatible with SavvyCAN file import)
  • crtd β€” CRTD text log

Supported adapters

  • 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.

Troubleshooting

  • Port unavailable β€” close other apps holding the port; run with --list-ports to confirm the device is present.
  • Init failed β€” try --debug to see the adapter's responses, or --skip-init if the adapter is already configured externally.
  • No frames β€” verify CAN-bus wiring, make sure the STN profile uses raw STP 31/STP 51 plus STM, and try --debug to inspect raw serial.
  • Garbled data β€” recheck --baud and flow control (--test-flow-control probes available modes).

Use --env-check to print Python and pyserial versions.

Testing

python -m pytest tests/

Layout

About

A shady 😏 little Python script to translate between a low-rent ELM327-command based device to SavvyCAN'a GVRET format via TCP

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages