问题描述
我有一个 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串行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!