I have a product using Beagle Bone Black running Debian GNU/Linux 10, BeagleBoard.org Debian Buster IoT Image 2020-04-06
I have an application and a custom cape using 4 serial com ports (1,2,4,5). I also use the USB-A port to connect to and Arduino board which creates a /dev/ttyUSBx device. I have given my USB port a fixed name “adlTapHub” using the idProduct and idVendor so it doesn’t change every time I reconnect the USB device.
I have shipped 100 units to a customer overseas, and after succcessful SI testing and installation on he first pilot, the second site they have installed has developed a problem where after about a day or 2 operation, my /dev/adlTapHub device disappears. My application continues to run and the 4 serial ports continue working, it only seems to be the ttyUSBx port affected.
I have tried unplugging and replugging the USB cable, and also power cycling the Arduino device (not powered from the USB cable), but this does not fix it.
Rebooting Linux on the BBB (without a power cycle) fixes the problem for another day or 2.
After much chasing my tail, I had the customer swap out the BBB and the problem seems to have gone away.
But I am looking for confirmation that this is just a one off fault BBB versus there being a problem with the BBB USB ports or USB controller driver.
I have read articles about reseting USB devices and controllers.
Experimenting I found can reset the USB device using usb reset eg
Resetting USB2.0-Serial … ok
When I do this, my ap temporarily loses the com port and then finds it and successfully reestablishes coms with it, so this works. But the problem is I am losing the device so I can’t reset it. eg if I unplug the USB cable this returns:
adl@adl-pump-controller:~$ sudo usbreset USB2.0-Serial No such device found
I need to reset the USB Controller, and started following an article at https://www.linux.org/threads/resetting-the-usb-subsystem.10404/ but this does not seem to be compatible with the BBB and debian image.
Can anyone tell me how I can reset the USB controller on my BBB.