Communicating with serial USB device over Android(通过 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 设备通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:通过 Android 与串行 USB 设备通信
基础教程推荐
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
