Open riban-bw opened 6 years ago
I'm seeing a similar issue with my XBOX ONE Controller using the XBOXONE sketch.
I can see the controller is recognised after being reconnected, based on the returned value from XBox.XboxOneConnected(), but its not reliably reading button presses, etc from the connected controller.
If I disconnect and reconnect the USB cable, I can usually get it to connect properly (sometimes on the first go, sometimes after a couple of disconnect/reconnects). I can also achieve this with a hardware reset of the Arduino or USB Shield.
I might try adding the USB::Reset approach you've mentioned above until this issue gets properly resolved
I had a similar issue with the XBONE sketch. I found that the JSTATUS and KSTATUS from getVbusState was not updating when I removed the device. I added pUsb->busprobe(); at the beginning of the XBOXONE::Poll() function and it seems to have resolved my issues.
Edit: If I just add Usb.busprobe() to my main loop just above Usb.Task() that seems to have also fixed my issue without modifying the libraries.
@Ryzee119 thanks for the feedback. Any change you could test the following PR: https://github.com/felis/USB_Host_Shield_2.0/pull/438 and see if that fixes the issue.
@felis please see the comment by @Ryzee119 seems like this could be called by always calling busprobe
here:
Sounds like the CONDETIRQ
is not always set?
Occasionally UHS2 stops detecting newly plugged device after previous device is removed. I have found that performing a USB::Reset seems to stop this behaviour so maybe something configured by USB::Reset is not being set during initialisation or being subsequently changed.