Skip to main content

Module pairing

Module pairing 

Source
Expand description

Wireless device pairing for Logi Bolt and Unifying receivers.

The published hidpp 0.2 can only read existing pairings, and its BoltReceiver is closed to extension. So OpenLogi drives the receiver’s HID++ 1.0 registers directly over the public HidppChannel primitives, the same way crate::write and crate::session::gesture bypass the crate’s higher-level abstractions.

The register layout and notification framing below are reverse engineered from Solaar (the authoritative open-source reference) and cross-checked against hidpp 0.2’s own 0x41 device-connection parser. Two families, two flows:

  • Bolt (046d:c548): open discovery → the receiver streams nearby unpaired devices → pick one → pair by its BTLE address → the device shows a passkey the user types (keyboard) or clicks (pointer) → success carries the assigned slot.
  • Unifying (046d:c52b, 046d:c532): open a pairing lock; the next powered-on unpaired device in range links on its own. No discovery list, no passkey.

Drive a session with run_pairing: it streams PairingEvents out and takes PairingCommands in (the Bolt device pick / cancel). unpair removes a slot; list_pairing_receivers reports what’s connectable.

Structs§

DiscoveredDevice
A nearby unpaired device surfaced by Bolt discovery.
PairingReceiver
A pairing-capable receiver currently connected to the host.

Enums§

BoltDeviceKind
Represents the kind of a device paired to a Bolt receiver.
Click
A single click in a pointer passkey sequence.
PairingCommand
Commands fed into a pairing session.
PairingError
Errors raised by pairing operations.
PairingEvent
Events streamed out of a pairing session.
PasskeyMethod
How the user authenticates the device during Bolt pairing.
ReceiverFamily
Receiver pairing family. Each uses a different register flow.
ReceiverSelector
Selects which receiver a pairing operation targets.

Functions§

list_pairing_receivers
Lists supported pairing-capable receivers connected to the host.
run_pairing
Runs a pairing session against target, streaming PairingEvents to events and consuming PairingCommands from commands. Returns when the flow finishes (paired, failed, cancelled, or timed out).
unpair
Removes the device on slot from the receiver named by target.