android - 通过 Android 与串行 USB 设备通信

标签 android serial-port ftdi usb-otg

我有一个用于测量电流的定制设备。该设备可以连接到 PC 并通过 USB 完成通信。它基于FTDI芯片。我有用 Java 编写的应用程序,该应用程序正在使用 rxtxSerial.dll 库和 gnu.io.rxtx_2.1.7.4.jar。现在我想在我的安卓设备上移植这个应用程序,我有点困惑该怎么做?我只有安卓平板电脑(操作系统版本 4.1.1)、OTG 数据线和这个测量设备。

我的设备应该 Root 吗?是否有任何类型的库可以简单地添加到我的 Java Android 应用程序并通过 USB 读取数据?从哪里开始?

我尝试使用相同的库为 PC 移植现有应用程序,但 rxtxSerial.dll 丢失,我无法将其传输到我的 android 设备。

最佳答案

我真的可以推荐 USB-Serial-For-Android 库,它支持多种流行的 USB-to-serial 芯片(也是 FTDI),并且不需要 root。查看 GitHub 项目 here .

关于android - 通过 Android 与串行 USB 设备通信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21800932/

相关文章:

c - 尝试通过创建模拟串行设备来测试 C 代码

serial-port - Arduino串行通讯输出

linux - FTDI D2XX 库适用于 Ubuntu,但在 ezsdk 交叉编译上显示错误

java - 从旋转器中定位用户选择并在下一个 Activity 中使用它 - Android

android - 在推送通知事件中维护父 Activity

java - 线程因未捕获的异常而退出

android - 首选项 : can I find the input type when the preference item is clicked

c# - 指定的参数超出了有效值的范围。参数名称 : size & Serial Port Communication

usb - Windows下如何解决USB设备重连问题

android - 无法从 FTDI 串行 I2C 读取字节到 Android Eclipse Java 应用程序