feat: pairing mode and RX frame logging

The dongle beacon carries a pairing flag in the Microsoft OUI IE; with
it clear, controllers ignore the beacon. Port xone_dongle_toggle_pairing:
xone_set_pairing() rewrites the beacon with the flag set and blinks the
LED, the GUI button triggers it, EVT_BUTTON (dongle button) does too, and
the LED follows upstream state (blink while pairing, on when a controller
is connected, off otherwise). The CLI gains a pair command.
Log every inbound frame (info word + first 16 bytes) so the RX path can
be traced against hardware.

Co-Authored-By: qwen3.8-27b@q2_k_xl: pairing mode and RX logging
This commit is contained in:
portersky
2026-08-17 20:53:40 +02:00
parent dae51f085b
commit 5fd1b3a11f
5 changed files with 78 additions and 11 deletions
+3
View File
@@ -72,6 +72,9 @@ int xone_controller_count(xone_dongle const *d);
// success, -1 if index is out of range.
int xone_controller_mac(xone_dongle const *d, int index, char *buf, int len);
// Enter or leave pairing mode (beacon pairing flag + LED blink).
void xone_set_pairing(xone_dongle *d, bool enable);
#ifdef __cplusplus
}
#endif