Skip to contentSkip to conversation

select(2), usbserial, tty's and disconnect

DISCUSSION Joerg Pommnitz 1 participant 1 message Mar 9, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 1 line · Robert Hancock

There was discussion at one point about doing a tty_hangup() when the >

USB device was disconnected (this causes the read() to return with 0 > > bytes and future open attempts to fail), and a patch was put out to do > this. I thought this had been merged, but I could be wrong.

Well, I observed the hanging select with SuSE kernel 2.6.8-24.11, so it is fairly current. I'm seeing this problem with an Option Wireless UMTS data card. This card is interesting. It is a CardBus card that presents a USB OHCI hub to the system. Internally it claims to plug in a USB serial connector. If you issue a RESET AT command, the kernel tells me that the USB device virtually plugged into the hub got disconnected. A few seconds later the gets plugged in again. At this point I would have to reopen the tty. Unfortunately the disconnect event does not propagate to the application. I could poke the tty to see whether it is still really there, but this seems quite hackish.

Regards
Joerg

___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de