-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bt_att_write_hid_report() must take into account GATT characteristic properties #626
Comments
BlueRetro is already using the write with rsp cmd (0x12) just like in your wireshark trace. So while doing this would be the right way to do things in this case it's not the cause of the problem. Stadia report BT_GATT_CHRC_WRITE and BlueRetro use cmd 0x12 |
The problem is that the HID parser find no rumble usage in the Stadia descriptor: That 5 with nothing after is the rumble report For reference a Xbox X|S: rtype 4 means it recognized the report as a rumble one. Without this no packet can be send to the controller. Here the stadia descriptor for report 5: The problem is that the Usage Page used is not USAGE_GEN_PHYS_INPUT as @JPZV code expect. Another issue is that it's a 16bits page which BlueRetro currently do not support. It's late now but I'll look at supporting all page size and add the PID page to the rumble list and see what happen. |
@darthcloud thank you for looking into it. Regarding |
BlueRetro firmware version
1.8.3
BlueRetro firmware specification
HW1
BlueRetro firmware variant
System specific
BlueRetro hardware type
External adapter with detachable cord
Manufacturer
BlueRetro Gaming Store
System used
Sony PlayStation 2
Bluetooth controller brand & name
Google Stadia Controller
What is problem? (only list ONE problem per report)
According to the HIDS spec
Read/Write/Write Without Response
properties are mandatory forReport: Output Report Type
characteristic.But seems some devices are not conforming to the spec and can omit
Write Without Response
orWrite
characteristic properties and fail to handle output HID reports and in result vibration is not working.For example Stadia Controller with new "Bluetooth mode" firmware is known to have such issue:
Related code in Bluez:
https://github.com/bluez/bluez/blob/a1736d8990ff56bba453ff81a25156316bdd118f/profiles/input/hog-lib.c#L806-L812
What did you expect to happen?
bt_att_write_hid_report()
code should read GATT characteristic properties and do correspondingATT_OP_WRITE_REQ
orATT_OP_WRITE_CMD
operation if possible and skip Report ID byte if only one output report with zero id is declared in Report Descriptor:BlueRetro/main/bluetooth/att_hid.c
Lines 83 to 89 in a7b2d76
Something like this:
Attach files like logs or Bluetooth traces here
Here is Wireshark dump from the PC<=>Stadia Controller - this is the moment of connection of already paired controller: stadia_bluetoothle.pcapng.gz
The text was updated successfully, but these errors were encountered: