Skip to content

用该库数据出错 #57

Description

@ljsenjj

[08:53:22.833] A5 5A 07 03 01 00 00 00 EA 29
[08:53:22.920] A5 5A 16 02 00 00 00 00 00 C0 00 00 00 00 15 01 01 00 00 00 00 00 00 59 62
这是通过串口助手(通过USB连接到电脑采取数据)收到的数据,是正确的数据。

读取数据: A5
读取数据: 5A
读取数据: 07
读取数据: 03
读取数据: 01
读取数据: 00
读取数据: 00
读取数据: 00
读取数据: EA
读取数据: 29
读取数据: A5
读取数据: 5A
读取数据: 16
读取数据: 02
读取数据: 00 00
读取数据: 00
读取数据: 00 00
读取数据: C0
读取数据: 00 00
读取数据: 00
读取数据: 80 45 40 40 40 40 40 40 40 40 56 EC
这个是在Android App里用了该库Api后,通过Log.d打印出来的日志,不知道啥原因,长包数据就会出错。

然后我用了以下两个库,均能正确获取数据
https://github.com/yutils/YSerialPort
https://github.com/xmaihh/Android-Serialport

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions