Closed marco-lilek closed 4 years ago
I think its something about libusb_interrupt_transfer
suspending the adapter_thread
waiting on a response it never gets
fprintf(stderr, "huh1");
int transfer_ret = libusb_interrupt_transfer(a->handle, EP_IN, payload, sizeof(payload), &size, 0);
fprintf(stderr, "huh2");
23:14:16 mllilek mllilek-debian wii-u-gc-adapter $ sudo ./wii-u-gc-adapter
adapter 0x0x556a9a0457d0 connected
adapter_thread a->quitting 0
huh1
When i set the timeout to some dummy value (1000 * 10) ms I can see that the request times out
I think its something to do with my adapter, which nonstandard. Serial number HS-WU025.
Based on https://gbatemp.net/threads/wii-u-gamecube-adapter-reverse-engineering-cont.388169/
I see that after writing 0x13
to EP_OUT you should be able to poll for the controller status from EP_IN. This doesn't seem to work in my case: it accepts the knock but doesn't respect it
Will compare the HID Device Descriptor with the doc above ^ and see how they differ
Descriptor retrieved by doing
lsusb -v -d 057e:0337
report descriptor: https://pastebin.com/Z4zqhzzW
Here's my interpretation of the above report descriptor:
x11
Report 8 x 5
Output = 0
EP_OUT
0x21
Report 8 x 37
Input = 0
EP_IN
0x12
Report 8 x 1
Output = 0
EP_OUT
0x22
Report 8 x 25
Input = 0
EP_IN
0x13
Report 8 x 1
Output = 0
EP_OUT
0x23
Report 8 x 2
Input = 0
EP_IN
0x14
Report 8 x 1
Output = 0
EP_OUT
0x24
Report 8 x 2
Input = 0
EP_IN
0x15
Report 8 x 1
Output = 0
EP_OUT
0x25
Report 8 x 2
Input = 0
EP_IN
It might just be a bad adapter: regardless of what input I send out (0x1[2-5]) I time out when reading from EP_IN. Testing again with the mayflash adapter which I've read works fine, will update in a couple days
mayflash adapter works fine.
for reference, this is the adapter I bought. Avoid this:
https://www.amazon.com/gp/product/B07F36FWMQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
more tags: Cloudream, pdobq
ran
error in kernel logs
no input registered
uinput version information
libusb info