Why does the value of second field of I_ID_REQUEST message change for each request?



  • Hello,

    I'm trying to understand the auto assignment of ID better for controller development. Here is an example of my output at the serial port of my serial gateway. The four bottom messages of the output are the I_ID_REQUEST from the node.

    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.2.0
    255;110;3;0;3;
    255;63;3;0;3;
    255;16;3;0;3;
    255;225;3;0;3;

    Can I ask why the second field of those I_ID_REQUEST messages are always changing? Is that for purposes of helping to uniquely identify requests when multiple nodes may be requesting auto assignment at the same time?

    If a controller responds immediately to the I_ID_REQUEST of 255;110;3;0;3; with 255;110;3;0;4;55 for example, will it accept the response, or does it need to be 255;255;3;0;4;55 to work, i.e. the second field always needs to be 255 also?

    Thanks,



  • From my testing, it appears that the second field is a way to enable nodes requesting an update to be individually targeted with an ID assignment response. So potentially useful if you have two or more nodes requesting a node assignment at the same time. Note that the node ID you assign (i.e. the payload value for the message) doesn't have to match the random value in the request, but you do have to use it in the response, before the next request comes, otherwise it expires.

    e.g. request 255;70;3;0;3; response to send 255;70;3;0;4;22 if want to assign node ID of 22.

    Note that you can alternatively use 255 for the second field value and it will accept the node update request, but that may have issues if you have more than one device requesting an ID at the same time.


  • Admin

    @phil2020 That's correct - the purpose of this field is to uniquely identify ID requests when several nodes are requesting an ID at the same time (and thus, preventing nodes with same ID assignments). Nodes accept I_ID_RESPONSE messages with either 255 (for backwards compatibility) or the random "token" sent with the I_ID_REQUEST message.


 

487
Online

7.9k
Users

8.8k
Topics

94.3k
Posts