RAKWireless / WisBlock

Quickstart, tutorials and examples for the RAKwireless WisBlock product line.
https://www.rakwireless.com
MIT License
156 stars 117 forks source link

Re-Join Network #56

Closed Famosi closed 2 years ago

Famosi commented 2 years ago

I'd like to try join the network until a gateway is found.

Here is described that the JOINREQ_NBTRIALS parameter can be used to specify a "...number to set the number of trials to join the network".

But how to join the network "for ever". Should I set a very high number? Is there a max value for that parameter? Otherwise, is there a way to set something like: "try join until you join".

Any suggestion? Thank you

beegee-tokyo commented 2 years ago

Better solution (but not well documented) The LoRaWAN library has two callbacks, one for LoRaWAN join success and one for fail. You can restart join from the join failed callback. These callbacks are used in the LoRaWan.ino example.

You could restart join from here: lorawan_join_failed_handler