47 lines
2.1 KiB
Markdown
47 lines
2.1 KiB
Markdown
# 8BitDo Ultimate 2 Wireless lighting without the vendor app
|
||
|
||
Works through the 2.4 GHz dongle and over a USB cable. Both show up as USB 2DC8:310B with the
|
||
same vendor interface; only the serial number differs. Bluetooth doesn't work: over Bluetooth the
|
||
controller exposes only the gamepad (no config channel), and 8BitDo's own app has no Bluetooth
|
||
support for this model either. I disassembled the protocol from `8BitDoAdvance.dll`,
|
||
which ships with 8BitDo Ultimate Software V2 1.30.
|
||
|
||
- `8BitDo_Ultimate2.js`: SignalRGB plugin, installed in `Documents\WhirlwindFX\Plugins`.
|
||
Restart SignalRGB after you change it.
|
||
- `u2.py`: command-line tool (`pip install hidapi`).
|
||
|
||
```
|
||
python u2.py backup config_backup.bin # do this first
|
||
python u2.py live ff0000 0000ff # left ring, right ring; not saved
|
||
python u2.py save 00aaff # both rings, saved to the controller
|
||
python u2.py theme # show theme; "theme 2" sets dynamic again
|
||
python u2.py restore config_backup.bin
|
||
```
|
||
|
||
## Protocol
|
||
|
||
The vendor HID interface is interface 2, usage page 0xFF7A, 64-byte reports.
|
||
|
||
```
|
||
out 0x81 [0x81, 0x04, u16 cmd, u16 arg, u32 len | crc16(data) << 16, u32 total, u32 offset, data]
|
||
in 0x02 [0x02, 0x04, u16 0x0004, u16 cmd, u32 len, u32 total, u32 offset, data]
|
||
```
|
||
|
||
The CRC is CRC-16/MODBUS (init 0xFFFF, poly 0xA001). It's only needed on writes.
|
||
|
||
| cmd | meaning |
|
||
|---|---|
|
||
| 1 | write config bytes (max 45 per packet) into the 0x638-byte config record |
|
||
| 2 | read config bytes |
|
||
| 6, arg 0x123 | commit: save the config to the controller |
|
||
| 0x40, arg n | select lighting theme: 2 dynamic, 3 hotwheel, 4 custom per-LED, 5/6 off |
|
||
| 0x41 | read the current theme (first data byte) |
|
||
|
||
Custom colours for profile slot 0 sit at record offset 0x50C: a u32 flag (0x20200911),
|
||
then 24 × u32 `0x00RRGGBB`. LEDs 0–11 are the left stick ring and 12–23 the right stick ring.
|
||
Each ring starts at the bottom and runs clockwise.
|
||
|
||
A write without commit changes the lighting straight away, in about 34 ms for all 24 LEDs.
|
||
Nothing is saved, so the plugin streams that way and doesn't wear out the controller's storage.
|
||
Selecting a theme again reloads the stored lighting.
|