Why is RN2903 dropping packets - only around 1 in 8 packets is getting through
It sounds like you're connecting to an 8 channel gateway.
RN2903 firmware is designed to match the LoRaWAN specification and the specification describes a 64(+8) channel plan, making best use of the available spectrum in the 915MHz band. But the reality is that 64(+8) channel gateways are still expensive and so most trials and prototypes are using 8 channel gateways, which are cheaper and more widely available.
So if using RN2903 with default settings (all channels on) and connecting to an 8(+1) channel gateway, then 7 out of 8 packets will fall on a channel that the gateway is not listening to, and the packet will drop.
This can be easily corrected by using the "mac set ch status X off" in a loop to disable all the unused channels.
A defacto "Frequency Sub-Band" (FSB) numbering scheme is emerging amongst gateway & server providers using FSB 1 to 8. Semtech "best practice" suggests naming them as blocks with letters A to H to avoid mixing up blocks with channels:
FSB 1 (aka block A) = 0, 1, 2, 3, 4, 5, 6, 7 (125 kHz channels) plus 64 (500 kHz channel)
FSB 2 (aka block B) = 8, 9, 10, 11, 12, 13, 14, 15 plus 65
FSB 3 (aka block C) = 16, 17, 18, 19, 20, 21, 22, 23 plus 66
....
FSB 8 (aka block H) = 56, 57, 58, 59, 60, 61, 62, 63 plus 71
or in code, with FSB in the range 1 to 8 ...
int chLow = (FSB -1) * 8;
int chHigh = chLow + 7;
int ch500 = FSB + 63;
for (int i = 0; i < 72; i++) {
if ( i == ch500 || chLow <= i && i <= chHigh)
sendCommand("mac set ch status " + String(i) + " on");
else
sendCommand("mac set ch status " + String(i) + " off");
}
(Thanks to Johan Stoking of TheThingsNetwork for the code snippet, based on theThingsUNO Arduino library)
post edited by @JDP - 2016/04/27 07:38:56