Trying to make sense of Serial display



  • Hi, all, I am writing my own controller and currently have the Nano Serial Gateway and a Nano DHT and it seems to be working as the DHT Node is sending temp changes to the Gateway.

    But, I am at a loss to understand what I am getting. I am OK with the Serial Protocol for the data and the first two lines of the Gateway start-up, but what is all this other stuff?

    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    0;0;3;0;14;Gateway startup complete.

    0;0;3;0;9;read: 23-23-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
    23;255;3;0;15;0
    0;0;3;0;9;read: 23-23-0 s=255,c=0,t=17,pt=0,l=5,sg=0:1.5.4
    23;255;0;0;17;1.5.4
    0;0;3;0;9;read: 23-23-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
    23;255;3;0;6;0

    0;0;3;0;9;read: 23-23-0 s=255,c=
    3,t=11,pt=0,l=8,sg=0:Humidity
    23;255;3;0;11;Humidity
    0;0;3;0;9;read: 23-23-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    23;255;3;0;12;1.0
    0;0;3;0;9;read: 23-23-0 s=0,c=0,t=7,pt=0,l=0,sg=0:
    23;0;0;0;7;
    0;0;3;0;9;read: 23-23-0 s=1,c=0,t=6,pt=0,l=0,sg=0:
    23;1;0;0;6;

    0;0;3;0;9;read: 23-23-0 s=1,c=1,t=0,pt=7,l=5,sg=0:69.8
    23;1;1;0;0;69.8
    0;0;3;0;9;read: 23-23-0 s=0,c=1,t=1,pt=7,l=5,sg=0:37.0
    23;0;1;0;1;37.0




  • Contest Winner

    @NotTooTechy

    Have you read the Serial API?


  • Mod



  • @BulldogLowell said:

    Have you read the Serial API?

    Ummm, yes, I mentioned "I am OK with the Serial Protocol for the data" but what is all the other stuff? I also mentioned I am writing my own Controller and surely that might have implied that I have been programming for a while as it is not a trivial task. As it happens that "while" is about 40 years. πŸ™‚

    0;0;3;0;9;read: 23-23-0 s=255,c= < This mishmash
    3,t=11,pt=0,l=8,sg=0:Humidity< This mishmash
    23;255;3;0;11;Humidity< This mishmash
    0;0;3;0;9;read: 23-23-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0< This mishmash
    23;255;3;0;12;1.0 < aaahhhh finally, data!

    I am sure all that other stuff is important and means something, but where do I read about it? I know I could wade through the .h and .cpp files, but given the description for the Serial Protocol, I hoped (expected) something that similarly explains the "mishmash."

    It makes no sense to me to merely discard all that mishmash-data to just get at the Serial-Data portion.



  • @mfalkvidd said:

    how-ask-for-help might be useful

    Hmmm, not really as I think my Subject is quite valid with the possible exception that "this" could have been inserted between "of" and "Serial" but not being able to edit (that I can see) the Subject I am stuck with the first approach.

    "Lead, follow or get out of the way," and old Military expression that might help.


  • Mod

    I am sorry that I offended you but I though the section "Troubleshoot the debug output" in that thread (the debug-faq part, not the how-to-ask-for-help part) would help you debug the serial output. I did not post it to mock you. Nobody in this forum does. You are not new here so you should already be aware that this is very friendly community. Let's keep it that way.


  • Contest Winner

    @NotTooTechy said:

    but what is all the other stuff? I also mentioned I am writing my own Controller and surely that might have implied that I have been programming for a while as it is not a trivial task. As it happens that "while" is about 40 years.

    0;0;3;0;9;read: 23-23-0 s=255,c= < This mishmash
    3,t=11,pt=0,l=8,sg=0:Humidity< This mishmash
    23;255;3;0;11;Humidity< This mishmash
    0;0;3;0;9;read: 23-23-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0< This mishmash
    23;255;3;0;12;1.0 < aaahhhh finally, data!

    but, in the API it describes exactly what the "mishmash" is! It contains Node ID's, sensor ID's and other critical data for you to sort the messages... plus the data. πŸ˜‰



  • @BulldogLowell said:

    but, in the API it describes exactly what the "mishmash" is!

    Thanks for your patience, but I must be getting too old. I cannot find it.
    This page...
    http://www.mysensors.org/download/sensor_api_15#the-full-api
    As far as I can see does not explain...
    0;0;3;0;9;read: 23-23-0 s=1,c=1,t=0,pt=7,l=5,sg=0:69.8
    ^; ^; ^; ^; ^,,,,,,,,,,,,,,,,,,,,,,,,^,,,,,^,,,,,^,,,,,^,,,,,,,^,,,,,^

    The things above the Caret ("^") and their values. I can guess at the 23,23,0 as NodeId,NodeID,GatewayID but what is "s=1" etc?
    I assume the ":" is a delimiter for the data.

    I realize this is free stuff, but the documentation does leave a good deal to be desired. Or, maybe it IS just me. πŸ™‚

    It is crazy having half of the cod in plain text and the rest on in Codebender. I understand why it IS in Codebender, but for a documentation page to make a copy of to refer to offline, it is useless.


  • Admin

    If you actually read the post @mfalkvidd mentioned earlier, you'll find the information you seek.

    http://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help



  • @NotTooTechy

    I think the point here is that you left debug on. I wrote my own controller too (using LabView, serial, VISA) and the only thing I needed (and I suppose you need the same) are the plain messages. I guess your serial output should look like this (I took it from your first message in this thread):

    0;0;3;0;14;Gateway startup complete.
    23;255;3;0;15;0
    23;255;0;0;17;1.5.4
    23;255;3;0;6;0
    23;255;3;0;11;Humidity
    23;255;3;0;12;1.0
    23;0;0;0;7;
    23;1;0;0;6;
    23;1;1;0;0;69.8
    23;0;1;0;1;37.0

    To switch "off" debug, go to Myconfig.h and make a small change:

    #define DEBUG

    into:

    // #define DEBUG

    You can put it on again once the serial gateway is up and running to get debug information from the nodes you create.

    BR,

    Boozz


  • Admin

    @NotTooTechy said:

    @BulldogLowell said:

    but, in the API it describes exactly what the "mishmash" is!

    Thanks for your patience, but I must be getting too old. I cannot find it.
    This page...
    http://www.mysensors.org/download/sensor_api_15#the-full-api
    As far as I can see does not explain...
    0;0;3;0;9;read: 23-23-0 s=1,c=1,t=0,pt=7,l=5,sg=0:69.8
    ^; ^; ^; ^; ^,,,,,,,,,,,,,,,,,,,,,,,,^,,,,,^,,,,,^,,,,,^,,,,,,,^,,,,,^

    If you look at the serial api, and decode the above string, it will be:

    0 -> NodeId (GW)
    0 -> ChildSensorID
    3 -> Internal message
    0 -> no ack
    9 -> Debug message

    So it's a debug message that is sent by the GW πŸ™‚ The rest is the payload..

    The format of the debug message (payload) could probably have been described better somewhere, but haven't been done yet. (feel free to chip in with documentation :))


  • Mod

    @tbowmo documentation of the format of the debug message is, as hek also pointed out, available at the link I posted in my first response in this thread.


  • Admin

    @mfalkvidd

    Yes, you are right.. My bad πŸ™‚


  • Admin

    Haha, this must be one of the most confused up threads here πŸ™‚



  • @hek said:

    Haha, this must be one of the most confused up threads here πŸ™‚

    But getting better. Thank you all. Now that I see that some of the messages are from the Gateway and not all from the Node it is making some more sense. It would be nice to see some CR and LF in the output, but having employed many programmers over my working life, I understand. πŸ˜‰

    Why does "c = message type" and not "m" for instance? before asking here I was trying to make sense of it without wasting everyone's time and searching files.

    @boozz seems to have solved it for me with turn off Debug.

    I think that, other than snide comments, we can close this thread from my standpoint. πŸ™‚


  • Mod

    In the MySensors protocol, messageType is also called command (for historical reasons I guess?). So c made sense, at least when the debug output was added to the code. There is a link available in the description in the debug faq to the code where a comment saying "The command field (message-type) defines the overall properties of a message" is available.


Log in to reply
 

Suggested Topics

  • 4
  • 2
  • 2
  • 9
  • 9
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts