OpenLogi

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

FunctionHID++ fnSignatureReturns
get_device_name_count0()u8
get_device_name1(index: u8)Vec<u8>
get_whole_device_nameconvenience()String
get_device_type2()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

VariantValueDescription
Keyboard0Keyboard.
RemoteControl1Remote control.
Numpad2Numeric keypad.
Mouse3Mouse.
Trackpad4Trackpad.
Trackball5Trackball.
Presenter6Presenter.
Receiver7Receiver.
Headset8Headset.
Webcam9Webcam.
SteeringWheel10Steering wheel.
Joystick11Joystick.
Gamepad12Gamepad.
Dock13Dock.
Speaker14Speaker.
Microphone15Microphone.
IlluminationLight16Illumination light.
ProgrammableController17Programmable controller.
CarSimPedals18Car-simulator pedals.
Adapter19Adapter.

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]

ByteFieldNotes
0countReported marketing-name count.
1–15trailing payloadOpenLogi ignores these bytes after extend_payload().

get_device_name (fn 1)

Request: [index, 0x00, 0x00]

ByteFieldNotes
0indexName offset at which the chunk starts.
1–2reservedOpenLogi 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]

ByteFieldNotes
0device_typeDeviceType discriminant.
1–15trailing payloadOpenLogi 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(())
}

On this page