0x1814 · changeHost
Select the active Easy-Switch host channel and manage one persistent cookie byte for each host slot.
changeHost selects the active channel on a multi-host device. It reports the channel count and current zero-based channel. It also reads and writes one persistent cookie byte for each channel. OpenLogi uses this feature for configured Easy-Switch target coordination.
Spec: Logitech HID++ 2.0 — changeHost. Cross-checked: Logi Options+ 2.8 (static analysis), Solaar. Used by: Easy-Switch.
Function reference
ChangeHostFeature implements functions 0–3. The wrapper does not expose function 4 or the unsolicited function-0 report.
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_host_info | 0 | () | ChangeHostInfo |
set_current_host | 1 | (host: u8) | () |
get_cookies | 2 | (host_count: u8) | Vec<u8> |
set_cookie | 3 | (host: u8, cookie: u8) | () |
All methods are async and return Result<…, Hidpp20Error>.
Types
ChangeHostInfo
get_host_info returns the following fields.
| Field | Type | Description |
|---|---|---|
host_count | u8 | Number of available host channels. |
current_host | u8 | Active zero-based host channel. |
capabilities | ChangeHostCapabilities | OpenLogi's typed representation of function-0 byte 2. |
ChangeHostCapabilities
OpenLogi exposes function-0 byte 2 as this bitflag type.
| Flag | Bit/Value | Description |
|---|---|---|
ENHANCED_HOST_SWITCH | 1 << 0 | OpenLogi's name for function-0 flag bit 0. Its relationship to function-4 bit 0 is unverified. |
Events
OpenLogi v0.8.15 exposes no typed ChangeHost event.
| Wire event | HID++ fn | Typed exposure |
|---|---|---|
ChangeHostRequested | 0, unsolicited | Not exposed |
Wire format
Functions 0–3 use a three-byte short request payload. OpenLogi reads replies through extend_payload() when a function has a reply.
get_host_info (fn 0)
Request: [0x00, 0x00, 0x00].
| Byte | Field | Notes |
|---|---|---|
| 0 | host_count | Number of host channels. |
| 1 | current_host | Active zero-based host channel. |
| 2 | flags | Options+ 2.8 calls this field flags. OpenLogi maps it to ChangeHostCapabilities. |
OpenLogi retains unknown bits with from_bits_retain. The evidence does not establish that this byte's bit 0 equals function-4 bit 0.
set_current_host (fn 1)
OpenLogi sends this function with notify, so it does not await a reply.
| Byte | Field | Notes |
|---|---|---|
| 0 | host | Target zero-based host channel. |
| 1–2 | padding | OpenLogi writes 0x00. |
Request: [host, 0x00, 0x00].
get_cookies (fn 2)
Request: [0x00, 0x00, 0x00].
| Byte | Field | Notes |
|---|---|---|
0…host_count - 1 | cookie | One persistent byte for each host channel, in channel order. |
The caller supplies host_count. OpenLogi rejects a reply shorter than that count. Bytes after that count are ignored.
set_cookie (fn 3)
Request: [host, cookie, 0x00].
| Byte | Field | Notes |
|---|---|---|
| 0 | host | Zero-based host channel. |
| 1 | cookie | Arbitrary software-defined persistent byte. |
| 2 | padding | OpenLogi writes 0x00. |
OpenLogi awaits the acknowledgement and discards its payload. Firmware clearing a cookie after new pairing is not hardware-verified.
get_capabilities (fn 4)
OpenLogi v0.8.15 does not expose this function. Options+ 2.8 calls function 4 and reads response bit 0 as a Boolean.
| Byte | Field | Notes |
|---|---|---|
| 0, bit 0 | capability | Options+ 2.8 reads this bit. It combines the bit with feature version 2 or later for its coupled-switch path. |
| 0, bits 1–7 | / | No meaning was recovered. |
| 1… | / | No layout was recovered. |
The request has no recovered parameters. This layout is reverse-engineered from Options+ 2.8.
ChangeHostRequested (unsolicited fn 0)
This report shares function 0 with get_host_info. Options+ 2.8 accepts an unsolicited report only with software ID 0 and at least two payload bytes.
| Byte | Field | Notes |
|---|---|---|
| 0 | from | Source zero-based host channel. |
| 1 | to | Requested zero-based host channel. |
| 2… | / | No meaning was recovered. |
Options+ 2.8 treats this report as a host-change request. Solaar has reported the notification from hardware. OpenLogi v0.8.15 does not decode or forward it.
How OpenLogi uses it
OpenLogi uses ChangeHost when host_switch_targets links a keyboard to target devices. The session temporarily configures reportable host controls through 0x1b04. It snapshots the changed reporting fields and restores them on exit. A failed restoration remains pending for retry.
Before function 1, OpenLogi reads function 0 for each device. It rejects a requested channel outside 0..host_count. It then consults 0x1815 when available. Only an explicit Empty status with name_len == 0 blocks the change. An unreadable status remains advisory.
OpenLogi prepares target devices first and sends the keyboard's function 1 last. This preserves a shared receiver channel until target moves are attempted. The v0.8.15 device layer does not use cookie functions, function 4, or ChangeHostRequested reports.
Open questions
Options+ 2.8 calls function 0 byte 2 flags. It separately calls function 4 and reads bit 0. OpenLogi exposes the function-0 byte as ChangeHostCapabilities::ENHANCED_HOST_SWITCH. No public bit definition or hardware capture proves that the two bits mean the same thing.
Options+ 2.8 and Solaar provide evidence for ChangeHostRequested. Static analysis cannot show which models emit it or whether every switch emits it. OpenLogi v0.8.15 instead observes temporary 0x1b04 host-control reports.
Options+ 2.8 can choose a synchronous or asynchronous function-1 path. OpenLogi always sends a notification. No evidence establishes that a synchronous call is required.
Usage (Rust)
use hidpp::feature::change_host::ChangeHostFeature;
// `device` is an initialized mutable HID++ device.
device.enumerate_features().await?;
if let Some(feature) = device.get_feature::<ChangeHostFeature>() {
let info = feature.get_host_info().await?;
let target = 1;
if target < info.host_count && target != info.current_host {
feature.set_current_host(target).await?;
}
}