On Sun, Jun 03, 2007 at 07:01:33AM -0400, Uncle George wrote:
> Robert Hancock wrote:
> 
>  > It's because you haven't done anything to handle the error which is 
> still persisting. Likely the only thing sane you can do in this case is 
> close the fd and try to reopen it later.
>  >
> This seems to be true, but not for what you might think.
> 
> It appears that if u plug the USB/serial device back into the usb-hub, 
> the code creates a /dev/ttyUSB1 ( if you have not yet closed the 
> disconnected /dev/ttyUSB0. ) When you do close /dev/ttyUSB0, then the 
> device is erased from the /dev directory.
> 
> Now /dev/ttyUSB1 is the device. And /dev/ttyUSB0 disappeared. This does 
> not seem proper. As now the program has no idea or capability to re-open 
> the GPS device.
> 
> I have been informed that this was an approved kernel feature. Is this 
> suppose to happen? Or was it an unintended consequence?

The program knows that the tty device went away as it got the "hangup"
signal when it happened.  So it can let go of the device node at that
time so that when it comes back it will come back in the same "name" if
you really want it to.

But in reality, use HAL to enumerate the usb-serial devices to make sure
you know what is present.

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to