Version 0.0.3
This Chrome app provides serial port access ability for your website.
Method 1: Go to Chrome's Tools -> Extensions then click "Load unpacked extension...". Then click on Launch to get it working
Method 2: Or, You can install it by dragging and dropping the released crx file in the root directory to chrome://extensions/
Method 3: Visit here for official installation: https://chrome.google.com/webstore/detail/web-com/mbndnomfbkfijpkbmnohmnnbfbhknfba
- Install and start Web COM packaged app, it will listen on port 8301 (or you could change the listen port)
- Create a websocket connecting to localhost:8301 with type 'arraybuffer' and add your event callback handlers
ws = new WebSocket('ws://localhost:8301/'); ws.binaryType = 'arraybuffer'; ws.addEventListener('open', function() { ... }); ws.addEventListener('close', function() { ... }); ws.addEventListener('message', function(data){ ... });
- Select path and connection options, open the serial port, and then use
ws.send()
to send string or array buffer
You can also find the example here: https://jsfiddle.net/strawmanbobi/nt4x3c23/