[android] Problems with sending late from external device during serial communication

Asked 2 years ago, Updated 2 years ago, 51 views

You are trying to communicate by connecting the serial port with an external device.

When sending a send from the device, the app sometimes fails to receive the receive and delays or misses it.

For example, if you sent data from 1 to 10,

In the app, 1, 2, 3, 5, 6, 8, 9, 10 are broken apart like this.

Is it a problem with the external device that sends the message?

If you have any tips or tips on how to handle it without being delayed or missed by the app, please reply.

Thank you.

port

2022-09-20 19:34

1 Answers

Did you set up the serial communication?

After serial communication is connected for the first time, you must set baud rates, data bits, parity, stop bits, etc. to ensure proper communication.

Otherwise, it might be because the input stream that receives the data does not concentrate on reading through the thread and does other things. If you can upload a little bit of the data receiving code, it will be helpful to solve the problem.

Otherwise, you may need to test the external device first. Connect an external device to a window, not an app, and install a serial communication program to check if the data is coming in well.


2022-09-20 19:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.