canair io¶
Alias: iocontrol
usage: canair io [-h] [--did DID] [--off] [--poll] [--yes] [--wican WICAN]
[--transport {slcan-tcp,wican-ws,elm327-tcp}] [--no-fallback]
[--wait] [--elm-timeout MS] [--timeout SECONDS]
[--no-learn-frames] [--json] [--verbose] [--timings]
[--reboot] [--unsafe] [--force]
[ECU]
[UDS] IOControl (UDS 0x2F, or an entry's own KWP2000 0x30 commands): interactive TUI, or single actuator command with --did. Every actuator switched on is released on exit and on Ctrl+C with its release request: returnControlToECU (2F{DID}00) on UDS, the entry's declared release: on KWP2000, where the 0x30 option byte has no standard release. A 0x30 ON without a declared release is refused (set one with `canair pids set-iocontrol ECU KEY --release HEX`). The TUI's value keys (w/+/-) build UDS 0x2F requests, so they are refused for a KWP2000 ECU.
positional arguments:
ECU ECU name (e.g. IGPM)
options:
-h, --help show this help message and exit
--did DID DID to execute (e.g. BC01)
--off Send the entry's OFF command instead of ON
--poll Enable background status polling in the TUI: sends
each DID's release (2F{DID}00, returnControlToECU, on
UDS) every 3s, inside each entry's own session. This
can actuate relay/solenoid-backed DIDs (audible click)
— off by default. A KWP2000 entry is polled only when
it declares a release.
--yes, -y With --did: send without asking first (required when
stdin is not a terminal)
--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.
--no-learn-frames Don't write response_frames back into the profile's
ecus/ when this session confirms how many CAN frames a
PID's response occupies (the count that lets the
adapter answer without waiting out its full ECU
timeout). Use when reading a car the active profile
doesn't describe.
--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
(skipped on firmware v6, which resumes AutoPID by
itself)
--unsafe Bypass the dangerous-command blocklist: each refused
command asks for typed consent before it is sent.
Works only after the user sets safety.allow_unsafe to
true at a terminal (canair config set
safety.allow_unsafe true)
--force Ask a session already holding the connection to
release it, then wait for it
examples:
canair io IGPM Interactive TUI (navigate + toggle)
canair io IGPM --poll TUI with background status polling enabled
canair io IGPM --json List all IGPM IOControl DIDs (offline JSON)
canair io IGPM --did BC01 Turn on low beam (asks first; hold until Ctrl+C)
canair io IGPM --did BC01 --off
canair io IGPM --did BC01 -y Skip the question (scripts)