与Android/Arduino的USB通信

发布于 2024-10-15 00:36:08 字数 975 浏览 2 评论 0原文

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

我有这个 Arduino Fio 板,带有一个 XBee 附加到它。我有一个 XBee Explorer 加密狗和另一个 XBee,我计划将其连接到 Archos 101 平板电脑的 USB 端口。

截至目前,我可以将 XBee Explorer 加密狗放入我的计算机中,并与 Arduino Fio 发送/接收数据,没有任何问题。

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

我可以看到 Android 识别 XBee Explorer 加密狗。我下载了一个终端模拟器,我可以输入“dmesg”并看到它已连接加密狗。但我不能用它做任何事。

我似乎需要一个 Android 版 FTDI 驱动程序。

如果我能帮助我的平板电脑与 XBee Explorer 加密狗进行通信,我将不胜感激。

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.

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.

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.

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.

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.

I seem to need a FTDI driver for Android.

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

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

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

发布评论

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

评论(4

箜明 2024-10-22 00:36:08

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

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

如果您手头有 ADK/UHS,您的 Arduino 可以充当 USB 主机并与 Android USB 设备通信。即使在相同的硬件中,如果您的 Android 操作系统很旧(例如 1.5/1.6),您也必须使用 ADB 接口而不是 ADK(配件开发工具包)协议。

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

如果你可以处理WiFi,你可以编写应用程序与套接字通信,或者通过Android中最新的WiFi Direct模式进行通信。

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

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

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.

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.

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

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.

用心笑 2024-10-22 00:36:08

Inopiaaardbei 提供了一个使用 Arduino 和 USB 主机扩展板以及在 Arduino 上运行的 Android 调试桥的解决方案。
使用此解决方案,您可以在 Android 手机和 Arduino 板之间使用串行通信。
请参阅我的帖子 以及内部链接以获取更多信息。

There is a solution by Inopiaaardbei using Arduino and a USB host shield with an Android Debug Bridge running on Arduino.
Using this solution you can use serial communication between the Android phone and the Arduino board.
See my post and the link inside for more info.

墨落画卷 2024-10-22 00:36:08

您可以使用连接到 xbee 模块的 android adk 或 android ioio,就像我在这篇文章中所做的那样< /a>.我已经在我的 github 上发布了代码,目前另一个人将实现 gui。

You can use an android adk or the android ioio connected to an xbee module as I did in this article. I have published the code on my github and another guy is going to implement the gui currently.

仙女 2024-10-22 00:36:08

USB 不太容易编程,使用以太网或 rs232 会容易得多。但是,如果您坚持,请查看 V-USB(SW USB )、LUFA (HW USB) 和 Lufaduino(硬件 USB)。如果 Android 已经嵌入了 USB CDC 驱动程序,那么如果您也在 AVR 中实现它,这可能是最简单的路径。 这里是缓慢、廉价且仅由软件实现的 AVR USB CDC 实现。

USB is not easy to programm, and it would be much easier with ethernet or rs232. However, if you insist, then take a look at V-USB (SW USB), LUFA (HW USB) and Lufaduino (HW USB). If Android has USB CDC drivers already embedded then it could be the easiest path for you if you implement it in AVR too. Slow, cheap and software only AVR USB CDC implementation is here.

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