Forum Index > Handling of Unexpected Removal of USB to Serial Adapters

By: MJDBI Posted on: Apr 1 2011 at 12:14:07 AM
The SerialPort component that is part of the .NET framework has known issues with USB to serial adapters. Namely, an uncatchable exception (typically a 'Permission denied' exception on the serial port component's internal thread) occurs if a serial port using one of these devices is opened, and then the adapter is removed without closing the port first; or, if that does not happen, an exception occurs on program shutdown when the framework attempts to finalize the port (which of course no longer exists).

How would your component react in this situation? Being able to 'ride through' unexpected removal of a USB to serial adapter is absolutely critical to my application.

Thanks in advance for your support.

By: Support Posted on: Apr 2 2011 at 11:34:40 AM
Many developers say that our component does not crash if the USB adapter is removed. You can trap the error, close the port handle and attempt to reopen it if/when the adapter is reconnected.

Of course we can't guarantee this with every possible adapter Because we couldn't test develop with every adapter but the feedback we're getting from developers is that this is one reason why they use our component.

 

Reply - add comment to this topic
You may enter letters, numbers and standard punctuation only. HTML and other scripts/tags will be rejected
  Topic:- Handling of Unexpected Removal of USB to Serial Adapters

Your Name


 


Forum scripts and databases - Copyright (c) 2009 - 2012 AxCoL.com