0x4531 · multiPlatform
Associate each host slot with an OS platform on a multi-host device — query feature capabilities and platform descriptors, and read the platform assigned to any host slot.
The MultiPlatform feature lets a multi-host device associate each of its host slots with a specific OS platform, allowing the firmware to apply per-host key-mapping and behaviour adjustments automatically. getFeatureInfos reports feature capabilities, the number of available platforms and descriptor rows, the host count, and the currently active host slot. getPlatformDescriptor fetches a single descriptor row, which encodes the covered operating systems (OsMask) and the OS-version range the row applies to. getHostPlatform reads the platform currently assigned to a given host slot along with how that selection was made (PlatformSource).
MultiPlatformCapabilities—OS_DETECTION(device can auto-detect the host OS),SET_HOST_PLATFORM(host software may override the selection).OsMask— bitfield covering Windows, WindowsEmbedded, Linux, ChromeOS, Android, macOS, iOS, webOS, and Tizen.PlatformSource—Default,Auto(device-detected),Manual(set on-device), orSoftware(set by host software).
Spec: Logitech HID++ 2.0 — multiPlatform. Used by: Typed wrapper in
openlogi-hidpp.
Function reference
The MultiPlatformFeature wrapper (0x4531) exposes:
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_feature_infos | 0 | () | MultiPlatformInfo |
get_platform_descriptor | 1 | (descriptor_index: u8) | PlatformDescriptor |
get_host_platform | 2 | (host: HostIndex) | HostPlatform |
All methods are async and return Result<…, Hidpp20Error>.
Types
MultiPlatformInfo
Static feature information returned by get_feature_infos.
| Field | Type | Description |
|---|---|---|
capabilities | MultiPlatformCapabilities | Feature capabilities. |
platform_count | u8 | Number of platform IDs. |
descriptor_count | u8 | Number of platform descriptor rows. |
host_count | u8 | Number of host slots. |
current_host | HostIndex | Current host slot. |
current_host_platform | Option<u8> | Platform index selected for the current host. |
MultiPlatformCapabilities
Capabilities reported by MultiPlatform.
| Flag | Bit/Value | Description |
|---|---|---|
OS_DETECTION | 1 << 0 | The device can detect the host OS automatically. |
SET_HOST_PLATFORM | 1 << 1 | Software can set the host platform. |
PlatformDescriptor
A platform descriptor row returned by get_platform_descriptor.
| Field | Type | Description |
|---|---|---|
platform_index | u8 | Platform index this descriptor belongs to. |
descriptor_index | u8 | Descriptor row index. |
os_mask | OsMask | Covered operating systems. |
from_version | u8 | First supported OS major version. |
from_revision | u8 | First supported OS revision. |
to_version | u8 | Last supported OS major version. |
to_revision | u8 | Last supported OS revision. |
OsMask
Operating systems covered by a platform descriptor.
| Flag | Bit/Value | Description |
|---|---|---|
WINDOWS | 1 << 0 | Microsoft Windows. |
WINDOWS_EMBEDDED | 1 << 1 | Windows Embedded. |
LINUX | 1 << 2 | Linux. |
CHROME | 1 << 3 | ChromeOS. |
ANDROID | 1 << 4 | Android. |
MACOS | 1 << 5 | macOS. |
IOS | 1 << 6 | iOS. |
WEBOS | 1 << 7 | webOS. |
TIZEN | 1 << 8 | Tizen. |
HostPlatform
Platform selection for a host slot returned by get_host_platform.
| Field | Type | Description |
|---|---|---|
host_index | HostIndex | Host slot index returned by the device. |
status | u8 | Raw host status byte. |
platform_index | Option<u8> | Selected platform, or None when undefined. |
source | PlatformSource | Source of the platform selection. |
auto_platform_index | Option<u8> | Automatically detected platform, if available. |
auto_descriptor_index | Option<u8> | Automatically matched platform descriptor, if available. |
PlatformSource
Source of a host-platform selection.
| Variant | Value | Description |
|---|---|---|
Default | 0 | Device default. |
Auto | 1 | Automatically detected by the device. |
Manual | 2 | Manually selected on the device. |
Software | 3 | Set by host software. |
HostIndex
A host slot selector (defined in hosts_info).
| Variant | Value | Description |
|---|---|---|
Current | 0xff | The host slot currently selected by the device. |
Slot(u8) | 0–0xfe | A zero-based host slot index. |
Wire format
All three functions use a short 3-byte request payload; responses are read from the 16-byte long payload returned by extend_payload().
get_feature_infos (fn 0)
Request: [0x00, 0x00, 0x00] (no parameters)
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0–1 | capabilities | MultiPlatformCapabilities as big-endian u16 |
| 2 | platform_count | Number of platform IDs |
| 3 | descriptor_count | Number of descriptor rows |
| 4 | host_count | Number of host slots |
| 5 | current_host | HostIndex::from(byte) — 0xff → Current |
| 6 | current_host_platform | 0xff → None; otherwise Some(byte) |
get_platform_descriptor (fn 1)
Request: [descriptor_index, 0x00, 0x00]
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | platform_index | Platform index the descriptor belongs to |
| 1 | descriptor_index | Descriptor row index (echoed back) |
| 2–3 | os_mask | OsMask as big-endian u16 |
| 4 | from_version | First supported OS major version |
| 5 | from_revision | First supported OS revision |
| 6 | to_version | Last supported OS major version |
| 7 | to_revision | Last supported OS revision |
get_host_platform (fn 2)
Request: [u8::from(host), 0x00, 0x00] — HostIndex::Current encodes as 0xff; HostIndex::Slot(n) encodes as n.
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | host_index | HostIndex::from(byte) |
| 1 | status | Raw host status byte |
| 2 | platform_index | 0xff → None; otherwise Some(byte) |
| 3 | source | PlatformSource — 0 = Default, 1 = Auto, 2 = Manual, 3 = Software |
| 4 | auto_platform_index | 0xff → None; otherwise Some(byte) |
| 5 | auto_descriptor_index | 0xff → None; otherwise Some(byte) |
Usage (Rust)
use hidpp::{
device::Device,
feature::multi_platform::{MultiPlatformFeature, OsMask},
feature::hosts_info::HostIndex,
};
// mut device: Device, already created via Device::new(channel, index).await?
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<MultiPlatformFeature>() {
let info = feat.get_feature_infos().await?;
println!("hosts={}, platforms={}", info.host_count, info.platform_count);
// Read the descriptor at index 0
let desc = feat.get_platform_descriptor(0).await?;
println!("os_mask={:?}, versions={}.{}–{}.{}", desc.os_mask,
desc.from_version, desc.from_revision, desc.to_version, desc.to_revision);
// Read the platform for the current host
let hp = feat.get_host_platform(HostIndex::Current).await?;
println!("platform={:?}, source={:?}", hp.platform_index, hp.source);
}