通过 Android 与串行 USB 设备通信 [英] Communicating with serial USB device over Android

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

问题描述

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

I have one custom made device for measuring current. This device can be connected to PC and communication is done over USB. It is based on FTDI chip. I have application written in Java and that application is using rxtxSerial.dll library and gnu.io.rxtx_2.1.7.4.jar. Now I want to port this application on my android device and I'm litte bit confused what to do that? All I have is android tablet (os version 4.1.1), OTG cable and this measuring device.

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

Should my device be rooted? Is there any kind of library that I can simply add to my Java Android application and read data over USB? Where to start?

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

I have tried to port existing application for PC using same library, but rxtxSerial.dll is missing and I can't transfer it to my android device.

推荐答案

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

I can really recommend the USB-Serial-For-Android library, it supports multiple popular usb-to-serial chips (also FTDI) and there is no rooting required. Check out the GitHub project here.

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

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