Replies: 4 comments 6 replies
-
Pull requests are welcome. |
Beta Was this translation helpful? Give feedback.
-
And what is wrong with just adding your suggestion (which btw I assume is for sync). Fixing async should be done in our pyserial amendment. |
Beta Was this translation helpful? Give feedback.
-
I just checked the old code (serial.py):
strict was default, so setting it to false, means the interCharTimeout will not be set....BUT in 3.7.2. it is also not set !! so your fix seems to fix something else, meaning I do not think that reverting 6ca1b04, would make any change for you. Seems your problem is around inter_byte_timeout, which was introduced later. |
Beta Was this translation helpful? Give feedback.
-
the problem is more likely fe809d9, which added inter_byte_timeout |
Beta Was this translation helpful? Give feedback.
-
Now that the
strict
keyword parameter got removed, what is the recommended method to set the serial connection to loose inter char timing.Several users of my Artisan app are reporting that communication fails with the latest app version where I upgraded to pymodbus 3.7 and thus had to removed the
strict=false
keyword. It seems that with some serial devices using some serial drivers (at least on Windows) pyserial seems to fail to deliver all received data to pymodbus which in turn complaints about having received not the expected number of bytes.For now I added the following line after the
connect()
call to reset the pymodbus default strict timing to the default pyserial loose timing.This seems to have fixed the communication errors for those users.
pyserial (as well as some usbSerial converters and their drivers) seems to have some issues with that
inter_byte_timeout
, at least on some platforms. See pyserial/pyserial#88Beta Was this translation helpful? Give feedback.
All reactions