darthcloud / BlueRetro

Multiplayer Bluetooth controllers adapter for retro video game consoles
https://blueretro.io
Apache License 2.0
1.23k stars 103 forks source link

(Update) Bluetooth Mouse and Keyboard won't work on Dreamcast #967

Open darthcloud opened 2 months ago

darthcloud commented 2 months ago

Discussed in https://github.com/darthcloud/BlueRetro/discussions/842

Originally posted by **williamdsw** November 30, 2023 Hi, how are you doing? First, thank you for your work. I do have some BlueRetro adapters and they work great. Second, I'm trying to connect a bluetooth mouse and a bluetooth keyboard to my dreamcast, and trying to use on Dreamcast Web Browser. I've set the mouse on port 1 with default mouse settings, and the keyboard on port 2 with default gamepad/keyboard settings. Although they pair and appear connected on device list of the browser, I got no input response for both, while they work perfectly on PC. I'm using the DC adapter and 1.9 firmware. Also I'm attaching both pcapng files for the mouse & keyboard. Thank you for your time. [Keyboard & Mouse pcapng.zip](https://github.com/darthcloud/BlueRetro/files/13519901/Keyboard.Mouse.pcapng.zip)
darthcloud commented 2 months ago

HID side of it is working fine as shown by using my trace_replay script:

# 000000 05 01 09 06 A1 01 85 01 05 07 19 E0 29 E7 15 00 # 000010 25 01 75 01 95 08 81 02 95 01 75 08 81 01 95 05 # 000020 75 01 05 08 19 01 29 05 91 02 95 01 75 03 91 01 # 000030 95 06 75 08 15 00 25 65 05 07 19 00 29 FF 81 00 # 000040 C0 05 01 09 02 A1 01 85 02 09 01 A1 00 05 09 19 # 000050 01 29 08 15 00 25 01 95 08 75 01 81 02 05 01 16 # 000060 01 F8 26 FF 07 75 0C 95 02 09 30 09 31 81 06 15 # 000070 81 25 7F 75 08 95 01 09 38 81 06 05 0C 0A 38 02 # 000080 95 01 81 06 C0 C0 05 0C 09 01 A1 01 85 03 19 00 # 000090 2A 9C 02 15 00 26 9C 02 75 10 95 01 81 # 1 I 07E0 0 8 0700 16 8 0700 24 8 0700 32 8 0700 40 8 0700 48 8 0700 56 8 rtype: 0 # 1 O 0801 0 5 # 2 I 0901 0 8 0130 8 12 0131 20 12 0138 32 8 0C238 40 8 rtype: 1 # 3 I 0C00 0 16 rtype: 3 R0 07E0: 00, R0 0700: 14, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 07E0: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 07E0: 00, R0 0700: 2A, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 07E0: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00, R0 0700: 00,

The problem is most likely at the ATT attribute discovery level.

I can't replay that part of a trace yet. That would need a significant improvement to the script and to add the proper hook into the FW.