Re: Trouble parsing HID reports from PDP PS4 remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeremy,

On 12/19/21 23:41, Jeremy Slemp wrote:
I bought a PDP Bluetooth PS4 remote[0] in the hopes of using it to
send keypress events to my Python script via evdev[1].  I found that
some of the buttons on the remote generate HID events that are seen by
evdev, but others do not.  So I'd like to figure out the best way to
receive events from the currently-unsupported buttons.

If evdev shows some events, this is not related to bluetooth but the HID stack in the kernel (I cc-ed linux-input@)

Basically, we might need to add support for this remote in the hid-sony driver.

Can you attach the full output of hid-recorder (from the hid-tools[3] repository) when you press all of these buttons?

This should give us enough information to reply the event sequence locally and fix the drivers if we need.

Cheers,
Benjamin

[3] https://gitlab.freedesktop.org/libevdev/hid-tools


bluetoothctl describes the device as:

Device 3E:09:EC:xx:xx:xx (public)
Name: PDP Media Remote
Alias: PDP Media Remote
Class: 0x0000250c
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

The main module inside the device is an BTM0612C2P[2].


The "good" buttons flip a bit in a mask in bytes 2-5:

SHARE button, press/release:

ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2232 [hci0] 4474.225390
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 10 00 09 00 16 73 47 06                 ........sG.
ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2233 [hci0] 4474.355396
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 09 00 89 24 5e 56                 ........$^V

UP ARROW, press/release:

ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2240 [hci0] 4536.493867
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 00 00 00 0a 00 8b 3c 03 4d                 ........<.M
ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2241 [hci0] 4536.727587
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 00 4a 77 73 7d                 .......Jws}

PINK SQUARE, press/release:

ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2259 [hci0] 4676.429686
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 18 00 00 0a 00 c8 e0 93 1d                 ...........
ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2260 [hci0] 4676.639687
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 00 4a 77 73 7d                 .......Jws}


The "bad" buttons seem to transmit a constant in byte 6 instead of a
bitmask in bytes 2-5:

REWIND, press/release:

ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2261 [hci0] 4696.955007
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 17 8d f2 a0 fe                 ...........
ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2262 [hci0] 4697.163765
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 00 4a 77 73 7d                 .......Jws}

PLAY, press/release:

ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2264 [hci0] 4710.348944
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 16 1b c2 a7 89                 ...........
ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2265 [hci0] 4710.531446
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 00 4a 77 73 7d                 .......Jws}

PAUSE, press/release:

ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2266 [hci0] 4717.501552
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 1a 30 8e 11 80                 .......0...
ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2267 [hci0] 4717.685317
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 00 4a 77 73 7d                 .......Jws}

ENTER, press/release:

ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2293 [hci0] 4844.683443
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 0d f7 0b c2 03                 ...........
ACL Data RX: Handle 11 flags 0x02 dlen 15                           #2294 [hci0] 4844.867210
       Channel: 65 len 11 [PSM 19 mode 0] {chan 1}
         a1 01 08 00 00 0a 00 4a 77 73 7d                 .......Jws}

I tried to decode these reports according to the USB HID spec but they
didn't make much sense to me beyond the "collection (application)"
part.  Can anyone help understand what this remote is doing?


[0] https://www.amazon.com/dp/B072C7YZFC
[1] https://python-evdev.readthedocs.io/en/latest/
[2] https://www.oemblue.com/download/BTM0612C2P%20Hardware%20Datasheet.pdf






[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux