Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stops detecting USB device insertion #425

Open
riban-bw opened this issue Oct 31, 2018 · 4 comments
Open

Stops detecting USB device insertion #425

riban-bw opened this issue Oct 31, 2018 · 4 comments
Labels

Comments

@riban-bw
Copy link
Contributor

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.

@riban-bw riban-bw changed the title Stops detecting USB device after disconnection Stops detecting USB device insertion Oct 31, 2018
@maustin-lpi
Copy link

maustin-lpi commented Nov 28, 2018

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

@Ryzee119
Copy link

Ryzee119 commented Jan 14, 2019

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.

@Lauszus
Copy link
Collaborator

Lauszus commented Feb 4, 2019

@Ryzee119 thanks for the feedback. Any change you could test the following PR: #438 and see if that fixes the issue.

@Lauszus
Copy link
Collaborator

Lauszus commented Feb 4, 2019

@felis please see the comment by @Ryzee119 seems like this could be called by always calling busprobe here:

if(HIRQ & bmCONDETIRQ) {
busprobe();
HIRQ_sendback |= bmCONDETIRQ;
}

Sounds like the CONDETIRQ is not always set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants