canair repl¶
Alias: interactive
usage: canair repl [-h] [--wican WICAN]
[--transport {slcan-tcp,wican-ws,elm327-tcp}]
[--no-fallback] [--wait] [--elm-timeout MS]
[--timeout SECONDS] [--json] [--verbose] [--timings]
[--reboot] [--unsafe] [--force]
[UDS] Drop into an interactive live terminal (REPL) over an ELM327
transport (wican-ws / elm327-tcp) — type raw ELM327 (AT...) and UDS requests
by hand and see the decoded response, for exploratory poking the one-shot
commands don't cover. (Not supported on the raw slcan-tcp transport.)
Inside the REPL:
ATSH7E4 set the target ECU header (ELM327 AT command)
2101 / 22C00B send a UDS request to the current header
!decode decode the last response using the profile definitions
!hexdump hex dump of the last response
!info <ECU> show an ECU's info from the profile (e.g. !info BMS)
!list list all known ECUs
!tester [id] TesterPresent keepalive loop (Ctrl+C to stop)
!reboot reboot the WiCAN to restore AutoPID mode (WiCAN only)
!quit / Ctrl+C exit
For scripted/one-shot reads prefer `canair read` instead; this is the
manual, freeform fallback.
options:
-h, --help show this help message and exit
--wican WICAN WiCAN address: ap or IP (default: config
transport.host / default_wican=ap)
--transport {slcan-tcp,wican-ws,elm327-tcp}
CAN transport: slcan-tcp (raw CAN), wican-ws (WiCAN
ELM327 WebSocket), or elm327-tcp (direct ELM327
adapter over TCP). Overrides the config
`transport.type` (default: slcan-tcp).
--no-fallback Don't auto-fall-back to other configured devices when
the selected one is unreachable (see config
transport.fallback).
--wait Keep retrying to reach the device indefinitely, then
start as soon as it comes online (Ctrl-C to stop). For
'monitor', also reconnects forever if the connection
drops mid-session (auto-failover to another same-
transport device is bounded by default; --wait makes
it unbounded).
--elm-timeout MS ELM327 ECU response timeout in ms (sent as ATSTxx
after init)
--timeout SECONDS Overall UDS response timeout in seconds (default 3.0
ELM / 2.0 raw). Overrides any per-ECU
response_timeout_ms for the whole run.
--json Output results as JSON
--verbose, -v Show raw transport traffic and expressions
--timings Print per-ECU/PID round-trip timing stats on exit (to
stderr)
--reboot Reboot WiCAN after session to restore AutoPID mode
--unsafe Bypass dangerous command blocklist (requires explicit
per-command consent)
--force Ask a session already holding the connection to
release it, then wait for it
examples:
canair repl # open the interactive terminal (default device)
canair repl --wican vpn # connect via the 'vpn' address
canair interactive # 'interactive' is an alias for 'repl'