From 393b017ddfa817e609347a72f6c32d17c8171e3c Mon Sep 17 00:00:00 2001 From: Fabrice Bellamy Date: Tue, 20 Jan 2026 16:59:54 +0100 Subject: [PATCH] format firmware version as major.minor and do not use AAGUID as serial number because it is too long and already displayed somwhere else --- src-tauri/src/fido/mod.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/fido/mod.rs b/src-tauri/src/fido/mod.rs index 156897d..1e10359 100644 --- a/src-tauri/src/fido/mod.rs +++ b/src-tauri/src/fido/mod.rs @@ -37,7 +37,11 @@ pub(crate) fn get_fido_info() -> Result { max_msg_size: info.max_msg_size, pin_protocols: info.pin_uv_auth_protocols, min_pin_length: info.min_pin_length, - firmware_version: format!("0x{:X}", info.firmware_version), + firmware_version: format!( + "{}.{}", + (info.firmware_version >> 8) & 0xFF, + info.firmware_version & 0xFF + ), }) } @@ -188,7 +192,7 @@ pub fn read_device_details() -> Result { m.get(&Value::Integer(0x0E)) .and_then(|v| { if let Value::Integer(i) = v { - Some(format!("0x{:X}", i)) + Some(format!("{}.{}", (i >> 8) & 0xFF, i & 0xFF)) } else { None } @@ -317,7 +321,7 @@ pub fn read_device_details() -> Result { Ok(FullDeviceStatus { info: DeviceInfo { - serial: aaguid_str, // Using AAGUID as serial since unique serial isn't available + serial: "?".to_string(), // Serial number is not available through fido. Previous code was using AAGUID as serial but it is too long to display in place of serial it is already displayed somewhere else. flash_used: used / 1024, flash_total: total / 1024, firmware_version: fw_version,