androidthings / sample-uartloopback

Echo received characters over a UART with Android Things
Apache License 2.0
78 stars 39 forks source link

I cannot receive data on my RPi3B #2

Closed qinwenbo114 closed 7 years ago

qinwenbo114 commented 7 years ago

Hello, I tired this project on my RPi3B. the read function seemed cannot read the data. the following while function cannot be entered. while ((read = mLoopbackDevice.read(buffer, buffer.length)) > 0) { mLoopbackDevice.write(buffer, read); } I have tested the mLoopbackDevice.write() function singly, and that worked well. But when I tested the mLoopbackDevice.read() function singly (without write() function). My serial port debug tools on computer still can received the data what I sent, it seemed like the data was returned by other level but not the app.

qinwenbo114 commented 7 years ago

I found the solution. https://code.google.com/p/android/issues/detail?id=233938