111 return "tx_discover";
113 return "wait_discover_response";
115 return "tx_discover_confirm";
117 return "wait_discover_confirm";
119 return "tx_key_init";
121 return "wait_key_challenge";
123 return "tx_key_transfer";
125 return "wait_key_confirm";
127 return "verify_key_held";
129 return "tx_key_pull";
131 return "wait_key_pull_reply";
133 return "verify_pulled_key";
135 return "scan_pulled_key";
137 return "register_device";
DiscoverConfirmResult
What PairingEngine::run_discover_confirm_step_() actually observed.
@ ERROR_REPLY
The device answered with CMD_ERROR_RESP.
@ SKIPPED
pairing_discover_confirm tuning mode is skip — no 0x2C was sent.
@ NO_REPLY
Every try was silent (or every transmit failed).
@ ACKED
The device answered with CMD_DISCOVER_CONFIRM_ACK (0x2D).
PairingState
State machine for the three‑phase pairing flow.
@ REGISTER_DEVICE
Registering device in the runtime registry for the current boot.
@ TX_DISCOVER
Discovery broadcast (0x28) sent; awaiting device response.
@ WAIT_KEY_PULL_REPLY
Waiting for the device's key transfer (0x32) in answer to our 0x38.
@ TX_KEY_PULL
Key transfer request (0x38) sent: pairing_key_transfer: pull.
@ WAIT_DISCOVER_RESPONSE
Listening for discovery response (0x29) from a device in pairing mode.
@ COMPLETE
Pairing completed successfully; device ready for use.
@ TX_DISCOVER_CONFIRM
Discovery-confirm (0x2C) sent to the discovered device.
@ WAIT_KEY_CHALLENGE
Waiting for challenge (0x3C) from device as part of key transfer.
@ WAIT_KEY_CONFIRM
Waiting for key‑confirm (0x33) from device (key receipt acknowledgement).
@ VERIFY_KEY_HELD
Key exchange unconfirmed: checking with an authenticated read whether the device took our key anyway.
@ SCAN_PULLED_KEY
Roll-call under the pulled key: finding the devices that hold it.
@ VERIFY_PULLED_KEY
Challenging the device to prove it holds the key it sent.
@ TX_KEY_INIT
Key‑init (0x31) sent to the discovered device.
@ TX_KEY_TRANSFER
Key‑transfer (0x32) sent with encrypted system key.
@ IDLE
No pairing in progress; idle state.
@ FAILED
Pairing failed (timeout, radio error, or protocol violation).
@ WAIT_DISCOVER_CONFIRM
Listening for the device's discovery-confirm ack (0x2D).
@ FAILED
No usable reply; the device may never have heard the request.
const char * pairing_stage_name(pairing::PairingState state)
Get a short, log/telemetry-friendly name for a pairing state.
IO-Homecontrol device-type model, capabilities and runtime device state.
IO-Homecontrol 2W frame container: control bytes, IoFrame and (de)serialization.
Radio abstraction layer for IO-Homecontrol.
Runtime state of a paired IO‑Homecontrol device.
Parsed IO‑Homecontrol frame (CTRL0/1 + addresses + command + data).
Raw packet received from the radio.
Context object that lives for the duration of a single pairing attempt.
uint8_t discovery_manufacturer
Manufacturer byte of the discovery reply; 0 when it carried none.
bool saw_key_challenge
True once the device challenged our key-init this attempt.
IoFrame req
Outbound frame buffer (reused across all phases).
bool discovery_low_power
True when discovery reported POWER_SAVE_LOW_POWER.
bool has_pulled_key
True once a pull produced a different key the device proved.
PairingState state
Current state machine state.
IoFrame resp
Inbound frame buffer (holds key‑confirm response).
RadioRxPacket packet
Raw radio capture for the current phase.
IoDevice device
Resolved device metadata after discovery (node_id, type, subtype, etc.).
uint8_t key_refusal_code
That CMD_ERROR_RESP byte; only meaningful if key_refused.
uint8_t pulled_key[AES_KEY_SIZE]
That key. Key material: never logged outside the pull report.
IoFrame key_init
Key‑init frame retained for key‑transfer IV derivation.
std::string device_id
Hex string representation of the paired node ID.
bool key_refused
True once the device answered the key step with CMD_ERROR_RESP.
bool discovery_metadata_complete
True when discovery carried type/subtype bytes.
IoFrame rx
Raw RX frame during waiting phases (discovery, challenge, confirm).