Skip to content

一次性传输数据限制 #48

@yedashen

Description

@yedashen

为啥我从serialPort.getInputStream() 拿到的数据最多只能拿到32个字节
while (!isInterrupted()) {
try {
if (mInputStream == null) {
return;
}
int available = mInputStream.available();
byte[] buffer = new byte[available];
int size = mInputStream.read(buffer);
if (size > 0) {
if (null != callback) {
callback.callback(buffer);
}
}
} catch (IOException e) {
e.printStackTrace();
return;
}
}

我这里如果改成比32大的byte[] ,32位之后的数据全是0

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