Node to node communication fails if gateway is not reachable
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
and on the repeater/actuator
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
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 ...
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
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.
@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.
Disable the transport check on the repeater.
#define MY_TRANSPORT_WAIT_READY_MS 1
Heizelmann last edited by Heizelmann
@hek I already did this, but with 3000ms. Changed to 1ms but without success.
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.
See my other logs in the previous post.
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.
Added an issue for this on https://github.com/mysensors/MySensors/issues/792
DavidZH last edited by
@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.
@DavidZH Can not confirm this. Messages from sending node reaches repeater but not handled because the repeater finds no gateway.
Heizelmann last edited by Heizelmann
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.