1

I have to communicate with a device via serial communication. As I'm using C++/CLI , I use the function "SerialPort.Write" Everything works fine and then randomly the program is stuck.Only way to get it back is by removing the USB cable. I have set the timeout to 500ms.

2
  • 1
    Timeouts are implemented by the device driver. The worst kind of device drivers are certainly found in USB drivers that emulate a serial port. Throw it away, buy another one. Spend more than 10 bucks. And never disconnect the cable when the port is opened, always use "Safely remove hardware". May 7, 2014 at 9:44
  • But I cannot buy another ... the hardware has a different kind of male connector at the other end.... in that case would it be helpful if we use serial to usb converter and than connect it to this cable May 7, 2014 at 10:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.