Wii Remote
Status: hardware-validated via the TCP forwarder.
The Wii Remote is not read over PC Bluetooth. A small homebrew app runs on the Wii / Wii U, reads up to four Wiimotes, and forwards their IMU over a plain TCP socket. The PC side is therefore just a socket listener with no Bluetooth code.
Transport
Section titled “Transport”- The bridge binds a TCP listener on
127.0.0.1:9909(configurable). - The console connects as a client (keep-alive, no-delay).
- Each frame the console sends N × 17 bytes (one record per Wiimote slot 0-3) as a single binary write - no HTTP framing.
- The bridge replies with 5 bytes: 4 per-slot rumble flags + 1 frame-interval byte (ms). It drops the connection if a read isn’t a multiple of 17 bytes, prompting a reconnect.
Per-controller record (17 bytes, little-endian)
Section titled “Per-controller record (17 bytes, little-endian)”| Offset | Size | Field |
|---|---|---|
| 0 | 1 | Slot id (0-3); 0xFF = empty slot (record still sent, zero-filled) |
| 1 | 2 | Core accel X (i16 LE) |
| 3 | 2 | Core accel Y |
| 5 | 2 | Core accel Z |
| 7 | 2 | data X - MotionPlus gyro or Nunchuk accel |
| 9 | 2 | data Y |
| 11 | 2 | data Z |
| 13 | 1 | Nunchuk connected (0/1) |
| 14 | 1 | MotionPlus supported (0/1) |
| 15 | 1 | Battery level (0-100) |
| 16 | 1 | Button flag (1/2 pressed → reset gesture) |
The data triplet is dual-purpose: MotionPlus gyro when no Nunchuk is attached,
otherwise the Nunchuk’s accelerometer (the Wiimote can’t cleanly stream both
extensions at once).
IMU scale
Section titled “IMU scale”- Core accelerometer: zero at raw
512, ~200 LSB/g →a = (raw − 512) / 200 × 9.80665m/s². Check that‖a‖ ≈ 9.81at rest. - MotionPlus gyro: centered near
8192; subtract and apply ~0.07 dps/LSB → rad/s. Sign and axis are validation-pending on hardware. - Nunchuk accel (when attached): same 512/200 mapping.
MotionPlus
Section titled “MotionPlus”A bare Wii Remote is accelerometer-only - with no gyro, fusion falls back to gravity-only orientation and yaw drifts unconstrained. The Wiimote Plus or a MotionPlus add-on exposes a 3-axis gyro. The companion enables the extension, waits for it to settle, forwards its raw values, and arbitrates against the Nunchuk (gyro by default; Nunchuk accel if a Nunchuk is plugged in).
Reset gestures
Section titled “Reset gestures”The button flag (byte 16) drives recenter when 1 or 2 is pressed.