Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LoRaWAN-lib by
Diff: LoRaMac.cpp
- Branch:
- v4.2.0
- Revision:
- 15:167ad88b7272
- Parent:
- 14:60c5d589a070
- Child:
- 16:1e01c8728daa
diff -r 60c5d589a070 -r 167ad88b7272 LoRaMac.cpp
--- a/LoRaMac.cpp Tue Sep 06 11:02:17 2016 +0000
+++ b/LoRaMac.cpp Tue Sep 13 05:39:43 2016 +0000
@@ -15,7 +15,7 @@
License: Revised BSD License, see LICENSE.TXT file include in the project
-Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jäckle ( STACKFORCE )
+Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jäckle ( STACKFORCE )
*/
#include "board.h"
@@ -2539,10 +2539,28 @@
freq |= ( uint32_t )payload[macIndex++] << 16;
freq *= 100;
+
+#if ( defined( USE_BAND_915 ) || defined( USE_BAND_915_HYBRID ) )
+ if( ( freq < 923.2e6 ) || ( freq > 927.5e6 ) )
+ {
+ status &= 0xFE; // Channel frequency KO
+ }
+ else
+ {
+ uint32_t freqTmp;
+ freqTmp = (int)( freq - 923.3e6 )/600e3;
+ if( ( freq - 923.3e6 ) - ( freqTmp * 600e3 ) > 0 )
+ {
+ status &= 0xFE; // Channel frequency KO
+ }
+ }
+#else
if( Radio.CheckRfFrequency( freq ) == false )
{
status &= 0xFE; // Channel frequency KO
}
+#endif
+
if( ValueInRange( datarate, LORAMAC_RX_MIN_DATARATE, LORAMAC_RX_MAX_DATARATE ) == false )
{

