{"record":{"id":"a026be46e157b958","repo":"AprilNEA/OpenLogi","slug":"no-online-hid-device-found-is-a-logi-device-paired-and-awake","errorCode":null,"errorMessage":"no online HID++ device found — is a Logi device paired and awake?","messagePattern":"no online HID\\+\\+ device found — is a Logi device paired and awake\\?","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/diag.rs","lineNumber":85,"sourceCode":"            let route =\n                DeviceRoute::device_route_for(&inv, paired.slot).unwrap_or(DeviceRoute::Direct {\n                    vendor_id: inv.receiver.vendor_id,\n                    product_id: inv.receiver.product_id,\n                });\n            let name = paired\n                .codename\n                .clone()\n                .unwrap_or_else(|| format!(\"Slot {}\", paired.slot));\n            out.push(Candidate { route, name });\n        }\n    }\n    Ok(out)\n}\n\n/// Build a helpful \"couldn't pick a device\" error that lists what *is* online.\nfn no_match_err(devices: &[Candidate], query: Option<&str>) -> anyhow::Error {\n    if devices.is_empty() {\n        return anyhow!(\"no online HID++ device found — is a Logi device paired and awake?\");\n    }\n    let list = devices\n        .iter()\n        .map(|c| format!(\"    - {} ({})\", c.name, c.route))\n        .collect::<Vec<_>>()\n        .join(\"\\n\");\n    match query {\n        Some(q) => anyhow!(\"no online device matches `--device {q}`.\\n  online devices:\\n{list}\"),\n        None => anyhow!(\n            \"could not pick a device automatically.\\n  online devices:\\n{list}\\n  \\\n             pass --device <name> to choose one.\"\n        ),\n    }\n}\n\n/// Pick the device a diag should run against.\n///\n/// Selection order:","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/diag.rs#L67-L103","documentation":"Built by `no_match_err` in the diagnostic command when the enumerated candidate list is completely empty, meaning no HID++ device was online at selection time. The generic wording (with the paired/awake hint) is deliberately used instead of naming a query, because there is nothing to match against. The caller tests `devices.is_empty()` first, so this branch always means zero candidates.","triggerScenarios":"Running any `openlogi` diagnostic subcommand that calls `select_device`/`no_match_err` when device enumeration returns no online candidates — no receiver with a paired device, no Bluetooth-direct device awake, or no wired device present.","commonSituations":"Logitech device powered off or in sleep; receiver not plugged in; Bluetooth mouse/keyboard not connected to the host; device awake but not yet enumerated because it is still initializing after a reconnect.","solutions":["Plug in the Bolt/Unifying receiver or reconnect the device via Bluetooth, and wake it (move the mouse / press a key).","Verify enumeration sees anything at all: run `openlogi list` (it falls back to direct enumeration when no agent is running).","On macOS, confirm Input Monitoring/Accessibility permissions are granted so the HID devices can be opened.","If the device is paired but dormant, press its reset/connect button to wake the radio, then retry."],"exampleFix":"// before: running diagnostics with nothing connected\n$ openlogi diag dpi\n// error: no online HID++ device found — is a Logi device paired and awake?\n// after: connect and verify first\n$ openlogi list   # confirms the device is enumerated\n$ openlogi diag dpi","handlingStrategy":"fallback","validationCode":"// check enumeration before running diagnostics\nlet devices = enumerate_candidates()?;\nif devices.is_empty() {\n    eprintln!(\"no HID++ device online — connect/wake the device first\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match select_device(&devices, query) {\n    Ok(dev) => run_diag(dev),\n    Err(e) if is_no_device_error(&e) => {\n        eprintln!(\"waiting for device...\");\n        wait_for_device(Duration::from_secs(10))?;\n        retry_once()\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Run `openlogi list` to confirm the device is enumerated before diagnostics.","Wake the device (move/press a key) before running scripted commands.","On macOS, grant Input Monitoring/Accessibility so HID devices open.","Add a short wait-and-reenumerate loop in scripts instead of failing immediately."],"tags":["cli","hidpp","device-enumeration"],"backgroundTag":"resource-not-found","analyzedSha":"e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8","analyzedAt":"2026-09-13T03:07:16.451Z","contentChangedAt":"2026-09-13T03:07:16.451Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}