AprilNEA/OpenLogi · error

SmartShift sensitivity write not applied: requested

Error message

SmartShift sensitivity write not applied: requested {n}, device reports {}

What it means

This error is raised by the SmartShift hardware diagnostic in openlogi-cli after it writes a new sensitivity (auto-disengage) value to the device and then reads it back. It means the read-back value does not match the requested value, i.e. the HID++ write was accepted by the transport but the device did not actually apply (or persist/reflect) the new sensitivity. The library throws it so the diagnostic fails loudly instead of reporting success on a silent write failure.

Solutions

  1. Re-read the device's supported sensitivity range and clamp the requested value to it before writing.
  2. Verify the HID route targets the correct device (receiver vs direct connection) and retry the diagnostic.
  3. Update device firmware / check whether the model fully implements the SmartShift sensitivity feature.
  4. Retry the write — a flaky wireless link can drop the set command while reads still succeed.

Example fix

// before
anyhow::bail!(
    "SmartShift sensitivity write not applied: requested {n}, device reports {}",
    after.auto_disengage
);
// after
let clamped = requested.clamp(min_supported, max_supported);
if after.auto_disengage != clamped {
    anyhow::bail!(
        "SmartShift sensitivity write not applied: requested {clamped}, device reports {}",
        after.auto_disengage
    );
}
Defensive patterns

Strategy: validation

Validate before calling

// Clamp to the device's supported sensitivity range before writing
let range = device.smartshift_sensitivity_range(); // e.g. 1..=9
let requested = requested.clamp(*range.start(), *range.end());
if requested != original_request {
    eprintln!("clamping sensitivity {original_request} -> {requested}");
}

Try / catch

match diag_result {
    Err(e) if e.to_string().contains("sensitivity write not applied") => {
        // retry once, then fall back to reporting the device's current value
        eprintln!("write not applied: {e}; retrying...");
    }
    Err(e) => return Err(e),
    Ok(report) => println!("applied: {report:?}"),
}

Prevention

When it happens

Trigger: Running the SmartShift diagnostic (`openlogi` smartshift diag) with a requested sensitivity `n`, where the subsequent read-back (`after.auto_disengage`) differs from `requested` — e.g. the device rejected the value, clamped it, the write targeted the wrong feature register, or the device firmware does not support the requested sensitivity range.

Common situations: Device firmware silently clamping sensitivity to its supported range; writing to a device that only partially implements the SmartShift/relevant HID++ feature; a stale HID route pointing at the wrong device or a receiver vs direct-connection mismatch; flaky wireless link dropping the set-command.

Related errors


AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13). Data as JSON: /api/errors/a74f23d024655f99. Report an issue: GitHub.

Appendix: source

Thrown at crates/openlogi-cli/src/cmd/diag/smartshift.rs:57

        let requested = SmartShiftAutoDisengage::from(n);
        let before = openlogi_hid::get_smartshift_status(&route)
            .await
            .context("read SmartShift status")?;
        println!(
            "  current: mode={:?} sensitivity={}",
            before.mode, before.auto_disengage
        );

        let after = openlogi_hid::set_smartshift_sensitivity(&route, requested)
            .await
            .context("set SmartShift sensitivity")?;
        println!(
            "  read-back: mode={:?} sensitivity={}",
            after.mode, after.auto_disengage
        );

        if after.auto_disengage != requested {
            anyhow::bail!(
                "SmartShift sensitivity write not applied: requested {n}, device reports {}",
                after.auto_disengage
            );
        }
        if after.mode != before.mode {
            anyhow::bail!(
                "SmartShift mode changed unexpectedly: was {:?}, now {:?}",
                before.mode,
                after.mode
            );
        }

        println!(
            "✓ SmartShift sensitivity set to {n} (mode {:?} preserved)",
            after.mode
        );
        return Ok(());
    }

View on GitHub (pinned to e846e6f4b4)