0x0005 · deviceTypeAndName
Read a device marketing type and marketing name, including names returned in short or long chunks.
deviceTypeAndName reports a marketing type and a marketing name. The name is read in chunks. A caller first reads the reported count, then requests consecutive indexes until it has the full string.
Spec: Logitech HID++ 2.0 — x0005 deviceTypeAndName (v2). Cross-checked: Logi Options+ 2.8 (static analysis). Used by: Supported devices.
Function reference
The DeviceTypeAndNameFeature wrapper implements feature version 0.
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_device_name_count | 0 | () | u8 |
get_device_name | 1 | (index: u8) | Vec<u8> |
get_whole_device_name | convenience | () | String |
get_device_type | 2 | () | DeviceType |
All methods are asynchronous and return Result<…, Hidpp20Error>. get_whole_device_name calls fn 0 once, then fn 1 until the assembled string reaches the reported count.
Types
DeviceType
| Variant | Value | Description |
|---|---|---|
Keyboard | 0 | Keyboard. |
RemoteControl | 1 | Remote control. |
Numpad | 2 | Numeric keypad. |
Mouse | 3 | Mouse. |
Trackpad | 4 | Trackpad. |
Trackball | 5 | Trackball. |
Presenter | 6 | Presenter. |
Receiver | 7 | Receiver. |
Headset | 8 | Headset. |
Webcam | 9 | Webcam. |
SteeringWheel | 10 | Steering wheel. |
Joystick | 11 | Joystick. |
Gamepad | 12 | Gamepad. |
Dock | 13 | Dock. |
Speaker | 14 | Speaker. |
Microphone | 15 | Microphone. |
IlluminationLight | 16 | Illumination light. |
ProgrammableController | 17 | Programmable controller. |
CarSimPedals | 18 | Car-simulator pedals. |
Adapter | 19 | Adapter. |
An unknown type byte returns Hidpp20Error::UnsupportedResponse.
Events
This feature does not define events.
Wire format
All requests use a 3-byte short payload.
get_device_name_count (fn 0)
Request: [0x00, 0x00, 0x00]
| Byte | Field | Notes |
|---|---|---|
| 0 | count | Reported marketing-name count. |
| 1–15 | trailing payload | OpenLogi ignores these bytes after extend_payload(). |
get_device_name (fn 1)
Request: [index, 0x00, 0x00]
| Byte | Field | Notes |
|---|---|---|
| 0 | index | Name offset at which the chunk starts. |
| 1–2 | reserved | OpenLogi writes 0x00. |
The response is the raw report payload. OpenLogi returns all 3 payload bytes from a short reply or all 16 payload bytes from a long reply. It does not zero-extend this function's Vec<u8>.
get_whole_device_name decodes each chunk as UTF-8, appends it, and uses the assembled string length as the next index. It removes trailing NUL characters after the final chunk.
get_device_type (fn 2)
Request: [0x00, 0x00, 0x00]
| Byte | Field | Notes |
|---|---|---|
| 0 | device_type | DeviceType discriminant. |
| 1–15 | trailing payload | OpenLogi ignores these bytes after extend_payload(). |
How OpenLogi uses it
Inventory probing calls this feature after it enumerates the feature table. It reads the marketing type and name independently. A failed read leaves only that property unavailable.
OpenLogi maps DeviceType to its device kind. The type is the authoritative kind signal. The marketing name helps when an operating system reports a generic HID collection name, such as Mouse on Windows Bluetooth.
When a fresh probe lacks a type or marketing name, cache backfill keeps the prior value. This feature has no setters, so it does not use read-modify-write or restore device state.
Usage (Rust)
use hidpp::{
device::Device,
feature::device_type_and_name::DeviceTypeAndNameFeature,
protocol::v20::Hidpp20Error,
};
async fn read_marketing_identity(device: &mut Device) -> Result<(), Hidpp20Error> {
device.enumerate_features().await?;
let Some(feature) = device.get_feature::<DeviceTypeAndNameFeature>() else {
return Ok(());
};
println!("type: {:?}", feature.get_device_type().await?);
println!("name: {}", feature.get_whole_device_name().await?);
Ok(())
}