Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Gateway Ack Message
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Gateway Ack Message

Scheduled Pinned Locked Moved Development
6 Posts 3 Posters 2.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SoloamS Offline
    SoloamS Offline
    Soloam
    Hardware Contributor
    wrote on last edited by
    #1

    Hello all, who does the Node handles missed messages, messages without a returned ack? Does it try again? Is there a time out? Can I catch a missed ack? I'm using this code in my switch actuators. What happens is that sometimes I click the button and nothing happens, because the GW never replayed back. Questions:

    • Can I make it retry if failed by timeout?
    • Can I catch that time out in any method like the response?

    Thank you all

    monteM 1 Reply Last reply
    0
    • SoloamS Soloam

      Hello all, who does the Node handles missed messages, messages without a returned ack? Does it try again? Is there a time out? Can I catch a missed ack? I'm using this code in my switch actuators. What happens is that sometimes I click the button and nothing happens, because the GW never replayed back. Questions:

      • Can I make it retry if failed by timeout?
      • Can I catch that time out in any method like the response?

      Thank you all

      monteM Offline
      monteM Offline
      monte
      wrote on last edited by
      #2

      @soloam https://www.mysensors.org/download/sensor_api_20#sending-data

      bool send(MyMessage &msg, bool ack);
      

      Set second argument to true and function send will return true if ack was received and false in contrary. Then you need to write your own procedure to resend message (or do anything else) if function returns false. But mention that ack is send by the first node who receives your message. It means that if you have a repeater node between your node and GW you will only know if repeater gets the message, but you cant be sure if GW received it afterwards.

      mfalkviddM 1 Reply Last reply
      0
      • monteM monte

        @soloam https://www.mysensors.org/download/sensor_api_20#sending-data

        bool send(MyMessage &msg, bool ack);
        

        Set second argument to true and function send will return true if ack was received and false in contrary. Then you need to write your own procedure to resend message (or do anything else) if function returns false. But mention that ack is send by the first node who receives your message. It means that if you have a repeater node between your node and GW you will only know if repeater gets the message, but you cant be sure if GW received it afterwards.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by mfalkvidd
        #3

        @monte that's actually incorrect. But I don't blame you, many people have made the same conclusion as you did. That includes me. It took me about 40 hours of reading forum posts and source code hunting for an answer before I learned how it actually works.

        The return value of the send function is not affected by the ack parameter at all. But the ack parameter is related to delivery to final node, not just the next node (repeater).

        Some information is available here: https://forum.mysensors.org/post/34267
        I have unfortunately not found a way to describe how the different acks work in a way that is easy to understand.

        monteM 1 Reply Last reply
        1
        • SoloamS Offline
          SoloamS Offline
          Soloam
          Hardware Contributor
          wrote on last edited by
          #4

          And do we have a way to get a feedback if act was successful? So that We can make something like... if it fails... do it again

          1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @monte that's actually incorrect. But I don't blame you, many people have made the same conclusion as you did. That includes me. It took me about 40 hours of reading forum posts and source code hunting for an answer before I learned how it actually works.

            The return value of the send function is not affected by the ack parameter at all. But the ack parameter is related to delivery to final node, not just the next node (repeater).

            Some information is available here: https://forum.mysensors.org/post/34267
            I have unfortunately not found a way to describe how the different acks work in a way that is easy to understand.

            monteM Offline
            monteM Offline
            monte
            wrote on last edited by monte
            #5

            @mfalkvidd funny thing is that I read that thread, but somehow after some time and some reading it all messed up in my mind again. I hope this time I'll remember this for longer.
            @Soloam you need to write a code in receive function, which will check if ack message is returned. This will ensure your message is received by the GW. Read the thread mentioned by @mfalkvidd.

            mfalkviddM 1 Reply Last reply
            1
            • monteM monte

              @mfalkvidd funny thing is that I read that thread, but somehow after some time and some reading it all messed up in my mind again. I hope this time I'll remember this for longer.
              @Soloam you need to write a code in receive function, which will check if ack message is returned. This will ensure your message is received by the GW. Read the thread mentioned by @mfalkvidd.

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #6

              @monte yeah, I will have to go back to that thread again and read it thoroughly if I ever need to implement something that requires reliable messages.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              8

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular