You'll have to manage this kind of exceptions. Using udev to create a link
to the last ttyUSBX device created could be useful. I use rules like this
freqüently:
KERNEL=="ttyUSB[0-9]*" , SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403" ,
ATTRS{idProduct}=="6001" , ATTRS{product}=="USB-RS485 Cable" ,
SYMLINK+="ftdi485"*Jordi Soucheiron* Software Engineer [email protected] *DEXMA* Parc Tecnològic Barcelona Nord c/ Marie Curie, 8-14 (Oficina 227) ES-08042, Barcelona t: (+34) 93 181 01 96 www.dexmatech.com Follow us on Twitter <http://www.twitter.com/dexma> and Linkedin<http://www.linkedin.com/company/247838> 2011/9/5 Rainer Stratmann <[email protected]> > Am Monday 05 September 2011 16:42:15 schrieb [email protected]: > > Thanks a million for the advise. > > I'm a bit more interesting debugging the problem and understanding what > is > > the cause of the disconnection. Indeed, the USB device disconnects from > > ttySB0 and reconnects automatically to ttyUSB1. The problem is that > during > > the time when the device disconnects and reconnects I lose precious data > so > > I'm trying to avoid disconnections. Any other idea? > Even if everything is ok it MAY BE some times that the device will > disconnect > (for what reason ever). And then it would be good also to have a automatic > reconnect in your software. I have it. > What USB serial device do you have? > Best regards, Rainer > > Thanks > > Davide > > > > On 5 Sep 2011, at 15:17, Rainer Stratmann wrote: > > > You can close ttyUSB0 and open ttyUSB1 if you detect a disconnect. > > > You can detect on which usb port a FTDI Chip is connected. > > > > > > /sys/bus/usb/drivers/x-x:x.x/ttyUSBx > > > > > > x is various. > > > > > > Am Monday 05 September 2011 16:06:00 schrieb [email protected]: > > >> Hi, > > >> > > >> I'm using Alix 2D3 and Voyage 0.7.5, and I'm facing a nasty problem > with > > >> the USB. I have a device connected by USB and I have to read > information > > >> from that device continuously for few months. For some reason, after a > > >> while, the USB disconnects!!! Happened many times already and always > > >> after a random period of time (few hours or few days). > > >> > > >> Has anybody of you had similar problem? > > >> > > >> As you can see below, from my dmesg output, the USB went off after > more > > >> than 2 days of activity! > > >> > > >> [ 62.583495] device tun0 entered promiscuous mode > > >> [181469.402683] hub 1-0:1.0: port 1 disabled by hub (EMI?), > > >> re-enabling... [181469.403667] usb 1-1: USB disconnect, address 2 > > >> [181469.406021] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now > > >> disconnected from ttyUSB0 > > >> [181469.406654] ftdi_sio 1-1:1.0: device disconnected > > >> [181469.627963] usb 1-1: new full speed USB device using ohci_hcd and > > >> address 3 [181469.777676] usb 1-1: configuration #1 chosen from 1 > choice > > >> [181469.783296] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter > > >> detected [181469.784171] usb 1-1: Detected FT232BM > > >> [181469.785634] usb 1-1: FTDI USB Serial Device converter now attached > > >> to ttyUSB1 > > >> > > >> I google it a bit but I have not found solution yet > > >> > > >> Any comment is more than welcome > > >> > > >> Many thanks > > >> Davide > > >> _______________________________________________ > > >> Voyage-linux mailing list > > >> [email protected] > > >> http://list.voyage.hk/mailman/listinfo/voyage-linux > > > > > > _______________________________________________ > > > Voyage-linux mailing list > > > [email protected] > > > http://list.voyage.hk/mailman/listinfo/voyage-linux > > > > _______________________________________________ > > Voyage-linux mailing list > > [email protected] > > http://list.voyage.hk/mailman/listinfo/voyage-linux > > > > _______________________________________________ > Voyage-linux mailing list > [email protected] > http://list.voyage.hk/mailman/listinfo/voyage-linux >
_______________________________________________ Voyage-linux mailing list [email protected] http://list.voyage.hk/mailman/listinfo/voyage-linux
