View Full Version : USB ports going away during match
MrForbes
06-04-2015, 15:01
We had an interesting issue this weekend with our driver controls dropping out. Things had been working well previously, we attended the San Antonio regional and had only one instance that I can remember of the controllers (Logitech Gamepads) not working, we unplugged them and plugged them back in and they were fine. But this weekend at Arizona, they started acting up Friday afternoon, where they would appear to be connected, then just after the match started one or both would "go away". Sometimes they came back with a USB Rescan, other times they needed to both be unplugged and reconnected.
The problem got worse late Saturday, in our final few matches we had to Rescan several times during the match to keep driving.
There was one code change before the issue started Friday, we added a vi module to make one of the buttons act as a toggle.
Each gamepad is connected to a "real" USB port on the DS laptop, there is no external hub. The laptop is on it's 3rd year, and has been working well.
kiettyyyy
06-04-2015, 15:14
This has happened to our team multiple times. Twice at AZ East this year. Numerous times in previous years.
We were fortunate enough not to have this happen to us at San Diego last week. However, I was volunteering as a CSA at the event and fixed a number of teams during matches.
It seems to manifest itself during the autonomous to teleoperated control transition.
marshall
06-04-2015, 15:16
We had an interesting issue this weekend with our driver controls dropping out. Things had been working well previously, we attended the San Antonio regional and had only one instance that I can remember of the controllers (Logitech Gamepads) not working, we unplugged them and plugged them back in and they were fine. But this weekend at Arizona, they started acting up Friday afternoon, where they would appear to be connected, then just after the match started one or both would "go away". Sometimes they came back with a USB Rescan, other times they needed to both be unplugged and reconnected.
The problem got worse late Saturday, in our final few matches we had to Rescan several times during the match to keep driving.
There was one code change before the issue started Friday, we added a vi module to make one of the buttons act as a toggle.
Each gamepad is connected to a "real" USB port on the DS laptop, there is no external hub. The laptop is on it's 3rd year, and has been working well.
We have seen a similar issue. Every time it has happened to us it has been because of a fault in the cable for the Logitech gamepad controllers. We do our best to have the students treat them with a bit of respect but they just get beat up.
That's how we spent last year. This year we switched to joysticks because of that problem. A more extreme solution, but it worked for us. :D
BitTwiddler
06-04-2015, 15:22
Not sure if it makes a difference but we use two Logitech controllers, one for the driver and one for the operator. As far as I know, they both drop out at the same time.
We fixed our usb issues in Ventura with simple "Power Option" setting changes on the windows laptop there are main ones and ones specific to USB ports in the advanced area.
marshall
06-04-2015, 15:26
Not sure if it makes a difference but we use two Logitech controllers, one for the driver and one for the operator. As far as I know, they both drop out at the same time.
That's interesting and useful info. If that is the case then that to me points to either a software fault or a more upstream hardware fault like the USB controller within the laptop.
As I said though, we've seen it happen to us and it is typically one controller that drops and it is because of a faulty cable. I've been able to repair a handful of the controllers but it is typically more cost effective to recycle it and then buy a new one.
kiettyyyy
06-04-2015, 16:12
Most of the fixes that I've done for teams was to change the power settings for the USB port.
To clarify, the issue is not isolated to gamepad controllers of a specific brand. This can happen to ANY joystick device.
MrForbes
06-04-2015, 16:24
Actually one of the controllers was dropping, and the other stayed "lit up" on the DS display. And we changed the dropping controller with another one during one of the last matches, and the problem persisted, with no apparent change.
We can look at power settings, but I'm a bit confused why something like that would make the USB port come and go several times during a match, while the control is being used continuously? Although I do understand that Windows works in strange and mysterious ways.
I wonder if this is the advanced setting? btw this is on my desktop, which also runs Windows 7. I could probably end global climate change by leaving the setting as is, rather than allowing the pesky USB hub to run all the time!
kuraikou
06-04-2015, 16:41
We were having the same issue at AZ East but we fixed the issue by triple checking the connection before every match and being ready to replug and rescan at the beginning of each match. Our issue was caused by bad USB ports and cables on our ps4 controllers, so we got new cables and that helped significantly.
evanperryg
06-04-2015, 16:44
Correct me if I am wrong, but I believe 2451 may have been having a similar problem at Midwest, that caused them to withdraw from alliance selections.
Here's a few ideas:
-Turn off the power save setting. This has caused similar problems for some teams in the past
-Uninstall and reinstall the USB driver
-Make sure that there is no other USB device that could be shorting the USB 5V supply.
-Make sure the contacts on the USB connectors are not corroded or dirty
-Make sure the USB cable fits snugly. If it doesn't, you can try gently crushing the joystick connector so that it has a better fit.
-Make sure the laptop is plugged in when you're driving.
-Make sure the laptop battery is healthy. Bad batteries can cause really weird things to happen.
-Uninstall/Reinstall the USB driver
-Disable your wireless adapter and bluetooth (if you have it). Sometimes the bluetooth adapter connects to an internal usb port, and may be causing issues.
kiettyyyy
06-04-2015, 16:59
Actually one of the controllers was dropping, and the other stayed "lit up" on the DS display. And we changed the dropping controller with another one during one of the last matches, and the problem persisted, with no apparent change.
We can look at power settings, but I'm a bit confused why something like that would make the USB port come and go several times during a match, while the control is being used continuously? Although I do understand that Windows works in strange and mysterious ways.
I wonder if this is the advanced setting? btw this is on my desktop, which also runs Windows 7. I could probably end global climate change by leaving the setting as is, rather than allowing the pesky USB hub to run all the time!
Jim, this is the setting that you'd be looking for.
MrForbes
06-04-2015, 17:05
Thanks for all the suggestions, everyone!
We have several things to check. We have not been plugging in the DS laptop charger during matches, it's been running on battery all the time.
I don't have the laptop here, hopefully it made it home on the bus Saturday night, and I can check it in an hour or so when I drop off the robot at school.
Alan Anderson
06-04-2015, 19:16
We have not been plugging in the DS laptop charger during matches, it's been running on battery all the time.
Failing to take advantage of the provided power at the field is not a good idea. It's too easy for Windows to kick in power-saving features if you're not plugged in. And if you do successfully disable them all, you're going to run down the battery much faster than "normal".
popnbrown
06-04-2015, 19:22
Correct me if I am wrong, but I believe 2451 may have been having a similar problem at Midwest, that caused them to withdraw from alliance selections.
I believe they were having issues with their roboRIO and software on the robot itself. I don't think it was a driver station issue.
orangemoore
06-04-2015, 19:48
I believe they were having issues with their roboRIO and software on the robot itself. I don't think it was a driver station issue.
It was some kind of RoboRio related issue. I don't believe it had to do directly with their driver station.
plnyyanks
06-04-2015, 20:47
We can look at power settings, but I'm a bit confused why something like that would make the USB port come and go several times during a match, while the control is being used continuously? Although I do understand that Windows works in strange and mysterious ways.
Some laptops also have "sleep and charge (https://en.wikipedia.org/wiki/USB#Sleep-and-charge_ports)" ports, which stay powered even when the computer sleeps (and I've seen some teams' DS laptops go to sleep during a match). One joystick being plugged into one of these ports and the other not could cause this when one controller stays powered when the computer sleeps.
Again, a closer examination of the laptop's power settings should help.
MrForbes
06-04-2015, 21:11
Thanks again for all the info!
We looked at the laptop, and it has a few issues that are probably causing the problem. The advanced power management setting was set to allow it to turn off the USB hub. There also might be a driver issue, we will work on reinstalling the drivers. And we never got around to making a console to put the laptop, controllers, and charger on, so it was just too inconvenient to carry everything....hence no charger on the field....lesson learned! In past years, we've had the charger with the laptop, it's just something that got overlooked this time.
I think we'll get it straightened out for Champs. And definitely by AIA.
wireties
07-04-2015, 00:50
USB connectors (and all others) are rated for a finite number of insertion cycles. In FIRST we tend to connect/disconnect more often that a normal user. If your laptops are 3 years old the connectors might be getting intermittent? If it has not happened yet, it will at some point.
nixiebunny
07-04-2015, 01:22
Whatever you do, don't try to read the USB specification for help. The latest one has 534 pages just for power!
billbo911
07-04-2015, 10:10
Thanks for all the suggestions, everyone!
We have several things to check. We have not been plugging in the DS laptop charger during matches, it's been running on battery all the time.
I don't have the laptop here, hopefully it made it home on the bus Saturday night, and I can check it in an hour or so when I drop off the robot at school.
Hi Jim,
Here is something that most likely was not the cause of the issues you were experiencing, but definitely should be considered when you are taking steps to make your DS 's performance stable and reliable.
As an FTAA twice this year, I saw several teams have issues if they had not "Locked" the location of their controllers in the DS software. When not locked, the controllers can show up in different order and locations in the DS. When your controls "go away" it is likely they will not return to where you want them if they are not locked. A locked device will always show up in the same position, regardless of which USB port it is plugged into, nor what order the device(s) are detected, as long as you are not using two identical devices.
Here are the details of the locking process from this document (https://wpilib.screenstepslive.com/s/4485/m/24192/l/144976-frc-driver-station-software).
Re-Arranging and Locking Devices
The 2015 Driver Station has the capability of "locking" a USB device into a specific slot. This is done automatically if the device is dragged to a new position and can also be triggered by double clicking on the device. "Locked" devices will show up with an underline under the device. A locked device will reserve it's slot even when the device is not connected to the computer (shown as grayed out and underlined). Devices can be unlocked (and unconnected devices removed) by double clicking on the entry.
Note: If you have two or more of the same device, they should maintain their position as long as all devices remain plugged into the computer in the same ports they were locked in. If you switch the ports of two identical devices the lock should follow the port, not the device. If you re-arrange the ports (take one device and plug it into a new port instead of swapping) the behavior is not determinate (the devices may swap slots). If you unplug one or more of the set of devices, the positions of the others may move, they should return to the proper locked slots when all devices are reconnected.
Example: The image above (see attachment) shows 4 devices:
A Locked "Logitech Attack 3" joystick. This device will stay in this position unless dragged somewhere else or unlocked
An unlocked "Logitech Extreme 3D" joystick
An unlocked "Gamepad F310 (Controller)" which is a Logitech F310 gamepad
A Locked, but disconnected "MadCatz GamePad (Controller)" which is a MadCatz Xbox 360 Controller
In this example, unplugging the Logitech Extreme 3D joystick will result in the F310 Gamepad moving up to slot 1. Plugging in the MadCatz Gamepad (even if the devices in Slots 1 and 2 are removed and those slots are empty) will result in it occupying Slot 3.
MrForbes
07-04-2015, 10:31
Thanks, I think the devices were locked, because when the controller dropped out, it was still shown in the #1 slot in gray.
billbo911
07-04-2015, 11:22
Thanks, I think the devices were locked, because when the controller dropped out, it was still shown in the #1 slot in gray.
Excellent!
That confirms two things at least.
1) It was locked.
2) Winders no longer saw the device.
Now, what the root cause of it going away is still the main focus.
All the advice here should get you to a solid answer. From the timing of when and how the failures occurred, it doesn't sound like a physical problem like a flakey connection or wiring. At least not to me
autox_vette
08-04-2015, 16:38
Correct me if I am wrong, but I believe 2451 may have been having a similar problem at Midwest, that caused them to withdraw from alliance selections.
The stimulus of the problem WAS the joysticks (I'm not sure if one failed, or if it just got unplugged moving the drivers station around), but the real problem was a programming issue which caused the application to die immediately upon entering teleop. The thrash to find the problem then introduced other issues which clouded the issue and sent everyone down wrong paths (multiple times).
Kenton Cabiness (Aka. Mr. C)
BitTwiddler
09-04-2015, 01:26
We found another interesting "feature" :rolleyes: of Windows called "USB Selective Suspend" that allows Windows to power down an individual USB port. We disabled that potential troublemaker. Google it to find out more.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.