All Projects → licheedev → Android Serialport Api

licheedev / Android Serialport Api

Licence: apache-2.0
Fork自Google开源的Android串口通信Demo,修改成Android Studio项目

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Serialport Api

etherport-client
Client-side virtual serial port for Etherport. Used to implement firmata-compatible boards and relays.
Stars: ✭ 20 (-97.2%)
Mutual labels:  serialport
BaseIotUtils
🔥🔥串口工具,屏幕适配,通知工具类,多文件断点下载,xls,xlsx操作,文件处理,crash控制,音视频播放,usb设备检测,adb工具等...
Stars: ✭ 44 (-93.85%)
Mutual labels:  serialport
Cserialport
基于C++的轻量级开源跨平台串口类库Lightweight cross-platform serial port library based on C++
Stars: ✭ 296 (-58.6%)
Mutual labels:  serialport
PInvokeSerialPort
P/Invoke wrapper for Win32API serial port
Stars: ✭ 30 (-95.8%)
Mutual labels:  serialport
serialPort
Android通用的串口通信库
Stars: ✭ 39 (-94.55%)
Mutual labels:  serialport
Android-SerialPort
『Android Lib』 Android 平台上的 usb 串口调试库,支持串口号、波特率、数据位、校验位、停止位、流控等参数设置,能够控制数据的收发
Stars: ✭ 236 (-66.99%)
Mutual labels:  serialport
electron-vite-boilerplate
📚 A Electron + Vite boilerplate of the nature of learning(source-code of vite-plugin-electron) / 学习性的样板工程(vite-plugin-electron源码)
Stars: ✭ 157 (-78.04%)
Mutual labels:  serialport
Androidserialport
Android串口通信示例
Stars: ✭ 497 (-30.49%)
Mutual labels:  serialport
libserialport.dart
Serial Port for Dart
Stars: ✭ 51 (-92.87%)
Mutual labels:  serialport
Blynk Library
Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc.
Stars: ✭ 3,305 (+362.24%)
Mutual labels:  serialport
serial.nim
A Nim library for accessing serial ports.
Stars: ✭ 59 (-91.75%)
Mutual labels:  serialport
serialport
PHP Serial Port
Stars: ✭ 42 (-94.13%)
Mutual labels:  serialport
osx-ch341-serial
CH340/CH341 based USB to Serial Port Adapter driver for Mac OSX
Stars: ✭ 17 (-97.62%)
Mutual labels:  serialport
SerialTest
Serial port test tool on Win/Linux/Android, with realtime plotting, shortcut | 跨平台串口助手,带实时绘图和快捷发送面板
Stars: ✭ 98 (-86.29%)
Mutual labels:  serialport
Serialtool
A cross platform Serial-Port/TCP/UDP debugging tool.
Stars: ✭ 384 (-46.29%)
Mutual labels:  serialport
netty-transport-purejavacomm
A netty serial pipeline using JNA and PureJavaComm
Stars: ✭ 30 (-95.8%)
Mutual labels:  serialport
SerialPortHelper
一个低成本,能快速接入的串口通讯工具,支持处理并发,适配三种协议,同时支持监听多种不同报文头,适用于口红机、快递柜(格子柜),售货机、售餐机、咖啡机、游戏机等串口设备
Stars: ✭ 62 (-91.33%)
Mutual labels:  serialport
Node Serialport
Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!
Stars: ✭ 5,015 (+601.4%)
Mutual labels:  serialport
Scriptcommunicator serial Terminal
Scriptable cross-platform data terminal which supports: serial port, UDP, TCP, SPI, I2C and CAN.
Stars: ✭ 462 (-35.38%)
Mutual labels:  serialport
pyrealtime
Realtime data processing and plotting pipelines in Python
Stars: ✭ 62 (-91.33%)
Mutual labels:  serialport

Android-SerialPort-API

Gradle 引用

添加依赖

dependencies {
        implementation 'com.licheedev:android-serialport:2.1.2'
}

修改su路径

// su默认路径为 "/system/bin/su"
// 可通过此方法修改
SerialPort.setSuPath("/system/xbin/su");

可选配置数据位、校验位、停止位

实现方式参考

https://juejin.im/post/5c010a19e51d456ac27b40fc

// 默认8N1(8数据位、无校验位、1停止位)
SerialPort serialPort = new SerialPort(path, baudrate);

// 7E2(7数据位、偶校验、2停止位)
SerialPort serialPort = SerialPort //
    .newBuilder(path, baudrate) // 串口地址地址,波特率
    .parity(2) // 校验位;0:无校验位(NONE,默认);1:奇校验位(ODD);2:偶校验位(EVEN)
    .dataBits(7) // 数据位,默认8;可选值为5~8
    .stopBits(2) // 停止位,默认1;1:1位停止位;2:2位停止位
    .build();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].