onlyproblems
New Member
I am trying to mimic an existing device (ps4 and ps5 gamepads). My device is a Raspberry Pi Zero 2. USB Gadget mode seems to be working.
I copied the report descriptor and all settings/information of the device I am trying to mimic. My host correctly detect the device and
Now while trying to write to the /dev/hidg0 file (which is created after sucessfully binding my gadget config to the RPi's UDC) I get this error from Rust:
The interesting thing is, that the same error occurs if the write call is done, before the RPi is connected to the host.
Connecting the RPi to my host, I get the following
I am completely lost at this point. I am beginning to suspect that what I am trying to do is impossible using the linux usb gadget driver because the options you can set are not enough to fool the host well enough.
If you want to read more, you can read the .md files in my repo
I copied the report descriptor and all settings/information of the device I am trying to mimic. My host correctly detect the device and
lsusb
shows everything as expected. The original devices have 3 audio functions and 1 hid function. I only copied the 1 hid function, so some slight changes occur but I dont suspect the error originates from the "missing" audio functions.Now while trying to write to the /dev/hidg0 file (which is created after sucessfully binding my gadget config to the RPi's UDC) I get this error from Rust:
code: 108, kind: Uncategorized, message: "Cannot send after transport endpoint shutdown"
(Yes I already asked in a Rust forum, but this seems like a linux issue to me)The interesting thing is, that the same error occurs if the write call is done, before the RPi is connected to the host.
Connecting the RPi to my host, I get the following
dmesg
output:
Code:
usb 1-2: new high-speed USB device number 10 using xhci_hcd
usb 1-2: New USB device found, idVendor=054c, idProduct=0ce6, bcdDevice= 1.00
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: Wireless Controller
usb 1-2: Manufacturer: Sony Interactive Entertainment
playstation 0003:054C:0CE6.0013: hidraw4: USB HID v1.01 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-0000:03:00.3-2/input0
playstation 0003:054C:0CE6.0013: Invalid reportID received, expected 9 got 0
playstation 0003:054C:0CE6.0013: Failed to retrieve DualSense pairing info: -22
playstation 0003:054C:0CE6.0013: Failed to get MAC address from DualSense
playstation 0003:054C:0CE6.0013: Failed to create dualsense.
playstation: probe of 0003:054C:0CE6.0013 failed with error -22
If you want to read more, you can read the .md files in my repo
Last edited: