felis / USB_Host_Shield_2.0

Revision 2.0 of USB Host Library for Arduino.
https://chome.nerpa.tech
1.79k stars 780 forks source link

How I can get ps4 USB feature report? #743

Open ullMarksin opened 1 year ago

ullMarksin commented 1 year ago

How I can get ps4 USB feature report? For example I want to retrieve ps4 controller internally saved mac address via get feature report with id 0x12, but I can't figure out how, because I can't find HID_GET_REPORT or similar method. I tried receive report via:

pUsb->ctrlReq(bAddress, epInfo[0].epAddr, bmREQ_HID_IN, HID_REQUEST_GET_REPORT, 0x12, 0x03, 0x00, sizeof(buf), sizeof(buf), buf, NULL);

But it didn't work for me.

Lauszus commented 1 year ago

Where did you get the information for the report ID etc? Please share the link.

ullMarksin commented 1 year ago

https://github.com/ViGEm/ViGEmBus/blob/master/sys/Ds4Pdo.cpp#L545

ullMarksin commented 1 year ago

What I am trying to do is to get saved in ps4 controller mac address, like in this code shown how to get ps4 auth tokens: https://github.com/mathijsvandenberg/g29emu/blob/94b6bb941189a034b94ad3571fd51e5392d19bf7/PS4AuthDevice.cpp#L75