Open tdrkDev opened 3 years ago
@tdrkDev Try to adjust the SerialPortReader
timeout to see if it works. The default is 500 ms
if not set.
final timeout = const Duration(seconds: 1).inMilliseconds
final reader = SerialPortReader(serial, timeout: timeout);
@tdrkDev Try to adjust the
SerialPortReader
timeout to see if it works. The default is500 ms
if not set.final timeout = const Duration(seconds: 1).inMilliseconds final reader = SerialPortReader(serial, timeout: timeout);
tried that before writing the issue, not helped
I have this same issue. Any solutions?
Is there a solution to this problem?
So, I found a workaround by adding a delimitator at the end of the data sending from arduino or other device, and in the application concatenating data till the delimitator received & splitting using the same.
I need to get this data from serial:
{"test":"very_big_text_very_big_text_very_big_text_very_big_text_very_big_text"}
But SerialPortReader's stream listener event variable contains only this:
{"test":"very_big_text_very_big_text_very_big_text_very_big_text_ver
If I am reading value with
cat /dev/ttyUSB0
, everything is fine.If needed, serial port baud is 57600 and I set it in my code with workaround from one of issues. Platform: Linux, Fedora 34, kernel 5.13.9-200.fc34.x86_64
Also, cropped part and its length are always different.
Part of my code:
So, how can I fix that?