Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. wengerp
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    wengerp

    @wengerp

    0
    Reputation
    1
    Posts
    176
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    wengerp Follow

    Best posts made by wengerp

    This user hasn't posted anything yet.

    Latest posts made by wengerp

    • Return value of gw.send is false but gateway receives value anyway

      Hi

      We have a pressure sensor which sends a message upon a change event. Most of the time this works very well. However, from time to time there is the problem, that the return value of the gw.send method is false although the gateway received the value in question properly. Why can this happen?

      We tried to solve this problem with some kind of retry-mechanism: we are now resending a message as long as the return value of gw.send() is false (or a deadlock-counter is < 10). However, this didn't solve the problem in all cases. There are still some cases when all retries == false (although all sent messages including all the retries are received by the gateway and of status "ok").

      One point that seems to be of interest is that the problem mostly arises if we have a lot of traffic from multiple concurrent nodes. May this have something to do with collision detection?

      Please see the following log information form more details:

      relevant part of sketch:

              bool success = false;
              int cntTries = 0;
             
              while (!success && cntTries++ < NB_RETRIES){
                success = gw.send(msg.set(convertedValue,3));
                if (!success)
                  gw.wait(1000);
              }
      

      Thanks for your support and best regards,
      Patrick

      Log of Gateway:

      0;0;3;0;9;read: 5-5-0 s=1,c=1,t=16,pt=7,l=5,sg=0:0.748
      5;1;1;0;16;0.748
      0;0;3;0;9;read: 5-5-0 s=1,c=1,t=16,pt=7,l=5,sg=0:0.748
      5;1;1;0;16;0.748
      0;0;3;0;9;read: 5-5-0 s=1,c=1,t=16,pt=7,l=5,sg=0:0.748
      5;1;1;0;16;0.748
      0;0;3;0;9;read: 5-5-0 s=1,c=1,t=16,pt=7,l=5,sg=0:0.748
      5;1;1;0;16;0.748
      0;0;3;0;9;read: 5-5-0 s=1,c=1,t=16,pt=7,l=5,sg=0:1.000
      5;1;1;0;16;1.000
      
      

      Log of Node:

      send: 5-5-0-0 s=1,c=1,t=16,pt=7,l=5,sg=0,st=fail:0.748
      send: 5-5-0-0 s=1,c=1,t=16,pt=7,l=5,sg=0,st=fail:0.748
      send: 5-5-0-0 s=1,c=1,t=16,pt=7,l=5,sg=0,st=fail:0.748
      send: 5-5-0-0 s=1,c=1,t=16,pt=7,l=5,sg=0,st=fail:0.748
      send: 5-5-0-0 s=1,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.748
      send: 5-5-0-0 s=1,c=1,t=16,pt=7,l=5,sg=0,st=ok:1.000
      
      posted in Troubleshooting
      wengerp
      wengerp