Skip to content

Broadcast transmission blocks for TIMEOUT ms #117

Open
@bobemoe

Description

@bobemoe

When sending broadcast message (as per modbus spec to server ID 0) the endTransmission() blocks and timeouts, the function returns failed even though all the servers successfully receive the transmission.

ModbusRTUClient.beginTransmission(0, HOLDING_REGISTERS, 0x00, 3);
ModbusRTUClient.write(0);
ModbusRTUClient.write(a);
ModbusRTUClient.write(b);
ModbusRTUClient.endTransmission(); //  broadcast always returns false :/

The issue I am having is that timeout is 1000ms and I can't afford that much delay in my code. Normal transmissions take about 18ms.

Modbus spec says broadcasts should not have replies so there is no need to wait for timeout and the function should return (success) immediately.

It is not even possible as a workaround to change the timeout because #28

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions