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 ) {
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: