Battery empty on all nodes
-
Hi,
I had to work on my gateway, software update etc. (took 4 hours, had some issues) and after connecting no sensors connected. After long search I found out that all my batteries where empty from all my nodes? Could that be caused that the gateway was not available?
-
@martim - yes, depending on your code the node might tries to reconnect (not sleep).
-
mmh, Most nodes sleep for 10 minutes. Do you think it will retry after this sleep periode for a few times?
-
@martim no it will retry all the time without sleep if it's unconnected and code is not designed for other.
-
@sundberg84 But I have a sleep. So when it is coming awake after a sleep period. It start sending sensor information to the gateway, if this will fail. Does it retry until succeed? Do you have an example sketch with a good example that will not fail if gateway unavailable?
-
@martim I can't remember but I think @gohan or @mfalkvidd had a similar question a while ago . Let's ping them.
-
If you don't define the my_transport_wait time I think it will keep trying to connect to gateway and it will drain the battery. I always use it so actually I am not entirely sure
-
@gohan Mmh, That I am not using so that might me the case.
-
@martim I am sure @gohan has a point. Try to power down you GW and connect your node through FTDI adapter to the computer. You would see the node trying to connect all the time and not sleeping.
By default it is
#define MY_TRANSPORT_WAIT_READY_MS (0ul) Timeout in ms until transport is ready during startup, set to 0 for no timeout.
-
Isn't this only during starting up the node? So when it is up and running it doesn't apply, or do I misunderstand?
-
@electrik Acoording the documentation looks like your right.
-
there is also the isTransportReady function that you could check before runnig any other code and if it retrns false just skip everthing and go to sleep.