I have device which is connect to PC via USB Serial communication. I am performing following steps
- Start Device (Power On)
- Device will detected in my PC as COMx name
- Start my application
- On base of COM PID/VID, I connect to device
- Perform communication. (Up to this I am not facing any problem)
- when I switch off device, device is disconnected but I cannot able close connection.
- When I again start(Switch on) device, Device is detected but my application cannot able to connect to COMx(device). It throws IOException "COMx does not exist"
So I think I have some way to close communication port forcefully.
I have found solution though it can not be called standard solution but though i don’t have any problem with that solution because it solves my problem the solution is as per belove step
FIRST STEP:-
SECOND STEP:-