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

Broadcasting when RTU master... #676

Open
dnssoftware opened this issue Jan 2, 2023 · 3 comments
Open

Broadcasting when RTU master... #676

dnssoftware opened this issue Jan 2, 2023 · 3 comments
Assignees

Comments

@dnssoftware
Copy link

When one is targeting slaves with MODBUS_BROADCAST_ADDRESS and say you issue modbus_write_registers,
the code after sending a frame still goes through

if (rc > 0) {
uint8_t rsp[MAX_MESSAGE_LENGTH];

    rc = _modbus_receive_msg(ctx, rsp, MSG_CONFIRMATION);
    if (rc == -1)
        return -1;

    rc = check_confirmation(ctx, req, rsp, rc);
}

Shouldn't one bypass waiting for response as one isn't expected?

Regards

Dean

@karlp
Copy link
Contributor

karlp commented Jan 4, 2023

in spec, yes, in reality, maybe. I think this should be protected by a quirk mode.

@bobemoe
Copy link

bobemoe commented Jul 30, 2023

In my reality, definitely!

See arduino-libraries/ArduinoModbus#117 where this lib is used on a microcontroller and causing an undesired delay. I have added a PR to that repo but its actually on the exact libmodbus code shown above.

@bobemoe
Copy link

bobemoe commented Jul 30, 2023

This is actually dupe of #379 which has a PR #467 to fix this!

@stephane stephane self-assigned this Oct 22, 2024
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

4 participants