I have a c# app that connects pc to a device, through a serial port.

When I send data to the device, if the device sends data back, the datareceived event fires.

And I want to ask this. Is there a way to simulate the data sending of the device?

I mean, i want to fire datareceived event not only when the device send data.

Is this possible?

有帮助吗?

解决方案

You must have an additional free serial port.

If need be, you may:

  • just add another new one or
  • install a virtual COM port solution (such as com0com).

You can harness your C# program using a software emulator of the device through Null modem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top