On Tue, 24 Apr 2007 20:37:12 ik wrote: > > I have a serial usb device, that from time to time disconnect > according to the kernel (dmesg): > > usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB1 > ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from > ttyUSB0 > > And then as you can see, the kernel assign it to a new address. > > I'm looking either at a hint of what should I be looking on what > causing it to disconnect, or for a bash/perl (or C) way to find what > is the active usb /dev/ device to use. > > The kernel I'm using is 2.6 (at the moment 2.6.20) on Fedora Core 6. > > Any hints and tips on the subject are more then welcome
I read the answers on this list and they look relevant but not to the point. If you have only one such usb device you can do something like this (in bash): DEV=`echo /dev/ttyUSB?` and you'll get your device. You can do this within a C program by readdir(). If you have more than 1, you can get all the devices names, but you'll have to research a way to find which is which. Ehud. -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]