Integration test: User-to-PC event propagation
March 19, 2025 ยท View on GitHub
Purpose and summary
To test that system events are propagated to the the PC side as joystick/gamepad input events.
Hardware setup
Use this test circuit:

For later reference:
- "ALT" is the built-in push button into the rotary encoder.
- "CLUTCH1" and "CLUTCH2" are the potentiometers as shown in the protoboard.
- "BTNN" is the button numbered "N" in the button matrix as shown in the protoboard.
- "RCW" means rotary's clockwise rotation.
- "RCCW" means rotary's counter-clockwise rotation.
Software setup (computer)
- Windows 10 or later
- Bluetooth 4.2 or later
- Joystick testing software able to display 128 buttons. Note that Window's device property page is not suitable for this.
- SimpleHIDWrite.exe: available at http://janaxelson.com/hidpage.htm. There is a modern clone at https://github.com/Robmaister/SimplerHidWrite.
Procedure and expected output
Part 1
- Ensure the system is paired and connected to the computer.
- Press and release these buttons quickly, one by one. Test event registration at the joystick testing software:
- "CLUTCH1": Axis Rz should move from zero to some point near the middle.
- "CLUTCH2": Same as "CLUTCH1".
- "ALT": No event should be registered.
- "BTN2": should be registered as #3.
- "BTN3": should be registered as D-PAD up.
- "BTN4": should be registered as D-PAD down.
- "BTN5": should be registered as D-PAD left.
- "BTN6": should be registered as D-PAD right.
- "BTN7": should be registered as #8.
- Press and hold "ALT", then press and release "BTN2", then release "ALT". Button #67 should be registered.
- Rotate "RCCW". Button #13 should be registered.
- Rotate "RCW". Button #14 should be registered.
- Press and hold "BTN2", then press and hold "BTN7", then release both. Buttons #3 and #8 should be registered at the same time.
- Press and hold "BTN2", then press and hold "BTN3", then release both.
- Press and release "ALT". Button #11 should be registered.
- Press and hold "BTN2", then press and hold "BTN4", then release both.
- Axis Rz should go to zero.
- Move "CLUTCH1". Axis Rx must reflect the movement.
- Move "CLUTCH2". Axis Ry must reflect the movement.
- Press and hold "BTN2", then press and hold "BTN5", then release both.
- Press and release "BTN3". Button #4 should be registered.
Part 2 (buttons map)
- Open "SimpleHidWriter.exe". Locate
Device VID=1D50in the top area, and click on it. - You could see continuous report lines starting with
RD 01. Ignore them. Click onClearfrom time to time. - Enter
04at fieldReportID. - Enter
07 09 0Aat fields belowReportID. Click onSet Feature. - Enter
03at fieldReportID. - Enter
FF 01 FF FF 01at fields belowReportID. Click onSet Feature. - Now return to the joystick testing software.
- Press and release "BTN7". Should be registered as button #10.
- Press and hold "ALT", then press and release "BTN7", then release "ALT". Button #11 should be registered.
- Press and release "BTN3". Should be registered as as D-PAD up.
Part 3 (security lock)
- Press and hold "BTN2", then press "BTN6", then release both.
- Enter
03at fieldReportID. - Click on
Get Feature. - Byte in 6th position (after
RD 03) must showFF. - Enter
04at fieldReportID. - Enter
07 20 20at fields belowReportID. Click onSet Feature. - Press and release "BTN7". Should be registered as button #10.
- Press and hold "BTN2", then press "BTN6", then release both.
- Enter
07 13 13at fields belowReportID. Click onSet Feature. - Press and release "BTN7". Should be registered as button #20.
- Enter
03at fieldReportID. - Click on
Get Feature. - Byte in 6th position (after
RD 03) must show00.
Part 4 (axis polarity)
- Enter
03at fieldReportID. - Enter
01 FF FF FF FF FF FFat fields belowReportID. Click onSet Feature. - Move "CLUTCH1" or "CLUTCH2" from left to right. Note if axis "RX" or "RY" goes up or down.
- Enter
FF FF FF 05 FF FF FFat fields belowReportID. Click onSet Feature. - Enter
FF FF FF 06 FF FF FFat fields belowReportID. Click onSet Feature. - Move "CLUTCH1" or "CLUTCH2" from left to right, again. Axis "RX" or "RY" must go in the opposite way it did before.
- Enter
FF FF FF 05 FF FF FFat fields belowReportID. Click onSet Feature. - Enter
FF FF FF 06 FF FF FFat fields belowReportID. Click onSet Feature.
Part 5 (pulse width of rotary encoders)
Subjectivity can not be avoided in this test.
SimpleHIDWrite is a better tool to check the "pulse width" of input events.
Be conscious of the delay between RD 01 ... lines.
- Enter
03at fieldReportID. - Enter
FF FF FF FF FF FF 06at fields belowReportID. Click onSet Feature. - Rotate "RCW". A button press should be registered for a longer time than before.
- Enter
FF FF FF FF FF FF 01at fields belowReportID. Click onSet Feature. - Rotate "RCW". A button press should be registered for a shorter time than before.