OpenLogi

0x1815 · hostsInfo

适用于 Bolt/BLE/eQuad 设备的完整多主机管理——枚举槽位、查询配对状态与总线类型并读取原始传输描述符。

适用于可同时与多台主机配对的 Bolt / BLE / eQuad 设备的多主机管理功能。getFeatureInfo(function 0)返回主机槽总数、当前活跃槽以及两个能力位掩码。getHostInfo(function 1)查询任意槽的配对状态、总线类型与友好名称元数据。getHostDescriptor(function 2)读取该槽传输连接的原始描述符中的单页内容。

  • HostIndex——Current(设备自选,线缆值 0xFF)或 Slot(n)(零起始)。
  • HostSlotStatus——EmptyPaired
  • HostBusType——EquadUsbBtBleBlePro(Logi Bolt)或 Undefined
  • HostsInfoCapabilities——位标志,表明设备对 GET_NAMESET_NAMEMOVE_HOSTDELETE_HOSTSET_OS_VERSION 的支持情况。
  • HostDescriptorCapabilities——支持的描述符系列位标志:EQUADUSBBTBLE

规格: Logitech HID++ 2.0 —— hostsInfo用于: openlogi-hidpp 中的类型化封装。

Function reference

The HostsInfoFeature wrapper (0x1815) exposes:

Methods

FunctionHID++ fnSignatureReturns
get_feature_info0()HostsInfoFeatureInfo
get_host_info1(host: HostIndex)HostInfo
get_host_descriptor2(host: HostIndex, page: u8)HostDescriptorPage

All methods are async and return Result<…, Hidpp20Error>.

Types

HostsInfoFeatureInfo

Static information about the HostsInfo feature.

FieldTypeDescription
capabilitiesHostsInfoCapabilitiesHost-management capabilities.
descriptor_capabilitiesHostDescriptorCapabilitiesHost descriptor capabilities.
host_countu8Number of host slots.
current_hostHostIndexCurrent host slot index.

HostInfo

Information about one host slot.

FieldTypeDescription
host_indexHostIndexHost slot index returned by the device.
statusHostSlotStatusPairing status.
bus_typeHostBusTypeBus type used by this host slot.
page_countu8Number of descriptor pages.
name_lenu8Current friendly-name length.
name_max_lenu8Maximum friendly-name length.

HostDescriptorPage

Raw host descriptor page.

FieldTypeDescription
host_indexHostIndexHost slot index returned by the device.
bus_typeHostBusTypeDescriptor bus type, decoded from the page header when known.
page_indexu8Descriptor page index, decoded from the page header.
body[u8; 14]Raw descriptor body bytes.

HostIndex

A host slot selector.

VariantValueDescription
Current0xFFThe host slot currently selected by the device.
Slot(u8)0–254A zero-based host slot index.

HostSlotStatus

Pairing status for a host slot.

VariantValueDescription
Empty0The host slot is empty.
Paired1The host slot is paired.

HostBusType

Bus type associated with a host slot.

VariantValueDescription
Undefined0Undefined or unknown bus type.
Equad1eQuad wireless.
Usb2USB.
Bt3Bluetooth classic.
Ble4Bluetooth Low Energy.
BlePro5BLE Pro / Logi Bolt.

HostsInfoCapabilities

Host-management capabilities.

FlagBit/ValueDescription
GET_NAME1 << 0Host names can be read.
SET_NAME1 << 1Host names can be written.
MOVE_HOST1 << 2Host slots can be moved.
DELETE_HOST1 << 3Host slots can be deleted.
SET_OS_VERSION1 << 4Host OS versions can be written.

HostDescriptorCapabilities

Supported host descriptor families.

FlagBit/ValueDescription
EQUAD1 << 0eQuad host descriptors are available.
USB1 << 1USB host descriptors are available.
BT1 << 2Bluetooth classic host descriptors are available.
BLE1 << 3Bluetooth Low Energy host descriptors are available.

Wire format

All three functions use a 3-byte request payload and return a 16-byte long response payload (accessed via extend_payload()).

get_feature_info (fn 0)

Request: [0x00, 0x00, 0x00] (no parameters)

Response (byte → field):

ByteFieldNotes
0capabilitiesHostsInfoCapabilities bitflags (GET_NAME=bit 0, SET_NAME=bit 1, MOVE_HOST=bit 2, DELETE_HOST=bit 3, SET_OS_VERSION=bit 4)
1descriptor_capabilitiesHostDescriptorCapabilities bitflags (EQUAD=bit 0, USB=bit 1, BT=bit 2, BLE=bit 3)
2host_countTotal number of host slots
3current_host0xFFHostIndex::Current; any other value → HostIndex::Slot(n)

get_host_info (fn 1)

Request: [host, 0x00, 0x00] — byte 0 = HostIndex as u8 (0xFF for Current, slot index otherwise)

Response (byte → field):

ByteFieldNotes
0host_indexEcho of the addressed slot (0xFFHostIndex::Current)
1statusHostSlotStatus0 = Empty, 1 = Paired
2bus_typeHostBusType0=Undefined, 1=Equad, 2=Usb, 3=Bt, 4=Ble, 5=BlePro
3page_countNumber of descriptor pages
4name_lenCurrent friendly-name length in bytes
5name_max_lenMaximum friendly-name length in bytes

get_host_descriptor (fn 2)

Request: [host, page, 0x00] — byte 0 = HostIndex as u8, byte 1 = descriptor page index

Response (byte → field):

ByteFieldNotes
0host_indexEcho of the addressed slot
1page headerBits 7–4 (>> 4) = bus_type (HostBusType); bits 3–0 (& 0x0F) = page_index
2–15body14 raw descriptor bytes (payload[2..16])

Usage (Rust)

use hidpp::{device::Device, feature::hosts_info::{HostsInfoFeature, HostIndex}};

// mut device: Device, already created via Device::new(channel, index)
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<HostsInfoFeature>() {
    let info = feat.get_feature_info().await?;
    println!("slots: {}, current: {:?}", info.host_count, info.current_host);

    for slot in 0..info.host_count {
        let host = feat.get_host_info(HostIndex::Slot(slot)).await?;
        println!("slot {slot}: {:?} via {:?}", host.status, host.bus_type);

        for page in 0..host.page_count {
            let desc = feat.get_host_descriptor(HostIndex::Slot(slot), page).await?;
            println!("  page {}: bus={:?} body={:?}", desc.page_index, desc.bus_type, desc.body);
        }
    }
}

本页目录