AprilNEA/OpenLogi · error
target is not in the device-reported DPI list ( )
Error message
target {target} is not in the device-reported DPI list ({}) What it means
Input validation in `openlogi diag dpi`: the --target DPI value passed by the user is rejected because it is not among the DPI values the device itself reports through its HID++ AdjustableDpi/ExtendedAdjustableDpi feature. Only device-advertised values are valid write targets, and the message includes the full supported list (or a range summary) so the user can pick a valid one. This is a pre-write guard, not a hardware failure.
Solutions
- Re-run with a --target value taken from the printed supported DPI list, e.g. --target 1600
- Omit --target entirely and let the diagnostic pick an adjacent supported value automatically
- If the intended value seems like it should be supported, confirm the device's actual capability list — some firmware advertises only a sparse set of steps
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/openlogi-cli/src/cmd/diag/dpi.rs:42 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13).
Data as JSON: /api/errors/00c11322de8ea67f.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/diag/dpi.rs:42
pub async fn run(args: DpiArgs) -> Result<()> {
// 0x2201 AdjustableDpi / 0x2202 ExtendedAdjustableDpi — auto-skip devices
// (keyboards) that expose neither. Newer mice ship only 0x2202.
let (route, name) = select_device(args.device.as_deref(), &[0x2201, 0x2202]).await?;
println!("device: {name} ({route})");
let info = openlogi_hid::get_dpi_info(&route)
.await
.context("read DPI capabilities")?;
let before = info.current;
println!(" current DPI: {before}");
println!(" supported DPI: {}", DpiSummaryDisplay(&info.capabilities));
let target = match args.target {
Some(target) => {
let target = target.into();
if !info.capabilities.contains(target) {
anyhow::bail!(
"target {target} is not in the device-reported DPI list ({})",
DpiSummaryDisplay(&info.capabilities)
);
}
target
}
None => info
.capabilities
.adjacent_test_target(before)
.context("device reports fewer than two DPI values; pass --target to choose one")?,
};
if target == before {
println!(
" target {target} equals current — pick a different --target to exercise the write"
);
return Ok(());
}
View on GitHub (pinned to e846e6f4b4)