Serial Port Communication Asp Net6/9/2023 ![]() This app or service would read the data and "publish" it via a simple JSON-based api that your web app can GET (or could use web sockets to push the data once the initial connection is made by the web app) and could also accept commands from the web browser via POST, etc. You could embed a self-hosted Web API into either your existing desktop app or a tray application / Windows service, etc, that interfaced with the serial port as you currently do. The problem with this would maybe having to create plugins for all browsers (assuming you want the web application to run on whatever browser the user chose) Self-hosted WebAPI in a desktop app You could write a browser plugin that can do whatever it wants (within the limitations of a browser plugin of course) and can be used by your webpage by injecting the serial data feed into the page. However depending on what you need to do there are a couple of options (and probably more that I haven't thought of) Browser plugin I could be wrong, but I don't think it's possible to read a serial port (or indeed any type of port) directly from the browser because there isn't going to be any interface to the underlying system hardware, etc.
0 Comments
Leave a Reply. |