jpnurmi / flutter_libserialport

Serial Port for Flutter
https://pub.dev/packages/flutter_libserialport
MIT License
139 stars 80 forks source link

Invalid argument(s): length must be in the range [0, 4611..] #71

Open MervePlt opened 1 year ago

MervePlt commented 1 year ago

It does not show this error all the time, but when it does, the communication can not be established by this port again. But, turning it off and on manually fixes the problem. However, we can not count that as a constant solution for this problem. Is there any other way we can follow to solve it automatically? (without turn the port on and off MANUALLY)

hata_4_4_2023_

joaquin-amenta commented 11 months ago

Same here, have you found a solution?

mingpepe commented 11 months ago

sp_nonblocking_read may return negtive value on error. This library assume that read operation is always success. If the return value is negative, asTypedList may throw that exception.

You can use sp_last_error_message to check what error occured.

Ido-Sobol commented 11 months ago

sp_nonblocking_read may return negtive value on error. This library assume that read operation is always success. If the return value is negative, asTypedList may throw that exception.

You can use sp_last_error_message to check what error occured.

How do I call sp_last_error_message when I'm using flutter_libserialport and not libserialport?

mingpepe commented 11 months ago

https://github.com/jpnurmi/libserialport.dart/blob/main/lib/src/bindings.dart#L1878

lucafabbri commented 2 months ago

Could anyone check this one as 0.4.0 is available on pub.dev?

samuelishimwe commented 1 month ago

@lucafabbri Am currently on 0.4.0 but am facing the same issue