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