From ea0a53d5fc919ef1f4793d3517a7175ea1869706 Mon Sep 17 00:00:00 2001 From: Denis Froschauer Date: Mon, 3 Aug 2015 13:30:37 +0200 Subject: [PATCH 1/2] Using appPayloadStartIndex doesn't always point to the end of options --- src/mac/LoRaMac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mac/LoRaMac.c b/src/mac/LoRaMac.c index 2ff78bb4c..0a813c1eb 100644 --- a/src/mac/LoRaMac.c +++ b/src/mac/LoRaMac.c @@ -1485,7 +1485,7 @@ static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t if( fCtrl.Bits.FOptsLen > 0 ) { // Decode Options field MAC commands - LoRaMacProcessMacCommands( payload, 8, appPayloadStartIndex ); + LoRaMacProcessMacCommands( payload, 8, 8 + fCtrl.Bits.FOptsLen ); } if( port == 0 ) { From 7da92143756c822e8ce6344a0964ccdee97b26cc Mon Sep 17 00:00:00 2001 From: Denis Froschauer Date: Mon, 3 Aug 2015 14:40:49 +0200 Subject: [PATCH 2/2] LoRaWAN Spec 1R0 specify 3 mandatory channels for EU868. Hardcoding LC4-LC9 results on failure with existing base stations. --- src/mac/LoRaMac.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/mac/LoRaMac.c b/src/mac/LoRaMac.c index 0a813c1eb..71ccde6a6 100644 --- a/src/mac/LoRaMac.c +++ b/src/mac/LoRaMac.c @@ -191,12 +191,6 @@ static ChannelParams_t Channels[LORA_MAX_NB_CHANNELS] = LC1, LC2, LC3, - LC4, - LC5, - LC6, - LC7, - LC8, - LC9, }; #else /*!