Auto Joining and uplink channel

Hi
Im still new to Lora, and been looking at videos.

I have been searching the forum, and think I got one of the questions below , no 2 , but want to check…

If for example my end device is wakes up and sends data , then goes back to sleep, does:

  1. the node have to request a join (OTAA) every time it sends data, or is this a one off?
  2. the channel the node sends its data on is set by the gateway during the connecting?

Many thanks
Scott

No and no.

A device does not connect to a gateway. That is WiFi or 3G. In LoRaWAN the device chooses a random channel from the list it received when it joined the network (not the gateway) and transmits on that frequency. If there is a (TTN) gateway within radio signal coverage it will be received and forwarded to TTN where the data will be processed.

Your device should join once and keep the session information in ‘permanent’ memory. A device can join a maximum of 65535 times where over the lifetime of a number of years it can send millions of packets. (Keep transmissions within the legally allowed band usage and the TTN fair access policy please!)

And even ignoring the cost of airtime to the rest of the network and the limited number of joins that can be ever done, a device that had to join again every time it wanted to send data would burn through its own battery probably 3 times as fast, possibly more!

Many thanks for your reply. When you say Join once, I assume this is everytime the device is powered up? I am testing a a device and everytime I switch on I pass a join command.

Many thanks
Scott

Most devices won’t retain state when powered down however officially you need to persist the devnonce used during join even in powered down state. Saving it in eeprom would be a good solution.
If you use LoRaWAN 1.0.4 you really will need to as it requires the nonce to increase. So if you restart from 0 you will notice an increasing number of joins to be required on each power up.

1 Like