I have two devices that are continuously feeding data through ttyUSB0 and ttyUSB1. I have php scripts that are using this data. The problem I am running into is that sometimes the feed just kind of freezes. The best way I've seen to fix this is to unplug the BUB board from the computer and plug it in again. However, I am looking for a way to automate this action. Is there a way to to tell linux to essentially eject the BUB board and then somehow pick it up again?
I'm having the same problem as you but in a different context ( I open a serial console on a linux box ). The serial link sometimes becomes unresponsive and I have to physically unplug the USB-serial converter.
The below seems to solve my problem, but not always.
With sdive's answer I kept getting "FATAL: Module usbserial is in use."
I finally solved the problem with some guidance from LiLo's answer here: http://askubuntu.com/a/661/379851
But instead of using some C code, I wrote a python equivalent that also finds the bus and device in question:
Just save this as reset_usb.py or something and then run it like this:
Where driver_name is the output from
In my case, it was cp210x, so I run it like this: