From 09484aa60e01aa2c23cd2358ebd637aee712d433 Mon Sep 17 00:00:00 2001 From: Brian Danilko Date: Thu, 3 May 2018 16:26:09 +0930 Subject: [PATCH] lib/lora: Allow non-zero dr_min for top channels in AU/US915 regions The LoRaWAN-Regional-Parameters (1.1b) document, for AU915 and US915, lists the channels 64 - 71 as having specific data rates which are not zero. This change removes the check of dr_min == 0 for these channels. Issue #163 --- lib/lora/mac/region/RegionAU915.c | 5 +++-- lib/lora/mac/region/RegionUS915.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/lora/mac/region/RegionAU915.c b/lib/lora/mac/region/RegionAU915.c index 5e2486b51a..db0f68a3e4 100644 --- a/lib/lora/mac/region/RegionAU915.c +++ b/lib/lora/mac/region/RegionAU915.c @@ -841,11 +841,12 @@ LoRaMacStatus_t RegionAU915ChannelManualAdd( ChannelAddParams_t* channelAdd ) return LORAMAC_STATUS_PARAMETER_INVALID; } - // Validate the datarate range for min: must be DR_0 - if( channelAdd->NewChannel->DrRange.Fields.Min != DR_0 ) + // Validate the datarate range for min: must be DR_0 for channels 0-63 + if( id < 64 && channelAdd->NewChannel->DrRange.Fields.Min != DR_0 ) { drInvalid = true; } + // Validate the datarate range for max: must be <= TX_MAX_DATARATE if( channelAdd->NewChannel->DrRange.Fields.Max > AU915_TX_MAX_DATARATE ) { diff --git a/lib/lora/mac/region/RegionUS915.c b/lib/lora/mac/region/RegionUS915.c index 09c232700a..99c265f1c9 100644 --- a/lib/lora/mac/region/RegionUS915.c +++ b/lib/lora/mac/region/RegionUS915.c @@ -849,11 +849,12 @@ LoRaMacStatus_t RegionUS915ChannelManualAdd( ChannelAddParams_t* channelAdd ) return LORAMAC_STATUS_PARAMETER_INVALID; } - // Validate the datarate range for min: must be DR_0 - if( channelAdd->NewChannel->DrRange.Fields.Min != DR_0 ) + // Validate the datarate range for min: must be DR_0 for channels 0-63 + if( id < 64 && channelAdd->NewChannel->DrRange.Fields.Min != DR_0 ) { drInvalid = true; } + // Validate the datarate range for max: must be <= TX_MAX_DATARATE if( channelAdd->NewChannel->DrRange.Fields.Max > US915_TX_MAX_DATARATE ) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy