New topic: Disconnect - Reconnect usb/RS232 adapter
<http://forums.realsoftware.com/viewtopic.php?t=31400> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message IanS Post subject: Disconnect - Reconnect usb/RS232 adapterPosted: Thu Dec 03, 2009 7:24 am Joined: Sun Dec 23, 2007 10:19 am Posts: 251 An application is transmitting data out of the Com (RS232) port. It receives xOff so stops transmitting and waits for xOn If the remote device does not send xOn - for example it is disconnected and goes away the application never receives xOn so the com port is blocked waiting for xOn forever. When the Com port is a physical com port then the application can simply time out, close the port, reopen it and it's ready to go - no problem. But if the Com port is a USB adapter then the block seems to be lower down in the USB driver and closing the virtual com driver does not clear the port. It remains blocked. Calling API functions such as ClearCom, PurgeCom, Cancelio and even CloseHandle doesn't clear it. When you open the port it's still blocked. Closing and restarting the application appears to work 'sometimes'. The only guaranteed way to clear the blockage is to unplug the USB cable and plug it back in again. Does anyone know of an API call that could reset the USB driver ? Or maybe somebody has had this problem and knows of a fix ? Thanks Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
