Device registry support
The device registry gives the device integration stack a shared description of supported Logitech hardware. It identifies receiver families and their wire protocols, links standalone devices to their driver and asset models, maps connected device model IDs to known product metadata, and supplies names for supported cameras that lack USB product strings. A runtime channel registry then maps those known routes to open HID++ connections. It does not replace live probing; it tells the stack how to classify and reach hardware before the device reports its current features.
Registry role
The registry keeps hardware facts that must stay consistent between discovery, routing, protocol handling, and presentation. The device integration stack uses these facts to choose a receiver path or a standalone path, then uses a live device probe to learn current capabilities. See device integration for the wider stack.
Shared hardware identity
The crates/…/lib.rs package is the common identity layer for the device stack. It keeps USB and HID identities separate from product families, protocol families, driver families, and asset model IDs. Its identity modules also provide names for UVC cameras whose USB descriptors do not name the product. This separation lets a receiver's marketed name describe the product while its protocol field selects the code path that can communicate with it.
The registry is deliberately a fact source rather than a capability source. A known product can still expose different controls by firmware, transport, or connection state. The device domain confirms those controls through a live HID++ feature probe or trusted last-known state.
The runtime channel registry has a different role. It keeps the open HID++ connections that the device domain publishes for exact device routes. It links a route to a usable connection after hardware discovery, while the static registry supplies the hardware facts used to create that route.
References: crates/…/lib.rs• L1-21 crates/…/registry.rs• L218-235 crates/…/probe.rs• L307-365 crates/…/mappings.rs• L72-92
Unnamed camera identity
Camera support fills a naming gap for UVC cameras that do not provide a USB product string. The registry matches the complete vendor and product identity and returns the marketed name; cameras that already report a product string stay on the operating system's normal naming path.
This lookup supplies product identity only. It does not describe camera controls or replace the live device information supplied by the host and device layers.
References: crates/…/camera.rs• L1-11 crates/…/camera.rs• L15-52 crates/…/lib.rs• L14-21
Receiver identity lookup
Receiver lookup matches the complete USB vendor and product identity. A match returns both the marketed receiver family and the protocol family used for receiver discovery, pairing, and slot access. This keeps Nano and Lightspeed names distinct even when they use the Unifying protocol path.
The lookup result guides the rest of the flow:
- Bolt receivers use Bolt receiver handling.
- Unifying, Nano, and protocol-compatible Lightspeed receivers use the Unifying receiver handling when their descriptor says so.
- An unregistered identity is not treated as a known receiver during detection.
Receiver routes then add the receiver's unique ID and the paired device's slot. A receiver descriptor therefore selects the transport behavior, while the route identifies the particular receiver and peripheral. See Logitech HID++ protocol for the protocol layer and device-domain runtime for route ownership.
References: crates/…/receiver.rs• L5-38 crates/…/receiver.rs• L51-106 crates/…/receiver.rs• L24-32 crates/…/route.rs• L84-112
Standalone device identity
Standalone raw-HID devices use a complete interface identity when their hardware does not use HID++. The Litra descriptors match the vendor, product, usage page, and usage ID together. The G600 uses the same kind of exact collection match for its vendor feature-report interface. Each supported device supplies a stable driver family, a product model, and the asset registry model ID needed for known product presentation.
This path keeps raw-HID devices separate from receiver-backed routes. The device stack can find the correct writer and the desktop can find product art without inventing a HID++ model identity for the device. The G600 is currently exposed for identity as a standalone device; its vendor reports are not yet read or written by this stack.
References: crates/…/litra.rs• L5-42 crates/…/litra.rs• L58-83 crates/…/g600.rs• L1-34 crates/…/lib.rs• L14-21 crates/…/route.rs• L67-80
Supported-device metadata
Supported-device metadata connects a live product identity to shared product information. The asset index groups one product depot under a primary model ID and may list more IDs for other transports or hardware revisions. The same depot can then provide a display name, product kind, images, and interaction metadata for each matching device.
Model ID candidates
The asset registry treats the primary model ID as the canonical value and keeps additional model IDs as aliases for the same product depot. Lookup checks all listed IDs in order and ignores case. Older index entries that have no alias list still work through their primary ID.
This matters when a product reports one model ID over Bluetooth and another through a receiver. The registry resolves both identities to one product record instead of creating separate product views.
References: crates/…/index.rs• L1-27 crates/…/index.rs• L46-62 crates/…/index.rs• L88-101 crates/…/index.rs• L130-171
Product metadata
Each asset entry supplies the product facts needed by the presentation layer: a display name, a broad device kind, a depot location, and the files that belong to that depot. The manifest adds per-variant image resources. Hotspot metadata adds image size and optional control markers for device views.
The metadata supports presentation and interaction hints. It does not define whether a device can perform an operation. The live feature set remains the authority for controls, while the registry kind can provide only a coarse identity or offline fallback.
References: crates/…/index.rs• L40-69 crates/…/manifest.rs• L42-63 crates/…/metadata.rs• L48-86 crates/…/mappings.rs• L72-92
Receiver-oriented asset resolution
Asset resolution starts with the model information reported by the connected HID++ device. It first tries the strict model ID, then a suffix match for transport-specific ID formats, and finally the firmware codename against the registry display name. This order favors exact hardware identity while still supporting older or incomplete registry data.
The resolved depot supplies the desktop with a stable product name and the matching render and metadata. A standalone device skips HID++ model construction and uses its descriptor's registry model ID for the same asset lookup. See HID device discovery for how host interfaces become device candidates.
References: crates/…/assets.rs• L253-270 crates/…/assets.rs• L511-560 crates/…/sync.rs• L111-143 crates/…/litra.rs• L25-42
Integration flow
The registry sits between host discovery and device-domain work. It turns a host identity into a known hardware classification, while the device domain adds live identity, receiver slot state, routes, current channels, and current capabilities.
The diagram shows how receiver, standalone, and unnamed-camera identities reach the shared device integration paths.
flowchart LR
A[Host HID or UVC identity] --> B{Registry lookup}
B -->|Known receiver| C[Brand and protocol]
C --> D[Receiver discovery]
D --> E[Receiver ID and slot route]
E --> F[Runtime channel registry]
B -->|Known standalone device| G[Driver and asset model]
G --> H[Raw-HID route]
B -->|Unnamed camera| I[Product name]
F --> J[Live device probe]
H --> K[Known product metadata]
J --> L[Current inventory and capabilities]
L --> M[Device controls and sessions]
I --> N[Named camera view]
K --> O[Product view]
N --> O
Discovery and routing
Host discovery supplies USB and HID identities. The registry recognizes supported receiver identities and selects the receiver protocol before the HID++ layer reads receiver information. The device domain then combines that receiver identity with a pairing slot, or uses a direct-device identity when no receiver is involved.
The resulting route is the stable address used by inventory, controls, pairing, and sessions. This lets those features share one view of a device even when the device sits behind a receiver. The device-domain runtime page describes the later inventory and route lifecycle.
References: crates/…/receiver.rs• L10-32 crates/…/route.rs• L29-105 crates/…/route.rs• L167-210 crates/…/probe.rs• L307-365
Channel publication and route lookup
After the device domain opens a HID++ connection, the runtime channel registry publishes that connection for one or more exact routes. A receiver connection can serve several paired slots. A lookup therefore uses the complete receiver identity and slot, or the complete direct-device identity, rather than a partial product match.
The registry keeps one current winner when multiple live nodes publish the same route. The first live owner keeps priority until removal, while replacement of that owner's connection preserves its place. Subscribers receive a change signal and then read the registry again; the signal carries no route data.
A session can also learn why an earlier channel is no longer usable. The route can remain current, a receiver slot can be temporarily offline while the receiver connection remains, or the connection can be retired. Capture can report a dead direct connection so inventory retires it without waiting through more probe timeouts. Receiver channels are not reported this way because one channel serves several slots.
References: crates/…/registry.rs• L218-235 crates/…/registry.rs• L264-303 crates/…/registry.rs• L305-391
Product information delivery
After inventory identifies a device, the asset service uses its model ID or standalone registry model ID to load the matching product record. The record supplies display information and optional images or control markers to the desktop. The device agent remains the owner of hardware I/O, so the desktop consumes this information as product context rather than using it to open hardware channels.
This split keeps product metadata useful when a device is offline or only partly probed. It also prevents a stale product record from claiming that a control is available when the current device feature set does not support it.
References: crates/…/assets.rs• L230-270 crates/…/assets.rs• L399-416 crates/…/assets.rs• L455-466 crates/…/cache.rs• L155-198
Change checklist
When these files or sections are changed, remember to consider these:
- Keep each receiver's USB identity, marketed brand, and protocol assignment aligned. A new PID needs both recognition and the correct receiver path.
- Keep every transport or hardware-revision model ID in the same asset depot when the product is shared. Update strict, suffix, and name fallback assumptions when ID formats change.
- Keep standalone descriptor identity fields aligned with the driver family and asset model ID. A partial raw-HID match can select the wrong writer or product view.
- Keep each standalone device's complete HID collection identity aligned with its route and driver contract. A new collection for the same product may be a different function rather than another device entry.
- Keep unnamed-camera entries limited to devices without USB product strings. A self-naming camera should keep the operating system's own product name.
- Keep asset manifest variant IDs aligned with the model IDs used by the index. A mismatch can show the base image while the device has a known color or hardware variant.
- Keep registry kind mapping separate from live capability checks. A kind change must not become a new control gate.
- Keep receiver route selection aligned with protocol detection and receiver unique-ID lookup. A route must not address a receiver through the wrong protocol or physical receiver.
- Keep channel publications aligned with exact routes and current OS nodes. A receiver publication must cover every slot it owns, while a direct publication must not outlive its node.
- Preserve the distinction between a temporarily offline receiver slot and a retired channel. Sessions use that distinction to decide whether they can wait for the route to return.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A receiver PID is missing from the registry | The HID++ layer cannot recognize the receiver or select its normal protocol path | Add the exact vendor/product identity and verify its protocol behavior before listing it |
| Receiver brand is used as the protocol | Nano or Lightspeed hardware can enter the wrong receiver flow | Store and consume brand and protocol as separate facts |
| A product's secondary transport ID is missing | One transport falls back to generic art or appears as an unknown product | List all model IDs that map to the shared depot |
| Strict model matching fails and fallback matching is removed | Older or transport-specific firmware names lose product metadata | Preserve suffix and exact codename fallback order |
| A Litra or G600 match omits its usage page or usage ID | A sibling HID collection can receive raw output reports or the device can remain undiscovered | Match the complete vendor, product, usage-page, and usage-ID tuple |
| An unnamed camera identity is missing or incomplete | An older camera appears under an OS-generated generic name | Match the complete vendor and product identity and list only cameras without product strings |
| Registry kind is treated as current capability | The UI can hide a supported control or show a control the device cannot use | Use the live feature set or trusted last-good capability data |
| A route is matched without its full receiver ID, slot, or direct identity | A session can use another device's channel or lose access to its own channel | Use exact DeviceRoute lookup and keep publication ownership tied to the OS node |
| A dead direct channel remains published | Capture repeatedly reuses a silent connection and waits through probe timeouts | Report the current direct channel as dead and let inventory retire it |
| A receiver slot is treated as a dead receiver channel | Other paired devices lose a usable shared connection | Apply dead-channel reporting only to direct routes |
Key files
| File | Why to read it |
|---|---|
| crates/…/lib.rs | Defines the shared hardware identity boundary and exports supported identity groups. |
| crates/…/camera.rs | Defines names for UVC cameras that do not report a product string. |
| crates/…/receiver.rs | Lists supported receiver identities and their protocol mapping. |
| crates/…/litra.rs | Links standalone Litra interfaces to driver and asset identities. |
| crates/…/g600.rs | Identifies the G600's vendor feature-report collection as a standalone device. |
| crates/…/index.rs | Defines supported product metadata and model-ID lookup. |
| crates/…/manifest.rs | Defines product image variants within an asset depot. |
| crates/…/metadata.rs | Defines image dimensions and optional control markers. |
| crates/…/assets.rs | Shows how live and standalone identities resolve to product metadata. |
| crates/…/route.rs | Shows how registry protocol facts become receiver, direct, or raw-HID routes. |
| crates/…/receiver.rs | Shows how receiver lookup selects Bolt or Unifying handling. |
| crates/…/registry.rs | Shows how open HID++ channels are published, selected by exact route, and retired. |
| crates/…/probe.rs | Shows where registry classification meets live device probing. |