-
Notifications
You must be signed in to change notification settings - Fork 11
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
ps5SendData example not working #3
Comments
I never got ps5SendData to work. Only buttons and analog controller inputs are known to be functional. I didn't bother with others since it would be significantly more difficult to figure out without a resource/manual of some sort (as you mentioned). Until I find such a resource, I doubt I'll try to get the other sensors working. |
I was playing with DS and esp-idf with Bluedroid for few days and could not make the bt_spp_initiator example working. Trying service discovery functions I discovered that DS in pairing mode provides only single UUID 0x1124 which is HID. So I tried running esp_hid_host example and found out that it is able to pair the DS! So it seems DS in normal operational mode is running both HID and SPP. |
Have you taken a look at src/ps5_int.h? Seems like some of the report info might be related. To get sendData to work I believe you'll have figure out the index position of each set of data (also maybe the send buffer size), then update ps5_int.h appropriately. Only ways I can think of doing so are:
|
Hi, Links, where I collected my information: Basic structure of the BT HID payload (according to my understanding!):
75 Byte --> first Byte of CRC32 checksum Implementation
Regarding the flags: actually only single bits are set in them to send only certain data. But as you can read in this post both flags can be given the values listed above to simply send any parameter (one less possible cause of errors). Summary: If someone else was successful in sending commands to the PS5 controller with the ESP32: please report! |
One thing I noticed is that the code uses the control channel to send the HID packet. Shouldn't it use the interrupt channel instead? |
I'm making progress. Changing the channel worked. But I also did a whole bunch of changes too according to what was posted in this thread. The problem I have now is that ps5_l2cap_data_ind_cback gets flooded with packets with report ID 0x31 after I set the LED. I'm not sure if I need to ack those. One thing to consider: I used a tool called DualSenseCtl that runs on linux. This tool helped me discover that before changing the LED colors, you first need to disable the lightbar. Makes no sense to me but it works. I'll try to report more progress sometime and will post a link to my code. |
I just found this: https://patchwork.kernel.org/project/linux-input/patch/20201219062336.72568-8-roderick@gaikai.com/ So basically, the library was parsing a minimal set of data. After sending an output report, the controller starts sending an extended input report that contains more data. So the fix I'm doing would enable sending commands to the controller but would also give us the sensors information that was missing as mentionned in other issues in this repo. |
It's working now. |
Prior to testing the library I updated DualSense to firmware 0297. All examples seems to be working except ps5SendData.
Btw, are you planning to explore / reverse-engineer communication for other peripherals of DualSense such as touchpad, microphone, speaker?
Are there any other resources which could help during this process?
The text was updated successfully, but these errors were encountered: