Skip to content

ModbusRtuFramer.advanceFrame() is never called after transmission errors #201

@ponbaton

Description

@ponbaton

A message like 0x1 0x5 0x0 0x0 0xff 0x0 0x0 0x0 to ModbusSerialServer causes the following events:

  • In processIncomingPacket():
  • checkFrame() returns False
  • in _process(callback, error=True) data is assigned to getRawFrame()
  • in self.decoder.decode(data) it expects 4 bytes of data (self.address, self.count = struct.unpack('>HH', data)), but gets the entire frame. Rises an exception
  • in _process(callback, error=True) self.advanceFrame() does not get called

Now the server is broken! Any incoming data appends to ModbusRtuFramer.__buffer and the same events happen over and over

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions