访问Android Chrome浏览器中的Web串行API

发布于 2025-01-28 07:37:41 字数 360 浏览 3 评论 0原文

在Windows,Mac OS和Linux Chrome浏览器中使用Web Serial API,我可以接收并发送数据。但是在Android Chrome浏览器中,我无法从串行设备发送或接收数据。

因此,哪个API用于在Android Chrome浏览器中读取和写入数据。

另外,还有一个用于Android Chrome的综合串行API,但在图像中显示了一个错误。 “在此处输入图像说明”

using web serial API in windows, mac os, and Linux chrome browser I can receive and send data. but in the android chrome browser, I am not able to send or receive data from a serial device.

so which API is used to read and write data to serial devices in the android chrome browser.

also, there is a polyfill serial API for android chrome but is showing an error shown in the image.enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

┊风居住的梦幻卍 2025-02-04 07:37:41

在Chromium中构建Web串行API实现的团队还编写了一个Polyfill库,该库使用WebUSB支持不提供内置串行驱动程序的平台: https://github.com/google/web-serial-polyfill

看起来您已经在尝试使用此库。您可以在图书馆的GitHub项目上提交问题,以便团队可以查看您看到的错误吗?

请注意,似乎有些具有USB串行驱动程序的Android设备最终会阻止Webusb声称接口,即使该平台不允许应用程序实际使用它们。 https://crbug.com/1099521 正在跟踪解决方法。

The team that built the implementation of the Web Serial API in Chromium also wrote a polyfill library which uses WebUSB to support platforms which don't provide built-in serial drivers: https://github.com/google/web-serial-polyfill

It looks like you are already trying to use this library. Can you file an issue on the library's GitHub project so the team can look at the error you're seeing?

Note, it seems like there are some Android devices which have USB serial drivers that end up blocking WebUSB from claiming interfaces even though the platform doesn't let apps actually use them. https://crbug.com/1099521 is tracking a workaround for that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文