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串行通信


- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- UITextView 内容插图 2022-01-01
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- GPS状态的广播接收器? 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01
- URL编码Swift iOS 2022-01-01
- SetOnItemSelectedListener上的微调程序错误 2022-01-01
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01