SkillAgentSearch skills...

AndroidSerialPort

安卓串口打开、接收与发送

Install / Use

/learn @jp1017/AndroidSerialPort
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

AndroidSerialPort

Join the chat at https://gitter.im/jp1017/AndroidSerialPort Build Status GitHub stars

20190307更新

https://github.com/licheedev/Android-SerialPort-API

https://github.com/licheedev/Android-SerialPort-Tool

安卓串口相关操作

<img src="https://cloud.githubusercontent.com/assets/7868514/13865849/dee51aa8-ecea-11e5-99cd-0d8efa532314.png" width="320" />

测试

需要自己开发板,现在一般手机都没有预留串口

该程序固定了串口为 /dev/ttyAMA0,自己可看源码更改

或者看另一个项目:https://github.com/jp1017/AndroidSerialPortSample

来源

Android串口操作,简化android-serialport-api的demo(附源码)

我把文中的源码导入 android studio

源码来自谷歌:android-serialport-api

涉及到的 jni 开发可以参考:【Android 应用开发】Android 开发 之 JNI入门 - NDK从入门到精通

jni 开发遇到的坑:https://github.com/jp1017/Android-Collection/issues/10

20171011更新

刚刚发现另一个库: https://github.com/felHR85/UsbSerial

View on GitHub
GitHub Stars90
CategoryDevelopment
Updated1mo ago
Forks41

Languages

Java

Security Score

75/100

Audited on Mar 6, 2026

No findings