Line 14:
Line 14:
The USB dongle has in/out ports, plus a feature port. The feature port is used to configure the dongle/wireless link, the in-port is standard HID 'Joystick' (with a corrupt descriptor) and the out-port is used to send FF commands to the wheel.
The USB dongle has in/out ports, plus a feature port. The feature port is used to configure the dongle/wireless link, the in-port is standard HID 'Joystick' (with a corrupt descriptor) and the out-port is used to send FF commands to the wheel.
−
I have managed to reverse engineer some of the codes, but am looking for more help on that front. [http://www.wiibrew.org/w/images/a/ac/Autocenter.zip Simple Python Script] --[[User:Mungewell|Mungewell]] 17:14, 8 September 2010 (CEST)
+
===Configuration===
+
+
The Wheel/Dongle are configured by writing to the feature port of the USB dongle. This allows the control of the 'on-air' features, such as initiating the wireless link, controlling the RF channel/hooping sequence and RF addressing (sub-channel coding).
+
+
When first plugged in the wireless link between the dongle and the wheel is not active, the link can be 'brought up' with writting the '0xA0 Command' followed by the '0xB2 Command'.
+
+
===HID Joystick===
+
+
The HID description declares the number of axis and buttons, unfortunately it is corrupt.
+
+
The solution (on Linux) is to re-write the descriptor on the fly, after that the 'joystick' is will function correctly.
+
+
===Force Feedback===
+
+
There are a number of force feed back codes which can be written to the USB out-port, some of these are know/understood but assistance is required to further reverse engineer the rest.
+
+
The effects are upload into 'slots', these are continuously sent over the wireless link. The wheel is capable of supporting 4 simultaneous effects, plus an additional auto-center effect. The selected slot for an effect is encoded into the 1st byte of the out-port write.
+
+
* 0x1A : Slot(s) 1
+
* 0x21 : Slot(s) 2
+
* 0x31 : Slot(s) 1 + 2
+
* 0x41 : Slot(s) 3
+
* 0x51 : Slot(s) 3 + 1
+
* 0x61 : Slot(s) 3 + 2
+
* 0x71 : Slot(s) 3 + 2 + 1
+
* 0x81 : Slot(s) 4
+
* 0x91 : Slot(s) 4 + 1
+
* 0xa1 : Slot(s) 4 + 2
+
* 0xb1 : Slot(s) 4 + 2 + 1
+
* 0xc1 : Slot(s) 4 + 3
+
* 0xd1 : Slot(s) 4 + 3 + 1
+
* 0xe1 : Slot(s) 4 + 3 + 2
+
* 0xf1 : Slot(s) 4 + 3 + 2 + 1
+
* 0x_e : Auto Center
+
+
The type of effect is encoded in the second byte of the out-port write, with specific settings for the effect in the further bytes.
+
+
* 0x0D : AutoCenter
+
* 0x10 : Constant Force
+
* 0x11 : Auto/Anti Center (Complex) - this is similar to a spring force
+
* 0x12 : Friction Force
+
* 0x13 : Auto/Anti Center (Complex) - is this any different to '0x11'
+
* 0x_F : Cause wheel to de-associated from dongle - this is probably unintentional
+
+
A simple Linux/Python script for testing these codes can be found [http://www.wiibrew.org/w/images/a/ac/Autocenter.zip here]. --[[User:Mungewell|Mungewell]] 17:14, 8 September 2010 (CEST)
[[Category:Hardware]]
[[Category:Hardware]]