Skip to content

Conversation

@ccdMuro
Copy link

@ccdMuro ccdMuro commented Jun 25, 2021

I've made a branch with ascii support which depends exclusively on the modbusepsi library with ascii-support (starting with v3.1.8) as the default libmodbus does not support ascii mode.

I also made some modifications to the installation so I can use it with bitbake, but tried not to break the default behavior if used for desktop.

@ccdMuro ccdMuro force-pushed the libmodbuspp-ascii-support branch 2 times, most recently from e4e748f to da87df5 Compare November 25, 2021 12:43
@tamara-schmitz tamara-schmitz force-pushed the libmodbuspp-ascii-support branch 3 times, most recently from f960c16 to f6f7c9a Compare December 13, 2024 08:28
@tamara-schmitz tamara-schmitz force-pushed the libmodbuspp-ascii-support branch 2 times, most recently from e521bf9 to b0ec07e Compare December 16, 2024 14:09
tamara-schmitz and others added 18 commits December 16, 2024 16:13
Throw exceptions on error instead of silently changing values.
Check settings string for given stop bit value.

Up until now, the stop bits value was hard coded to be 2 if the parity
mode was set to none or 1 if the parity mode was set to even or odd.

So a setting of "115200E1" would result in a stop bit value of 1.
But "115200E2" would result also in a stop bit value of 1.
And "115200N1" would result in a stop bit value of 2.

This is not a restriction of libmodbus. The library supports all these
modes just fine. In fact they are using 115200N1 in the documentation
for modbus_new_rtu().

Rather this is a bug in the string parsing that libmodbuspp introduces
in its constructor.
libmodbus has no string parsing in modbus_new_rtu() and takes in the
arguments as parameters directly.

Fixes: b0f3dc4
…calls to ensure the defines are set correctly
…with version 3.1.8; remove dependency in default libmodbus
@tamara-schmitz tamara-schmitz force-pushed the libmodbuspp-ascii-support branch from b0ec07e to a81892c Compare December 16, 2024 15:15
Dennis Purdack and others added 2 commits September 11, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants