jpmeijers / RN2483-Arduino-Library

Arduino C++ code to communicate with a Microchip RN2483 module
Apache License 2.0
84 stars 60 forks source link

Change delay to get authorized by TTN #62

Closed simmoinard closed 5 years ago

simmoinard commented 5 years ago

I had some troubles using this example, as TTN seems to block the devices if they send data too fast... I juste changed the delay from 0.2sec to 30sec, the legal limit

jpmeijers commented 5 years ago

A few lines higher than your change is this: myLora.tx("!"); //one byte, blocking function Note that it says it is a blocking function. This function will only return when the transmission is done, or when it failed.

The LoRaWAN stack inside the RN2483 module handles the 1% duty cycle limit, so we do not need to. So in other words we can just as well remove the delay all together.

The only reason for the 0.2s delay is to have the LED off for at least a little bit of time, otherwise it will look like it is always on.

Also your comment about "30sec, the legal limit" is incorrect. In Europe - for which this example was written - the legal limit is 1% duty cycle. Using a LoRaWAN airtime calculator one can see that using SF7 and small packet (like 1 byte here) one can transmit every 4.634 seconds. If you want to keep to the TTN fair use policy - which is not a legal limit - one should wait 134 seconds between packets.

simmoinard commented 5 years ago

Thank you so much for these explanations!!

Le sam. 2 mars 2019 à 08:58, JP Meijers notifications@github.com a écrit :

Closed #62 https://github.com/jpmeijers/RN2483-Arduino-Library/pull/62.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpmeijers/RN2483-Arduino-Library/pull/62#event-2175647353, or mute the thread https://github.com/notifications/unsubscribe-auth/AXzNdMF9ZrF8WVWJAk3UTTECD8zyXVDBks5vSi8YgaJpZM4bZuPq .