Then I will be one of the serial port to mount an Android emulator, using a serial port assistant to communicate with the simulator, less than or equal to 8 bytes of data can be smoothly to send and receive, once with a serial port assistant send simulator is more than 8 bytes of data, the application will be stuck, have no reaction, the simulator is then hung up,
Application is dependent on Google's android - serialport - API, it should not be application problems, I took the apk that others have written test, and even Google's own apk testing, is such result,
I see there is a serial port devices receive the problem of the size of the buffer, the use of serial assistants have a problem, is because of the Android emulator?
There has many don't understand about serial communication, hope god help solve!!!!!
CodePudding user response:
And if the receive buffer size is the problem, why don't more than eight bytes of data received in two times? Maybe is the problem that the library?CodePudding user response:
Find an article on the Internet (https://dp2px.com/2019/06/12/virtualserial/), which is mounted a serial port using Genymotion simulator, implementing serial communication practice according to the article, I found that this problem does not exist, it was the problem of the Android native simulator?CodePudding user response:
Estimation is a problem, you receive more than 8 bytes of data flow causes you to receive the thread card dead or an error, but still ask, did you set the buffer??CodePudding user response: