{"record":{"id":"52094191895393f5","repo":"AprilNEA/OpenLogi","slug":"no-wired-direct-usb-logitech-device-found-is-the-keyboard","errorCode":null,"errorMessage":"no wired (direct-USB) Logitech device found — is the keyboard plugged in?","messagePattern":"no wired \\(direct-USB\\) Logitech device found — is the keyboard plugged in\\?","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/diag/lighting.rs","lineNumber":88,"sourceCode":"                    \"{:04x}:{:04x}\",\n                    inv.receiver.vendor_id, inv.receiver.product_id\n                )\n            });\n            if let Some(ref n) = needle\n                && !name.to_lowercase().contains(n.as_str())\n            {\n                return None;\n            }\n            let route = DeviceRoute::Direct {\n                vendor_id: inv.receiver.vendor_id,\n                product_id: inv.receiver.product_id,\n            };\n            Some((route, name))\n        })\n        .ok_or_else(|| match &device_query {\n            Some(q) => anyhow!(\"no wired device matches `--device {q}`\"),\n            None => {\n                anyhow!(\"no wired (direct-USB) Logitech device found — is the keyboard plugged in?\")\n            }\n        })?;\n\n    let method: LightingMethod = args.method.into();\n    println!(\"setting {name} ({route}) to #{r:02x}{g:02x}{b:02x} via {method:?}\");\n    openlogi_hid::set_keyboard_color_with(&route, method, r, g, b).await?;\n    println!(\"done — {name} should now be solid #{r:02x}{g:02x}{b:02x}\");\n    Ok(())\n}\n\n#[cfg(test)]\nmod color_validation_tests {\n    use openlogi_core::color::RgbParseError;\n\n    use super::{LightingArgs, Method, run};\n\n    fn args(color: &str) -> LightingArgs {\n        LightingArgs {","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/diag/lighting.rs#L70-L106","documentation":"The no-query sibling of the wired-device lookup failure in the lighting diagnostic: thrown when no `--device` was supplied and the inventory contains no wired (direct-USB) Logitech device at all. The message hints that the keyboard must be plugged in, since lighting control is direct-USB only.","triggerScenarios":"Running the lighting command without `--device` while every enumerated Logitech device is receiver- or Bluetooth-routed, or while no Logitech device is connected at all.","commonSituations":"Trying to set keyboard RGB on a wireless keyboard connected only via receiver; keyboard unplugged or asleep; running on a machine where the keyboard is an internal laptop keyboard (not a Logitech USB device).","solutions":["Plug the Logitech keyboard into a USB port directly (not via its receiver).","Wake the keyboard (press a key) so it enumerates, then retry.","Confirm with `openlogi list` that a wired Logitech device is visible before running lighting commands.","Use a USB cable to connect wireless- capable boards (e.g. G915) when doing RGB work."],"exampleFix":"// before\n$ openlogi diag lighting --color ff0000\n// error: no wired (direct-USB) Logitech device found...\n// after: connect via USB\n$ openlogi list   # verify wired device appears\n$ openlogi diag lighting --color ff0000","handlingStrategy":"fallback","validationCode":"// bail out early when no wired Logitech device exists\nlet inv = enumerate_inventory().await?;\nif !inv.iter().any(|i| i.is_direct_usb() && i.is_logitech()) {\n    eprintln!(\"no wired Logitech device; connect one via USB before lighting commands\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"// degrade gracefully in scripts: skip lighting when no wired device\nif let Err(e) = run_lighting(args).await {\n    if msg_contains(&e, \"no wired (direct-USB) Logitech device\") {\n        eprintln!(\"skipping lighting step (no wired device)\");\n        return Ok(()); // optional step\n    }\n    return Err(e);\n}","preventionTips":["Keep a USB cable connected to the keyboard when automating lighting.","Gate lighting steps in scripts on a prior successful wired enumeration.","Remember receiver/Bluetooth connections never satisfy lighting commands.","Wake the keyboard first; asleep devices don't enumerate as wired."],"tags":["cli","lighting","usb","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"}