I had that problem with a Delorme BlueTooth GPS thingy. I ended up throwing it away because it wasn't usable.
I had that problem with a Delorme BlueTooth GPS thingy. I ended up throwing it away because it wasn't usable.
Well, I may have to apologise! I have checked our code again on Win7-64 and XP SP3 with a Keyspan USA-19HS and a generic Prolific (branded Nikkai) USB serial port. Both PCs are fully updated. We're in the middle of an office refurb, so I have no easy access to other PCs or USB serial adapters.
In both cases, neither PC generates any error bits in the variable specified by ClearCommError(). The controlling program still survives the experiences.
The original code is marked as 2005 in the change markers and was throughly tested at the time. Oh, dear.
There's a 1998 MSDN CD set somewhere ... I knew I shouldn't have thrown out the more recent ones ...
Stephen
-- Stephen Pelc, stephenXXX@mpeforth.com MicroProcessor Engineering Ltd - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 web: http://www.mpeforth.com - free VFX Forth downloads
It now turns out that ClearCommError() returns 0 if a USB serial port is disconnected. This fits well with the current Windows documentation. Our terminal emulator now closes the port gracefully when the USB adapter is diconnected.
Stephen
-- Stephen Pelc, stephenXXX@mpeforth.com MicroProcessor Engineering Ltd - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 web: http://www.mpeforth.com - free VFX Forth downloads
My first guess is that Winders does not properly comply with the USB specification, or that the specification itself has problems with disconnect followed by reconnect. Fortunately the USB specification is publicly available from the USB consortium.
?-)
W dniu 2012-07-08 01:00, John Larkin pisze:
Hi. Use terminal v1.9b by Br@y++. It can close virtual port after disconnecting usb cable.
-- Regards MD
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.