feat(rynk): dongle groundwork — protocol and config - #1027
Conversation
1600417 to
f7da592
Compare
Size Report
|
f7da592 to
889ca1f
Compare
bbc1835 to
7b9a7c1
Compare
5ce4363 to
cf69a80
Compare
3b2a186 to
433afcc
Compare
433afcc to
e1c480f
Compare
e1c480f to
f508a76
Compare
410eae2 to
81a733f
Compare
81a733f to
cc4db26
Compare
cc4db26 to
aa47698
Compare
aa47698 to
4dfe73a
Compare
b67d3f6 to
2db1001
Compare
2db1001 to
97c3891
Compare
- `DongleSlot` keeps only what survives the keyboard being off — slot, connected, name. Battery came from the dongle's BAS client, which has no charge state to report; the host reads the keyboard's own richer `BatteryStatus` through the pass-through instead. - Wire types size by the protocol ceiling (`MAX_DONGLE_SLOTS`), which is a decoder's bound; `DONGLE_SLOTS_NUM` is the dongle's own table length and is now emitted only under the `dongle` feature, along with its ceiling assert. - `wire_frames.snap` gains every feature-gated row instead of dropping it: the test is gated on `host`, the feature superset, so the file is generated once and complete rather than identical-because-truncated across sets. - The dongle's `led_indicator` subscriber count is derived from `dongle_links_num` (one per link task) instead of a hardcoded 2 that a raised link count would silently outgrow. - Compatibility section states the `RynkError` append rule and that 0.x is pre-release; `GetDongleInfo`'s note trimmed to what the row doesn't say.
… table - `GetDongleInfo` is gone. The probe was never the payload — it's the routing rule: a keyboard rejects the whole `0x09xx` segment as `UnknownCmd`, so `GetDongleSlots` identifies a dongle *and* returns what the host actually needs, in one round trip. Its `slots_num`/`links_num` had no host consumer (pairing is keyboard-triggered, a full table evicts by LRU), and its `version` had nothing to compare against, since `GetVersion` is forwarded and answers for the keyboard. `0x09xx` renumbers to close the gap; 0.x is pre-release. - `DongleSlots.slots` is now dense — `Vec<Option<DongleSlot>>` whose index is the slot number, so `DongleSlot.slot` goes away and empty slots become representable. A host can then warn before a full table silently evicts the least-recently-seen keyboard on the next pairing. - The connect handshake joins `GetDongleSlots` with the version and capability requests, so the same round trip identifies the peer. This is load-bearing: a dongle whose target is off answers its own segment while the forwarded pair fails with `NoTarget`, which today aborts `connect` before the host can probe at all. - `Client` holds a `Peer` (keyboard / dongle with target / dongle without) instead of a bare `DeviceCapabilities`; keyboard endpoints fail locally with `NoDongleTarget` when there is no target to forward to.
The dongle stopped issuing Rynk requests, so a slot name now comes from the GAP device name. The size alias still holds: a keyboard publishes one string as both that and DeviceInfo::product_name.
Protocol vocabulary and config plumbing for the upcoming 2.4 GHz dongle. Definitions only — no behavior: the keyboard side and the dongle firmware land in follow-ups.
rmk-types): the 0x09xx dongle command range (info, slot table, slot selection, forget), theDongleSlotsChangetopic,DongleInfo/DongleSlot/DongleSlotspayloads, theNoTargeterror, thedongle_ctrlGATT UUID and itsDONGLE_CTRL_OPEN_PAIRING_WINDOWopcode, anddecode_header— a non-destructive COBS header peek so a dongle can route a frame without re-encoding it. Wire snapshots updated.donglecargo feature (rmk-types, implied byhost): gates the dongle-only rows. Without it a keyboard'sTopicEventdoesn't grow toDongleSlotssize, andGetDongleSlots' response stays out of the payload-budget assert that sets the minimum legalrynk_buffer_size.rmk-config):dongle_slots_num/dongle_links_num/dongle_pairing_window_secs, validated against the newprotocol_limits::MAX_DONGLE_SLOTSceiling and emitted as build constants.DONGLE_SLOTS_NUMfollows the established per-build split — the ceiling on host builds for wire compatibility, the configured value on firmware, with a generated ceiling assert.rmk-types/src/ble.rs):RMK_ADV_COMPANY_IDandDONGLE_SEEKING_ADV_KINDlive together, ungated, so the split peripheral and the dongle share one manufacturer-data namespace;rmk/src/split/ble/peripheral.rsnow uses the const instead of a bare0xe118.--features donglerow forrmk-types— the only configuration where the new gate reaches the firmware-side payload-budget assert.Stack — depends on #1026; #1028 builds on this branch. The keyboard side (dongle bond slot, dongle key, seeking advertising,
dongle_ctrlcharacteristic) moved out to a follow-up branch so this PR is groundwork only.