Android: RS232 Serial Communication with android device(Android:与安卓设备的RS232串行通信)
问题描述
我有一个 MR400s 计价器硬件.我想使用 RS232 电缆与这个计价器通信,我已经在 windows 中实现了这种连接和通信.但我想使用 android 设备建立连接.
I have a MR400s taximeter hardware. I want to communicate with this taximeter using RS232 cable and I have already achieved this connection and communication in windows. But I wanted to make connection using android device.
我怎样才能做到这一点?
How can I achieve this?
谢谢伊山耆那教
推荐答案
我用的是USB转串口库,你可以在这里找到:适用于 Android 的 USB 串口.它不需要任何根访问权限.您需要检查您的 Android 设备是否支持 USB 主机模式.然后,使用 USB OTG 电缆和 USB 转串口适配器电缆,您可以开始通过 RS232 与您的串行设备通信.在 USB 转串口库的 Github 页面上有一些代码示例可以帮助您入门.
I use the USB to serial library, you can find it here: USB Serial for Android. It doesn't require any root access. You'll need to check if your Android device supports USB host mode. Then, using a usb OTG cable and a USB to serial adapter cable you can start communicating with your serial device via RS232. There are code examples to get you started on the Github page of the USB to Serial library.
这篇关于Android:与安卓设备的RS232串行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android:与安卓设备的RS232串行通信
基础教程推荐
- NSString intValue 不能用于检索电话号码 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
