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

Implement support for broadcast #100

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

T0RAT0RA
Copy link

Hi,

I added support for broadcast messages.

Documentation can be found here: Modbus_over_serial_line_V1.pdf (see page 7/44)

In broadcast mode, the master can send a request to all slaves.
No response is returned to broadcast requests sent by the master. The broadcast requests are necessarily writing commands. All devices must accept the broadcast for writing function. The address 0 is reserved to identify a broadcast exchange

umodbus/const.py Outdated
@@ -137,6 +137,9 @@
0x4100, 0x81C1, 0x8081, 0x4040
)

#: Broadcast address
BROADCAST_ADDR = const(0x00)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move this new part up to around line 105, just to not mix up any non existing order ;) I still want to keep the CRC part at the end of the file

@@ -1,5 +1,5 @@
# List external packages here
# Avoid fixed versions
# # to upload package to PyPi or other package hosts
twine>=4.0.1,<5
twine==6.*
Copy link
Author

@T0RAT0RA T0RAT0RA Jan 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error in the CI that I couldn't find a solution for. Upgrading to 6 solved the issue (locally).
I'm not familiar with your CI/CD pipeline, so not sure it won't break anything.

The error in CI:

Run rm dist/*.orig
  rm dist/*.orig
  twine check dist/*.tar.gz
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.9.21/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.21/x64/lib
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.21/x64/bin/twine", line 5, in <module>
    from twine.__main__ import main
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/twine/__init__.py", line 43, in <module>
    __license__ = metadata["license"]
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/importlib_metadata/_adapters.py", line 54, in __getitem__
    raise KeyError(item)
KeyError: 'license'
Error: Process completed with exit code 1.

@T0RAT0RA
Copy link
Author

Hey @brainelectronics,
do you think you could have another look at the PR? :)

Thanks!

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