USB与Android/Arduino通讯 [英] USB Communication with Android/Arduino

查看:45
本文介绍了USB与Android/Arduino通讯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发这个需要通过 USB 进行通信的 Android 应用程序.我有一个爱可视 101 平板电脑(规格在这里:http://www.archos.com/products/ta/archos_101it/specs.html?country=us&lang=en).它有一个完整的 USB 主机端口.我可以将闪存 USB 驱动器插入 USB 端口,并将文件从闪存驱动器复制到内部存储器或从闪存驱动器复制文件.

I am working on this Android application that needs to communicate over USB. I have an Archos 101 Tablet (specifications here: http://www.archos.com/products/ta/archos_101it/specs.html?country=us&lang=en). It has a full USB host port. I can put a flash USB drive in the USB port and copy files to and from the flash drive onto internal storage.

我有这个 Arduino Fio 板,带有 XBee 附加到它.我有一个 XBee Explorer Dongle 和另一个 XBee,我打算将它连接到 Archos 101 平板电脑的 USB 端口.

I have this Arduino Fio board, with an XBee attached to it. I have an XBee Explorer Dongle with another XBee that I plan to hook into the Archos 101 tablet into the USB port.

截至目前,我可以将 XBee Explorer Dongle 放入我的计算机并与 Arduino Fio 发送/接收数据,没问题.

As of right now, I can put the XBee Explorer Dongle into my computer and send/receive data to and from the Arduino Fio, no problems.

Android 有没有办法通过 USB 进行通话?我知道平板电脑中某处必须有驱动程序允许 USB 通信,但我找不到访问它们或使用它们的方法.

Is there a way for Android to talk over USB? I know there has to be drivers somewhere in the tablet allowing USB communication, but I cannot find a way to access them or use them.

我可以看到 Android 识别 XBee Explorer Dongle.我下载了一个终端模拟器,我可以输入dmesg"并看到它看到了加密狗.但我不能用它做任何事情.

I can see Android recognizing the XBee Explorer Dongle. I downloaded a terminal emulator, and I can type "dmesg" and see that it sees the dongle hooked up. But I cannot do anything with it.

我似乎需要一个适用于 Android 的 FTDI 驱动程序.

I seem to need a FTDI driver for Android.

如果您能帮助我的平板电脑与 XBee Explorer Dongle 通信,我将不胜感激.

I would greatly appreciate any help in getting my tablet to communicate with the XBee Explorer Dongle.

推荐答案

如果您有 root 权限并且可以破解您的内核,FTDI 会提供适用于 Android 操作系统的 D2XX 驱动程序.请检查它的网站.

If you have root and can hack your kernel, FTDI offers its D2XX driver for Android OS. Check its website, please.

如果您的 Android 设备是 3.1+,您应该可以使用 Android USB 主机与 Arduino 通话.但是,我在这方面遇到了一些问题.

If your Android device is 3.1+, you should be able to use Android USB host to talk with Arduino. However, I met some issues on this.

如果您手头有 ADK/UHS,您的 Arduino 可以充当 USB 主机并与 Android USB 设备通信.即使在同样的硬件上,如果你的安卓操作系统很老,比如 1.5/1.6,你必须使用 ADB 接口,而不是 ADK(Accessory Developer Kit)协议.

If you have ADK/UHS at hand, your Arduino can act as USB host and talk to Android USB device. Even in same hardware, if your Android OS is quite old like 1.5/1.6, you have to use ADB interface rather than ADK (Accessory Developer Kit) protocol.

如果您有蓝牙,您可以在您的应用中编写自己的蓝牙 SPP.

If you have Bluetooth, you can write your own Bluetooth SPP in your app.

如果您可以处理 WiFi,您可以编写应用程序与套接字通信,或通过 Android 中最新的 WiFi 直连模式.

If you can handle WiFi, you can write app to communication with socket, or via latest WiFi direct mode in Android.

沟通是多种多样的.但是,这取决于您的硬件.

Communication is various. However, it depends your hardware.

这篇关于USB与Android/Arduino通讯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆