<small id='zRgCH'></small><noframes id='zRgCH'>

    • <bdo id='zRgCH'></bdo><ul id='zRgCH'></ul>

  • <tfoot id='zRgCH'></tfoot>

    <legend id='zRgCH'><style id='zRgCH'><dir id='zRgCH'><q id='zRgCH'></q></dir></style></legend>
    <i id='zRgCH'><tr id='zRgCH'><dt id='zRgCH'><q id='zRgCH'><span id='zRgCH'><b id='zRgCH'><form id='zRgCH'><ins id='zRgCH'></ins><ul id='zRgCH'></ul><sub id='zRgCH'></sub></form><legend id='zRgCH'></legend><bdo id='zRgCH'><pre id='zRgCH'><center id='zRgCH'></center></pre></bdo></b><th id='zRgCH'></th></span></q></dt></tr></i><div id='zRgCH'><tfoot id='zRgCH'></tfoot><dl id='zRgCH'><fieldset id='zRgCH'></fieldset></dl></div>

      1. Android:USB通信Android&lt;-&gt;外接设备

        时间:2023-09-12
        <legend id='vrzsG'><style id='vrzsG'><dir id='vrzsG'><q id='vrzsG'></q></dir></style></legend>

          <i id='vrzsG'><tr id='vrzsG'><dt id='vrzsG'><q id='vrzsG'><span id='vrzsG'><b id='vrzsG'><form id='vrzsG'><ins id='vrzsG'></ins><ul id='vrzsG'></ul><sub id='vrzsG'></sub></form><legend id='vrzsG'></legend><bdo id='vrzsG'><pre id='vrzsG'><center id='vrzsG'></center></pre></bdo></b><th id='vrzsG'></th></span></q></dt></tr></i><div id='vrzsG'><tfoot id='vrzsG'></tfoot><dl id='vrzsG'><fieldset id='vrzsG'></fieldset></dl></div>
          • <bdo id='vrzsG'></bdo><ul id='vrzsG'></ul>
              <tfoot id='vrzsG'></tfoot>
                <tbody id='vrzsG'></tbody>

                <small id='vrzsG'></small><noframes id='vrzsG'>

                • 本文介绍了Android:USB通信Android&lt;-&gt;外接设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我发现了几个关于这个主题的帖子,但是在阅读之后我对我的问题没有一个清晰的概念.

                  I found several threads speacking about this subject, but after read them I don't have a clear idea about my problem.

                  我们有一个外部设备(类似于 tomtom 设备,我的意思是,不是附件),我们想将此设备连接到 Android 设备.我们希望使用 USB 连接在外部设备和 android 设备之间进行串行通信.(此时外接设备与其他非安卓设备使用RS232接口进行通信,但外接设备可以通过usb线处理)

                  We have a external device (something like a tomtom device, I mean, not an accessory) and we want to connect this device to an android device. And we want to have serial communication between the external device and the android device using a USB connection. (At this time we have communication between the external device and other non android devices using RS232 interface, but the external device can handle the communication using a usb cable)

                  据我所知,我们从 3.1 开始就支持 USB API.

                  As I read, we have USB API support since 3.1.

                  我们可以开发一个使用 USB 电缆与我们的外部设备通信的 android 应用程序吗?我的意思是,向设备发送数据和从设备接收数据,这两种方式,我们都希望将 Android 设备用作显示器".

                  Can we develop an android application which communicates with our external device using USB cable? I mean, sending data to the device and receiving data from the device, both ways, we want to use the Android device as a "display".

                  非常感谢您.

                  推荐答案

                  我基本上和你描述的一样.我仍处于早期阶段,但我在一些限制条件下管理了此类沟通:

                  I'm basically doing the same you are describing. I'm still at the early stages but I've managed such communication under some constraints:

                  1. 您需要支持 USB 主机 API 的设备.API 本身自 Android 3.2 左右就已经存在,但似乎并非所有设备都支持它.看起来大多数运行 >4.0 的设备应该可以工作,但仍然是您应该进行的每台设备检查.我目前正在使用 Acer Iconia Tab A510,到目前为止它似乎可以工作,但有一些小故障:例如,您无法在使用 USB 端口时为设备充电,因为它与充电器共享但与 USB 不兼容.
                  2. 正如 Neil 所说,USB API 是低级的,所以我认为您需要一个适用于您的 USB 芯片组的驱动程序(您身边的那个,即在您的设备中).我在这里非常幸运,因为有一个开源项目正在开发 FTDI 芯片组,而这恰好是我选择的.如果这也是你的情况,你应该检查项目:
                    • FTDriver:https://github.com/ksksue/FTDriver
                    • Android USB 串口监视器精简版:https://github.com/ksksue/Android-USB-Serial-Monitor-Lite 这个甚至在 Google Play 中有一个应用程序,所以你可以安装它并开始玩";-)
                  1. You need a device supporting the USB Host API. The API itself has been around since Android 3.2 or so, but not every device seems to support it. It looks like most of the devices running >4.0 should work, but still is a per device check you should do. I'm currently using an Acer Iconia Tab A510, which so far seems to work but has some glitches: for instance, you cannot charge the device while using the USB port as it is shared with the charger but not compatible with USB.
                  2. As Neil says the USB API is low level, so I think you will need a driver for your USB chipset (the one at your side, i.e. in your device). I've been quite lucky here as there's an open source project working on FTDI chipsets that happen to be the ones I've chosen. If that's your case too, you should check the projects:
                    • FTDriver: https://github.com/ksksue/FTDriver
                    • Android USB Serial Monitor Lite: https://github.com/ksksue/Android-USB-Serial-Monitor-Lite This one has even an app in Google Play, so you can install it and start "playing" ;-)

                  我希望这会有所帮助.正如我所说,我开始在这个生态系统中工作,但我仍然需要在许多地方"中找到自己的方式.

                  I hope this helps. As I've said, I'm starting to work in this ecosystem and I still have to find my way around many "places".

                  干杯,阿西尔.

                  这篇关于Android:USB通信Android&lt;-&gt;外接设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:从 PC 向 Android 手机发送命令 - 通过物理连接(USB、串行等) 下一篇:在Android上访问本机串口

                  相关文章

                    1. <i id='qEYcV'><tr id='qEYcV'><dt id='qEYcV'><q id='qEYcV'><span id='qEYcV'><b id='qEYcV'><form id='qEYcV'><ins id='qEYcV'></ins><ul id='qEYcV'></ul><sub id='qEYcV'></sub></form><legend id='qEYcV'></legend><bdo id='qEYcV'><pre id='qEYcV'><center id='qEYcV'></center></pre></bdo></b><th id='qEYcV'></th></span></q></dt></tr></i><div id='qEYcV'><tfoot id='qEYcV'></tfoot><dl id='qEYcV'><fieldset id='qEYcV'></fieldset></dl></div>

                      <tfoot id='qEYcV'></tfoot>
                    2. <legend id='qEYcV'><style id='qEYcV'><dir id='qEYcV'><q id='qEYcV'></q></dir></style></legend>
                        <bdo id='qEYcV'></bdo><ul id='qEYcV'></ul>
                    3. <small id='qEYcV'></small><noframes id='qEYcV'>