problem description
Open two serial ports at the same time in Android environment, one of them receives the instruction and sends the instruction to the other, but the command of the second serial port will block and often return garbled or the two instructions will be combined into one to send
.the environmental background of the problems and what methods you have tried
the environment for rk3288 development board Android5.0 operating system serial port for ttl level interface uses Google android-serialport-api compiled jni library which is the most popular on the Internet. After adding the flags parameter O_NONBLOCK (non-blocking mode) of the open serial port command, there is no help to test under Windows system without any problem
related codes
mFd = open(path, baudRate, O_NOCTTY | O_NONBLOCK);
what result do you expect? What is the error message actually seen?
it is hoped that two serial ports can work at the same time without interference caused by IO blocking