Skip to content

enable libmodbus quirks#88

Open
r00t- wants to merge 1 commit into
epsilonrt:masterfrom
r00t-:set_quirks
Open

enable libmodbus quirks#88
r00t- wants to merge 1 commit into
epsilonrt:masterfrom
r00t-:set_quirks

Conversation

@r00t-

@r00t- r00t- commented Oct 22, 2024

Copy link
Copy Markdown

mbpoll, being a tool likely used for testing/debugging, should give it's users access to all possible options, without forcing them to recompile.

@r00t-

r00t- commented Oct 22, 2024

Copy link
Copy Markdown
Author

this solves #75 and probably #39 too.
(i needed this because i have a device using address 248 ("PZEM-014/016 Energy Meter")

@r00t-

r00t- commented Oct 22, 2024

Copy link
Copy Markdown
Author

quirks was added in stephane/libmodbus@f0db03d
two years ago.
if it's desired to support older libmodbus versions, this would have to be made conditional at compile-time.

@JesseRiemens

Copy link
Copy Markdown

Would be useful indeed! But I think this may not be behavior you want by default, for a reason?
(I'm not sure why libmodbus put it behind a function call, but they may have done it for a reason)
According to their documentation it it not compliant with the protocol, so that could be why.

I think this should be enabled by a flag, instead of having it in always.

@r00t-

r00t- commented Apr 22, 2025

Copy link
Copy Markdown
Author

i gave my reasoning to not make it optional above, i don't think it's worth adding an option.
if one did that, one should also catch every possible error case that _could _ be prevented by enabling quirks and suggest to enable it (see #87).

but i think that's all kind of moot, as this project seems to be dead anyway.

@JesseRiemens

Copy link
Copy Markdown

Made a pr (#99 ) to add conditional quirk support.
Project may be dead but I have my local working version at least.

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.

2 participants