Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top