Just tested: wMaxPacketSize is 512 whil I'm sending 1-2 bytes at once so that can't be it.
Transfers before the timeout work. I can send as much as I want without any issues and the device can read it correctly. The writes only fail after reading has timed out.
Search found 8 matches
- Thu Feb 29, 2024 8:20 am
- Forum: Switch Development
- Topic: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
- Replies: 8
- Views: 634
- Wed Feb 28, 2024 11:01 pm
- Forum: Switch Development
- Topic: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
- Replies: 8
- Views: 634
Re: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
That was the way I initially implemented it. I've added it to see if I maybe need to set different ID's for in/out. Doesn't change anything though :/
- Wed Feb 28, 2024 9:51 pm
- Forum: Switch Development
- Topic: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
- Replies: 8
- Views: 634
Re: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
The code is still a mess while I'm trying to get it working. The most relevant files would be: * The main entry point: https://code.kulupu.party/thesuess/m8c/src/branch/wip/broken-usb-comms/src/switch_debug.c * The usb handling code: https://code.kulupu.party/thesuess/m8c/src/branch/wip/broken-usb-c...
- Wed Feb 28, 2024 5:30 pm
- Forum: Switch Development
- Topic: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
- Replies: 8
- Views: 634
Re: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
My sysnand is broken, that's why I was catious to update
Updated to the latest firmware now and am still encountering the same issue
Updated to the latest firmware now and am still encountering the same issue
- Mon Feb 26, 2024 8:27 pm
- Forum: Switch Development
- Topic: Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
- Replies: 8
- Views: 634
Correct way of handling writes to USB device which awaits response from usbHsEpPostBufferAsync
Continuing my journey to communicate with a serial device over USB, I've managed to establish communications in both directions which is already way more than I expected to ever get running. The last issue I'm facing happens when posting on the out session after calling usbHsEpPostBufferAsync . If t...
- Wed Feb 21, 2024 6:09 pm
- Forum: Switch Development
- Topic: Connecting to USB Serial Device
- Replies: 4
- Views: 434
Re: Connecting to USB Serial Device
Found my issue.... I had sys-con loaded which claims all USB devices... Thanks for the help, learnt a lot about USB and the switch while debugging this. Now to actually talking to the device...
- Tue Feb 20, 2024 3:27 pm
- Forum: Switch Development
- Topic: Connecting to USB Serial Device
- Replies: 4
- Views: 434
Re: Connecting to USB Serial Device
Sadly, that didn't work either in my case. I tried matching against the VID/PID with no results.
I'm not sure if I got the right values, so I'd like to just dump everything the switch sees - Is it possible to build a filter which matches almost every device?
I'm not sure if I got the right values, so I'd like to just dump everything the switch sees - Is it possible to build a filter which matches almost every device?
- Tue Feb 20, 2024 9:44 am
- Forum: Switch Development
- Topic: Connecting to USB Serial Device
- Replies: 4
- Views: 434
Connecting to USB Serial Device
I'm porting an existing tool to the switch and the last piece of the puzzle is communicating with a device attached to the USB port. The existing implementation supports either libserial or libusb, both of which seem to be incompatible with the switch. I think I should be able to rewrite the communi...