Trying to figure out the message packets [SOLVED]



  • So I am trying to figure out what all of this data that I see in the serial monitor means. This is not my data, but some from another post on here.

    read: 0-0-255 s=255,c=3,t=4,pt=0,l=2,sg=0:5
    
    send: 5-5-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
    send: 5-5-0-0 s=255,c=0,t=17,pt=0,l=10,sg=0,st=ok:2.0.0-beta
    

    So for the read line we have 0-0-255. Not sure what that is?

    s=255 I am assuming is the node ID with c=3 being the child ID. I am confused though on the t=4.. If that is the message type, then 4 is "Used for OTA firmware updates", so what is an OTA firmware update?

    The next part in the message structure though would be the ack. So what is pt=0, l=2, and sg=0?

    I am assuming the last :5 means that the payload data is 5.


    Now for one of the send messages we have 5-5-0-0. Similar to the read, not sure what that is?

    I am assuming too that the st=ok means that the status of the sent message was ok, or that it was sent properly, or does it mean that the node received it ok?

    Again, I am assuming that :2.0.0-beta is the payload being sent.


    This is all very different from the serial communication examples shown on the serial API page which shows something like:

    12;6;0;0;3;My Light\n
    

    Thanks in advance for any help in my understanding this.


  • Mod

    I understand your confusion. The output looks a bit like the serial api, but not quite. What you're seeing is the (serial) debug output.

    Your assumption about the payload data is correct.

    A description of the serial debug format is available at https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help



  • @mfalkvidd Perfect, that explains it. I had heard about the debug mode, but didn't know anything about it or where information on it was. I am assuming that for normal operation I should be turning debug mode off correct? I would think that debug mode would screw up the HA software receiving the data when it is expecting something like "12;6;0;0;3;My Light\n".

    I will read through the debug page that you posted. Looks like it will have everything I need.

    Thanks again for the help.


  • Mod

    @dbemowsk you're welcome!

    For sensors you can leave it on (see this thread for a short discussion on the topic). Debug does not affect what's sent over the radio. For an ethernet gateway you can leave debug on as well, since it won't affect what's being sent to the controller. I'm not sure how controllers handle serial gateways with debug on.



  • I am running a serial gateway communicating over my FTDI adapter, and I think when I get around to connecting it to my Orange Pi, I will use the FTDI port in to the serial in on the Pi. I would think that would affect things because the debug output is sent over the FTDI port correct?


  • Mod

    @dbemowsk yes, unless the controller is tolerant and just discards the debug information.


  • Plugin Developer

    The controller can use the debug serial output from the gateway of type internal message subtype 9, I_LOG_MESSAGE, and report it in a log.


Log in to reply
 

Suggested Topics

  • 4
  • 3
  • 9
  • 14
  • 1
  • 933

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts