安卓:与Android设备的RS232串行通讯 [英] Android: RS232 Serial Communication with android device

查看:3783
本文介绍了安卓:与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转串口库,你可以在这里找到:的 USB串口为Android。 它不需要任何root访问权限。你需要检查,如果你的Andr​​oid设备支持USB主机模式。然后,使用USB OTG线和USB转串口适配器电缆就可以开始通过RS-232串行设备进行通信。有code例子让你开始了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串行通讯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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