Skip to content
  • MySensors
  • 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. Troubleshooting
  3. Auto resend on NACK

Auto resend on NACK

Scheduled Pinned Locked Moved Troubleshooting
23 Posts 6 Posters 4.8k Views 6 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.
  • alowhumA Offline
    alowhumA Offline
    alowhum
    Plugin Developer
    wrote on last edited by
    #21

    @mfalkvidd Thank you so much for the explanation! I feel I'm getting a grasp on things.

    1 Reply Last reply
    1
    • Mark SwiftM Offline
      Mark SwiftM Offline
      Mark Swift
      wrote on last edited by
      #22

      @mfalkvidd said in Auto resend on NACK:

      https://forum.mysensors.org/post/33832

      Would someone be kind enough to point me in the direction of a good software acknowledgement example? I've been building MySensors for 4 years and still have sensors that don't send reliable messages. While most have been replaced with ESP's - these sensors are extremely remote and battery powered (MySensors wins here!).

      Currently I use:

      void resend(MyMessage &msg, int repeats) {
              int repeat = 1;
              const int repeatDelay = 100;
              boolean sendOK = false;
              while ((sendOK == false) and (repeat <= repeats)) {
                      if (send(msg) == true) {
                              sendOK = true;
                      } else {
                              sendOK = false;
                              #ifdef MY_DEBUG
                              Serial.print(F("Send error: "));
                              Serial.println(repeat);
                              #endif
                              repeat++;
                              wait(repeatDelay);
                      }
              }
      }
      

      But this doesn't seem to ensure reliable delivery (some nodes send 10 msgs before sleeping). Often I get multiple messages arriving (I assume this is the burst), but some (often vital) never make it.

      1 Reply Last reply
      0
      • electrikE Offline
        electrikE Offline
        electrik
        wrote on last edited by
        #23

        You will get multiple messages, if the message arrives correctly but the hardware ACK doesn't.

        Do you have a repeater in between the sender and gateway? It could be that the repeater does receive the initial message (and the sensor gets a hardware ACK), but that never reaches the gateway because of a transmission error between the repeater and the gateway.

        1 Reply Last reply
        1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        13

        Online

        12.1k

        Users

        11.2k

        Topics

        113.4k

        Posts


        Copyright 2025 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
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular