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. Development
  3. Node to node communication fails if gateway is not reachable

Node to node communication fails if gateway is not reachable

Scheduled Pinned Locked Moved Development
30 Posts 9 Posters 5.4k Views 8 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.
  • H Offline
    H Offline
    Heizelmann
    wrote on last edited by
    #1

    Re: Node to node communnication in v2.0 between repeater nodes

    In relation to this older post I have a sceneraio where node to node communication stops working. I have two nodes, a sensor and a repeater/actuator combination and a gateway. As long as the gateway is present to all nodes a direct communication between the sensor and the repeater/actuator works. On the sensor the log shows

    MSG:SEND,44-44-43-43,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=1,st=OK:1
    

    and on the repeater/actuator

    TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    

    But if the gateway is not reachable (tested by simply switiching it off) the message delivery is unreliable. Mostly on sensor side the log shows NACK instead of OK

    !TSF:MSG:SEND,44-44-43-43,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=2,st=NACK: 
    
    

    On the receiver side (the repeater/actuator node) a lot of logs are seen for finding the gateway, I think this correct. But the receive function is not called.

    ...
    TSF:MSG:SEND,43-43-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    !TSM:FPAR:NO REPLY
    TSM:FPAR
    TSF:MSG:SEND,43-43-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    !TSM:FPAR:FAIL
    TSM:FAIL:CNT=7
    TSM:FAIL:PDT
    ...
    TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    ...
    
    Boots33B berkseoB 2 Replies Last reply
    0
    • H Heizelmann

      Re: Node to node communnication in v2.0 between repeater nodes

      In relation to this older post I have a sceneraio where node to node communication stops working. I have two nodes, a sensor and a repeater/actuator combination and a gateway. As long as the gateway is present to all nodes a direct communication between the sensor and the repeater/actuator works. On the sensor the log shows

      MSG:SEND,44-44-43-43,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=1,st=OK:1
      

      and on the repeater/actuator

      TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      

      But if the gateway is not reachable (tested by simply switiching it off) the message delivery is unreliable. Mostly on sensor side the log shows NACK instead of OK

      !TSF:MSG:SEND,44-44-43-43,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=2,st=NACK: 
      
      

      On the receiver side (the repeater/actuator node) a lot of logs are seen for finding the gateway, I think this correct. But the receive function is not called.

      ...
      TSF:MSG:SEND,43-43-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      !TSM:FPAR:NO REPLY
      TSM:FPAR
      TSF:MSG:SEND,43-43-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      !TSM:FPAR:FAIL
      TSM:FAIL:CNT=7
      TSM:FAIL:PDT
      ...
      TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      ...
      
      Boots33B Offline
      Boots33B Offline
      Boots33
      Hero Member
      wrote on last edited by
      #2

      @Heizelmann This post will give you some info

      1 Reply Last reply
      1
      • mfalkviddM Online
        mfalkviddM Online
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        Hi.

        As described on https://www.mysensors.org/about/network the MySensors network topology is a tree, with the gateway at the root. All messages go through the gateway, so if the gateway is turned off the nodes will start searching for a new way to the root, which will fail since there is no root.

        It is possible to hard-code parent node. I am not sure if it helps in your case, but it might be something to experiment with.

        Or start with troubleshooting why your gateway is turned off. Maybe it needs to be fixed?

        This discussion on gateway redundancy might be useful
        https://forum.mysensors.org/topic/5690/multiple-gateways-for-redundancy

        1 Reply Last reply
        1
        • H Offline
          H Offline
          Heizelmann
          wrote on last edited by
          #4

          @mfalkvidd said in Node to node communication fails if gateway is not reachable:

          All messages go through the gateway, so if the gateway is turned off the nodes will start searching for a new way to the root, which will fail since there is no root.

          In the post refered from @Boots33 stands something diffrent:

          @napo7: So, when I send a message with anything but 0 as destination, it goes thru the gateway, and the gateway rewrites a new message with the same destination ?
          @hek: No, it might never reach the gateway. For instance if a repeater on the way routes knows the destination, it will route it.
          Only repeaters and gateway holds a routing table which is build dynamically from the traffic the "see". So they are the only ones that can send messages "downward" in the sensor network.

          What is right and more important what can I do to solve my problem? The receiving message is seen in the log of the repeater but is not processed.

          1 Reply Last reply
          0
          • hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #5

            Disable the transport check on the repeater.

            #define MY_TRANSPORT_WAIT_READY_MS 1

            H 1 Reply Last reply
            0
            • hekH hek

              Disable the transport check on the repeater.

              #define MY_TRANSPORT_WAIT_READY_MS 1

              H Offline
              H Offline
              Heizelmann
              wrote on last edited by Heizelmann
              #6

              @hek I already did this, but with 3000ms. Changed to 1ms but without success.

              H 1 Reply Last reply
              0
              • H Heizelmann

                @hek I already did this, but with 3000ms. Changed to 1ms but without success.

                H Offline
                H Offline
                Heizelmann
                wrote on last edited by
                #7

                I do not much understand the serial protocoll, but as far as I can see the leaf sends a ping to the repeater, but not the message I defined.

                TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
                

                See my other logs in the previous post.

                mfalkviddM 1 Reply Last reply
                0
                • H Heizelmann

                  I do not much understand the serial protocoll, but as far as I can see the leaf sends a ping to the repeater, but not the message I defined.

                  TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
                  

                  See my other logs in the previous post.

                  mfalkviddM Online
                  mfalkviddM Online
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #8

                  @Heizelmann the log parser can be used to make the log easier to read, like this

                  H 1 Reply Last reply
                  0
                  • mfalkviddM mfalkvidd

                    @Heizelmann the log parser can be used to make the log easier to read, like this

                    H Offline
                    H Offline
                    Heizelmann
                    wrote on last edited by
                    #9

                    @mfalkvidd Thanks for this hint! @hek I like it!

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      Heizelmann
                      wrote on last edited by
                      #10

                      Still unclear for me? Is it possible or not to have a node to node communication via a repeater without gateway online?
                      If not I would suggest to put an issue on github. If yes, it would be nice to have a clear instruction how to do this.

                      H 1 Reply Last reply
                      0
                      • H Heizelmann

                        Still unclear for me? Is it possible or not to have a node to node communication via a repeater without gateway online?
                        If not I would suggest to put an issue on github. If yes, it would be nice to have a clear instruction how to do this.

                        H Offline
                        H Offline
                        Heizelmann
                        wrote on last edited by
                        #11

                        Added an issue for this on https://github.com/mysensors/MySensors/issues/792

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          DavidZH
                          wrote on last edited by
                          #12

                          @Heizelmann The nodes are unreachable in that situation because the radio is powered down for a set amount of time before a new attempt to establish a connection is done. When you try to send something from a node, that radio will wake up. The receiving node on the other hand will be powered down so it will not do anything.

                          Depending on the radio you use, a solution for the RFM69 might be to engage the listen mode. It uses just a bit more energy as power down, but it can generate an interrupt on the node to wake it up and receive the message. I'm not sure if this function is available in the library as of yet, but I know it's in the works.

                          H 1 Reply Last reply
                          0
                          • D DavidZH

                            @Heizelmann The nodes are unreachable in that situation because the radio is powered down for a set amount of time before a new attempt to establish a connection is done. When you try to send something from a node, that radio will wake up. The receiving node on the other hand will be powered down so it will not do anything.

                            Depending on the radio you use, a solution for the RFM69 might be to engage the listen mode. It uses just a bit more energy as power down, but it can generate an interrupt on the node to wake it up and receive the message. I'm not sure if this function is available in the library as of yet, but I know it's in the works.

                            H Offline
                            H Offline
                            Heizelmann
                            wrote on last edited by
                            #13

                            @DavidZH Can not confirm this. Messages from sending node reaches repeater but not handled because the repeater finds no gateway.

                            1 Reply Last reply
                            0
                            • H Offline
                              H Offline
                              Heizelmann
                              wrote on last edited by Heizelmann
                              #14

                              Still need this ☹️. I heard of some low level communication. Might this be a solution? I am not en expert. Would be kind if someone can give an instruction.

                              1 Reply Last reply
                              0
                              • H Heizelmann

                                Re: Node to node communnication in v2.0 between repeater nodes

                                In relation to this older post I have a sceneraio where node to node communication stops working. I have two nodes, a sensor and a repeater/actuator combination and a gateway. As long as the gateway is present to all nodes a direct communication between the sensor and the repeater/actuator works. On the sensor the log shows

                                MSG:SEND,44-44-43-43,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=1,st=OK:1
                                

                                and on the repeater/actuator

                                TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
                                

                                But if the gateway is not reachable (tested by simply switiching it off) the message delivery is unreliable. Mostly on sensor side the log shows NACK instead of OK

                                !TSF:MSG:SEND,44-44-43-43,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=2,st=NACK: 
                                
                                

                                On the receiver side (the repeater/actuator node) a lot of logs are seen for finding the gateway, I think this correct. But the receive function is not called.

                                ...
                                TSF:MSG:SEND,43-43-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                !TSM:FPAR:NO REPLY
                                TSM:FPAR
                                TSF:MSG:SEND,43-43-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                !TSM:FPAR:FAIL
                                TSM:FAIL:CNT=7
                                TSM:FAIL:PDT
                                ...
                                TSF:MSG:READ,44-44-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
                                ...
                                
                                berkseoB Offline
                                berkseoB Offline
                                berkseo
                                wrote on last edited by
                                #15

                                @heizelmann
                                This problem is solved ...completely, independence and autonomy if the gateway is not available. Return to standard mode if the gateway is online again.
                                Watch video - https://www.youtube.com/watch?v=x1oNCO0TXG8&t=126s

                                On the channel there are other videos that explain the principle. I about six months ago did topics here for discussion, but it is interesting to nobody.

                                gohanG 1 Reply Last reply
                                0
                                • berkseoB berkseo

                                  @heizelmann
                                  This problem is solved ...completely, independence and autonomy if the gateway is not available. Return to standard mode if the gateway is online again.
                                  Watch video - https://www.youtube.com/watch?v=x1oNCO0TXG8&t=126s

                                  On the channel there are other videos that explain the principle. I about six months ago did topics here for discussion, but it is interesting to nobody.

                                  gohanG Offline
                                  gohanG Offline
                                  gohan
                                  Mod
                                  wrote on last edited by
                                  #16

                                  @berkseo it could be that not many people are using node to node communications. Good job you found a way

                                  berkseoB 1 Reply Last reply
                                  0
                                  • gohanG gohan

                                    @berkseo it could be that not many people are using node to node communications. Good job you found a way

                                    berkseoB Offline
                                    berkseoB Offline
                                    berkseo
                                    wrote on last edited by
                                    #17

                                    @gohan Perhaps not many people think about it ...first. But this is before the first fall of the gateway when the power supply is interrupted or when the processing of messages in the network is overloaded. The more responsible nodes in the network, the more obvious the problem. And how these problems are solved by an ordinary user??? HE GOES OUT FROM MYSENSORS. If we start to trust the important work of the mysensors network, there should be a guarantee that there will be no problems. So there are two big things for me that I think are missing in mysensors:

                                    1.Possibility of direct radio communication between network nodes. Now I change the parent ID for this on the fly, it provides communication both with the gateway and between nodes directly. It makes no sense to use a gasket when you need to pass a command or data from node A to node B.

                                    2.Autonomy, full, flexible. There is a gateway available, we work through the gateway. There is no working gateway - work without a gateway. There is a gateway in the network again - work with him again. Passive mode can not provide this.

                                    Perhaps not giving stability to the network is the policy of the founding fathers, then it's sad, wouldn't want to if it was.

                                    1 Reply Last reply
                                    0
                                    • scalzS Offline
                                      scalzS Offline
                                      scalz
                                      Hardware Contributor
                                      wrote on last edited by scalz
                                      #18

                                      @berkseo
                                      there are valid and nonvalid points in what you're saying. The valid point is self healing isn't (never) finished and I agree with you it is an important feature.

                                      1. e.g. I saw your mysensors hack code a while ago. i didn't look at your video etc but just thought "got it", then end of a todo.
                                        (I've no falling gw, nor messages overload. my gw is enough powerful and autorestart.). Gw could fail but a node, or a repeater on border of network could fail too.

                                      2. Is your implementation bullet-proof vs all cases?? if there is repeater with node in routing table in between. moving nodes. etc. Not a problem when people live in apartment and don't need big range, with no repeater.
                                        Remember, mysensors isn't a mesh with all the self healing. It's a classic star topology network for the moment, where repeater's role is to forward a msg (not the node's role).

                                      We can't give guarantee! Except saying we do our best in our free time. MySensors is open source, and community driven as possible. Zigbee users etc can also have their issues. That said MySensors is opensource, we can guarantee reactivity when community wants to help ;)

                                      1. "not giving stability in the network" isn't the policy of the team (i guess you know it).

                                      As you can imagine, it's also often more fun to work on new innovative things (like new framework and hw, smarter stuff etc) than maintenance :grimacing:
                                      And it's not easy to follow all posts, piece of code/hacks, videos, adding them to a dev todolist etc.

                                      The easiest way if you want the feature implemented is as you know, please:

                                      • open an issue on gitub
                                      • or create a PR
                                        then that will be checked if the addition is valid and complete. At least there will be history for the next mysensors rev.

                                      And as you're using internal mysensors vars and functions, this will prevent you to lose your work during mysensors updates.

                                      From someone smart: "if all the great critics would only contribute 1% of code - we would have solved lots of issues" ;)

                                      1 Reply Last reply
                                      3
                                      • H Offline
                                        H Offline
                                        Heizelmann
                                        wrote on last edited by
                                        #19

                                        Sorry, but this is too much complicated discussion for me. Is it possible or not with the current version for end users like me? If yes, I need a simple how to example.

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • H Heizelmann

                                          Sorry, but this is too much complicated discussion for me. Is it possible or not with the current version for end users like me? If yes, I need a simple how to example.

                                          mfalkviddM Online
                                          mfalkviddM Online
                                          mfalkvidd
                                          Mod
                                          wrote on last edited by
                                          #20

                                          @heizelmann I think all you need to do is follow @berkseo's video guides.

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


                                          11

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