I'm writing a dotnet core application that interfaces with a cellular modem through a serial COM port (USB) and sends and receives AT commands. The application utilizes the SerialPort class. This is working great. However, there is a business requirement that, while the application is running, the customer can still Putty to that (or a) COM port and send/receive AT commands to the modem. Currently this is not possible because the application holds the port and the port is thus locked.
Is there a way, in C# dotnet core, to create a new virtual com port and forward the existing modem COM port send/receive data onto that new virtual com port? The end goal being, the customer can use Putty to interface with the modem while at the same time the application can still hold the port open and also communicate with the modem.
Ideally, the solution would work both on Windows and Linux.
Any help is greatly appreciated!