Chrome extension: how to use serial port (now that apps are sunsetting)?

南楼画角 提交于 2019-11-30 05:12:49

You could continue on the same path of writing a chrome app and using the chrome.serial API, but use NW.js as the runtime of your app. It supports the Chrome App APIs. Essentially you just write your Chrome App but instead of opening it in Chrome you open it in NW.js executable.

https://nwjs.io/

Or you could use a Node.js package such as serialport to access your COM port

https://github.com/EmergingTechnologyAdvisors/node-serialport

In this case you could write it as either NW.js app, or an Electron app. Electron is quite popular lately. You have access to the node module ecosystem and also Chromium - open source part of Chrome web browser so you can still do all the HTML/JavaScript/CSS you want.

https://github.com/electron/electron

This is also one of the suggested paths from Google: https://developer.chrome.com/apps/migration#native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!