How can a web page read from the user's serial port - in the year 2017?

后端 未结 6 1700
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 10:28

I have to re-implement an existing system from scratch.

At one point, when the user navigates to a certain web page the server must read data from the user\'s seria

6条回答
  •  孤街浪徒
    2020-12-04 10:52

    You could use Web USB - but browser compatibility is (currently) very low - Chrome 61 seems to be about it.

    The main benefit of this approach, is that the usb device is plugged into the browser machine. Apparently this works for Chrome for Android 64 as well (not tested).

    The API is at https://wicg.github.io/webusb/.

    For a tutorial see https://developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web.

提交回复
热议问题