mysensors / MySensors

MySensors library and examples

Home Page:https://www.mysensors.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto id mode in RS485 transport doesn't work

klaudiusz223 opened this issue · comments

Automatic ID assignment doesn't work for RS485 transport.
As mentioned in this post https://forum.mysensors.org/topic/4854/building-a-wired-rs485-sensor-network/23 .
The problem is caused by:

  • setting sender id to 0 instead of 255 in RS485 transport header when node doesn't have assigned ID
  • wrong packet filtering in the RS485 transport header and discarding broadcast packets from nodes without assigned ID
    if ((_header[0] == SOH) && (_header[5] == STX) && (_header[1] != _header[2])) {

    //Check if we should process this message
    //We reject the message if we are the sender
    //We reject if we are not the receiver and message is not a broadcast
    if ((_recSender == _nodeId) ||
    (_recStation != _nodeId &&
    _recStation != BROADCAST_ADDRESS)) {
    _serialReset();
    break;
    }

Is this pull request (#1451) going to be merged any time soon?