Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Detect Serial Disconnect?

Options
  • 30-01-2009 6:22pm
    #1
    Closed Accounts Posts: 20


    Hi all

    What is the best method of detecting when a serial device is unplugged? I know there is no built in feature/function which can monitor this. My idea was to try and read from the device, and if an exception is raised we can assume the device has been disconnected?
    Are there any other more reliable/safe ways of doing this?

    I'm using C# and regular SerialPort components.

    Any help much appreciated.

    Regards
    Whack


Advertisement