-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
接收一次收不全,会自动分段 #50
Comments
这demo是google原代码自带的,我没改过里面的代码。 Android-SerialPort-API/sample/src/main/java/android/serialport/sample/SerialPortActivity.java Line 46 in 0e329be
如果是这个demo的话,改大这个数组的容量看看。
你下面改的是读取一个字节,到size变量里,size变成读取到的那个字节的内容了,而不是到读取到的数据长度。 |
麻烦问一下,现在一次接收最多64个字符,如何修改成接收1024个字符?
|
@licheedev |
我使用串口调试助手是能收全的,返回的指令在本demo中接收会自动分段,最大接收64个字符,如何可以接收完全?
我修改size = mInputStream.read(received);
成size = mInputStream.read();以后收到的全是000000000000000000000
@licheedev
The text was updated successfully, but these errors were encountered: