Search code examples
c#serial-portmodbustcomport

Read Serial port via web browser


I am currently reading Modbus via Serial port (Serial.IO.Ports) using ASP.NET C# Web application, I am able to read the serial port as I am running the application on my local machine.

While working on the project, I thought that the web app won't work once deployed on server because, it will try to access server's Serial port(COM) and not client's (the one running the website) obviously. Is there any library or package I can use to read the Serial port of the machine which is running the browser.

Let me know if I was not clear or if you need any more info.


Solution

  • If you're developing your app for your customer(s) you can: 1. develop windows-service that accepts http requests 2. Share the serial somehow on the ethernet so that the server can connect to the KNOWN ip address.

    Browser ( JavaScript ) can't talk directly to the serial port.