canair search
usage: canair search [-h] <kind> ...
[UDS] Find a string, VIN or byte pattern anywhere in the captures — without already
knowing which ECU and PID holds it.
Choose a domain kind:
uds diagnostic captures (default) — payload bytes, labels, notes
(domain A). A bare `canair search …` is shorthand for this.
With a PATTERN it finds that needle; with none it inventories every
plausible string (part numbers, versions, ECU names). Read-only: searches
captures/ (and, with --defs, the ecus/ identity fields), never talks to the
device.
A first word that names a kind is taken as the kind, so to search for the
text 'uds' itself, end the options first: `canair search -- uds`.
positional arguments:
<kind>
uds Search diagnostic capture payloads, labels and notes (domain A)
options:
-h, --help show this help message and exit
examples:
# which ECU/PID holds this part number (or any substring of it)?
canair search 95400G7470
# list every plausible string in the captures: part numbers, versions, ECU names
canair search
# a regular expression, case-sensitive
canair search --regex 'G[0-9]{4}' --case-sensitive
# anything VIN-shaped, in payloads and in labels/notes
canair search --vin
# a byte pattern, wherever it occurs in any payload
canair search --hex 'DE AD BE EF' --query BMS
# include the decoded identity fields in ecus/, and emit machine-readable output
canair search KMHC --defs --json
# a PATTERN that is also a kind name (or starts with '-') goes after `--`
canair search -- uds
Each payload hit carries a paste-ready `pids upsert-param ... --type ascii` command, so
a string you found can be defined as a signal in one step.
canair search uds
usage: canair search uds [-h] [--regex] [--hex BYTES] [--vin]
[--case-sensitive] [--in {payload,text,all}] [--defs]
[--query QUERY] [--min-len N] [--all-runs]
[--limit N] [--json] [--notation NAME] [--since WHEN]
[--until WHEN] [--date YYYY-MM-DD] [--today]
[--last-sessions [N]] [--last-session]
[--state STATE] [--label SUBSTR]
[PATTERN]
Search every captured payload (and, by default, labels and notes) for a string, VIN or byte pattern; or, with no PATTERN, list every plausible string. Findings are grouped by location (ECU, PID, offset), not by capture, with a hit count and first/last-seen date.
positional arguments:
PATTERN Literal substring, case-insensitive (omit to list
every plausible string)
options:
-h, --help show this help message and exit
--notation NAME byte-index notation for output labels: wican
(default), isotp, torque, bix. Overrides the
display.byte_notation config key.
match:
--regex Treat PATTERN as a regular expression
--hex BYTES Search payloads for a byte pattern instead of text
(e.g. 'DE AD BE EF')
--vin Shortcut for anything VIN-shaped (17 characters, ISO
3779, at least one letter)
--case-sensitive Make a text PATTERN honour case
haystack:
--in {payload,text,all}
Where to look: payload bytes (including the raw
responses scan notes record), free text (labels,
notes, text responses), or all (default). Note that
--label NARROWS to matching sessions, whereas a
PATTERN searches (labels included, by default)
--defs Also search the ecus/ identity fields (part numbers,
serials, versions)
--query QUERY Narrow to ECU/PID selectors in the shared mini-
language (e.g. 'BMS', 'BCM:22F188', 'VCU BMS')
inventory (no PATTERN):
--min-len N Minimum printable run length (default 6)
--all-runs Disable the plausibility filter (raw strings(1)
behaviour — mostly noise: numeric telemetry bytes are
often printable)
output:
--limit N Show at most N findings (default 50; 0 = no cap). A
footer reports any hidden
--json Machine-readable output
scoping:
Restrict to captures within a date/time range (inclusive) and/or by session state (token-matched) or label substring. --since/--until accept a date (YYYY-MM-DD) or a timestamp (YYYY-MM-DD HH:MM[:SS[.ffffff]])
--since WHEN Only captures on or after this date/time (YYYY-MM-DD[
HH:MM:SS])
--until WHEN Only captures on or before this date/time (YYYY-MM-DD[
HH:MM:SS])
--date YYYY-MM-DD Only captures on this exact date (shorthand for
--since X --until X)
--today Only captures recorded today (shorthand for --date
<today>)
--last-sessions [N] Only the most recent N recorded sessions in scope (N
defaults to 1)
--last-session Only the most recent recorded session in scope (alias
for --last-sessions 1)
--state STATE Only captures recorded in STATE, matched by token and
widened by the profile's implies: hierarchy (--state
ready also matches DRIVING). Comma-separate
alternatives (--state ready,driving); repeat the flag
to require several at once (--state charging --state
parked)
--label SUBSTR Only captures whose session/capture label contains
SUBSTR (case-insensitive)
examples:
# which ECU/PID holds this part number (or any substring of it)?
canair search 95400G7470
# list every plausible string in the captures: part numbers, versions, ECU names
canair search
# a regular expression, case-sensitive
canair search --regex 'G[0-9]{4}' --case-sensitive
# anything VIN-shaped, in payloads and in labels/notes
canair search --vin
# a byte pattern, wherever it occurs in any payload
canair search --hex 'DE AD BE EF' --query BMS
# include the decoded identity fields in ecus/, and emit machine-readable output
canair search KMHC --defs --json
# a PATTERN that is also a kind name (or starts with '-') goes after `--`
canair search -- uds
Each payload hit carries a paste-ready `pids upsert-param ... --type ascii` command, so
a string you found can be defined as a signal in one step.