I created a meteor app that communicates to serial port.
The communication to the serial port is working fine on the server side.
Now, I’m looking to run it on the client side, means my server app will be deployed on a distant server, and clients will connect and use the app without the need to install meteor npm…
The need is that each client app will be able to communicate to serail Port locally.
Is there any way to do that?
As in a serial port on the clients computer? Or everyone talking to the port on the server?
each client has to communicates to the serial ports on its client computer.
It’s not possible to access a serial port from a web browser as websites are restricted to a sandbox. This is a very important security aspect of web browsers.
Chrome used to have a Serial API for the Chrome Apps, but Browser support for those Apps has been discontinued and they are only available on ChromeOS.
So your only option is to develop a native application, which is able to communicate with the serial port and your server application.
Thank you chris,
could you please explain more about the native app.
what I’m trying to do now, is developing a separate node JS server, based on web socket node, and serialPort. so it will be running locally on each client computer, and communicates with the client.
the flow will be like this:
- The meteor app is deployed on a distant server (I’m using heroku).
- Each client session started on the browser will run a separate node JS server (w2s.js)
- the w2s.js and the meteor client communicates locally.
Have I missed something ?
If you can get the client computers to manually install and run the serial server, then you can do this.
The best implementation depends on your needs.
Do you need request / response type communication with the serial port?
Or does it feed you live data?
Do you need to communicate in response to user input? or in real-time?
I’d suggest you use Meteor methods for a request / response or user input architecture; and for live data, add the data to a collection and allow meteor to feed it to the client.
To have the browser communicate with their local server app you’ll need to connect to it with
Then use one of the above approaches