gpt4 book ai didi

android-things - 连接到 USB 外围设备

转载 作者:行者123 更新时间:2023-12-04 06:45:59 24 4
gpt4 key购买 nike

看起来 UsbManager 在构建中消失了。我们现在如何与usb外设通信?

使用 https://github.com/mik3y/usb-serial-for-android 的诸如 usb->serial 之类的东西

最佳答案

目前,外设 HAL 无法识别基于 USB 串口的 UART 外设。

但是,如果您的 USB 串行设备(例如:Arduino)暴露了单个 UART TX RX引脚,您可以使用 UART Peripheral API 与它通信.

警告:

  • 别忘了穿越TXRX将外围设备连接到开发板的 UART 板时
    uart-cross
  • 在 Raspberry Pi 3 上,需要禁用控制台,请参阅:UART peripherals on Android Things for Raspberry Pi 3
  • 关于android-things - 连接到 USB 外围设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41151610/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com