Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible typo in functions.py #123

Open
ardeley opened this issue Oct 12, 2022 · 4 comments
Open

Possible typo in functions.py #123

ardeley opened this issue Oct 12, 2022 · 4 comments

Comments

@ardeley
Copy link

ardeley commented Oct 12, 2022

I have not destruction-tested, but I am worried by what seems to be a typo in line 1510 (in class WriteMulipleRegisters). The maximum limit is set to 0x7B0 - but I believe what is intended is 0x007B. The MODBUS Application Protocol page 30 seems clear.
I think code may have been copied and pasted from line 1300 (in class WriteMultipleCoils).

@ardeley
Copy link
Author

ardeley commented Oct 19, 2022

As a week has gone by with no comment, I now attach a copy of pages 30-31 of the MODBUS Application Protocol Specification V1.1b3. I think there is enough information on these pages for anyone to conclude that line 1510 (in class WriteMultipleRegisters) of functions.py applies the wrong test: the maximum limit of the test should be 0x007B.
@OrangeTux, this seems to need prompt attention.
pages30+31_MODBUSprotocol.pdf

@acolomb
Copy link
Contributor

acolomb commented Oct 19, 2022

I seriously doubt there will be any reaction from the maintainers. I sent a couple of issues and pull requests one or two years ago without getting any feedback whatsoever since then. Have a look at the issues list, I guess this project is not actively maintained anymore. My solution was to just patch in what I needed and deploy a modified version as Python wheel.

@ardeley
Copy link
Author

ardeley commented Oct 19, 2022

@acolomb, I think you are probably right. I have built my own .php code to use MODBUS safely in a web-app (with myself as the principal destructive client!). Strange that GitHub, Advanced Climate Systems and @OrangeTux continue to associate their names with a Python module, when it includes a false test which could mess up MODBUS. I am grateful, however, for insights into coding for this protocol.

@acolomb
Copy link
Contributor

acolomb commented Oct 19, 2022

Well, the issue is recorded here. Whoever might decide to fork this project and pick up maintainership, they can go through the open issues list and easily apply your simple fix.

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

No branches or pull requests

2 participants