Skip to content

Commit

Permalink
Added Russia RU864 region support.
Browse files Browse the repository at this point in the history
  • Loading branch information
mluis1 committed Jul 2, 2018
1 parent ce807fe commit c9d4f25
Show file tree
Hide file tree
Showing 32 changed files with 1,711 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"REGION_AS923":"OFF",
"REGION_CN470":"OFF",
"REGION_KR920":"OFF",
"REGION_IN865":"OFF"
"REGION_IN865":"OFF",
"REGION_RU864":"OFF"
}
}
2 changes: 2 additions & 0 deletions Doc/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Alternatively one can use a graphical interface to configure CMake, drop down me
* LORAMAC_REGION_CN470
* LORAMAC_REGION_KR920
* LORAMAC_REGION_IN865
* LORAMAC_REGION_RU864
* `MODULATION` - Type of modulation choice.
**Note**: Only applicable to ping-pong or rx-sensi `APPLICATION` choice.
The possible choices are:
Expand All @@ -122,6 +123,7 @@ Alternatively one can use a graphical interface to configure CMake, drop down me
* `REGION_CN470` - Enables support for the Region CN470 (Default OFF)
* `REGION_KR920` - Enables support for the Region IN865 (Default OFF)
* `REGION_IN865` - Enables support for the Region AS923 (Default OFF)
* `REGION_RU864` - Enables support for the Region RU864 (Default OFF)

### Options that are automatically set

Expand Down
2 changes: 1 addition & 1 deletion src/apps/LoRaMac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set_property(CACHE CLASS PROPERTY STRINGS ${CLASS_LIST})
# Allow switching of active region
set(ACTIVE_REGION_LIST LORAMAC_REGION_EU868 LORAMAC_REGION_US915 LORAMAC_REGION_CN779
LORAMAC_REGION_EU433 LORAMAC_REGION_AU915 LORAMAC_REGION_AS923 LORAMAC_REGION_CN470
LORAMAC_REGION_KR920 LORAMAC_REGION_IN865
LORAMAC_REGION_KR920 LORAMAC_REGION_IN865 LORAMAC_REGION_RU864
)
set(ACTIVE_REGION LORAMAC_REGION_EU868 CACHE STRING "Default active region is EU868")
set_property(CACHE ACTIVE_REGION PROPERTY STRINGS ${ACTIVE_REGION_LIST})
Expand Down
2 changes: 1 addition & 1 deletion src/apps/LoRaMac/classA/NAMote72/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 )
defined( REGION_KR920 ) || defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classA/NucleoL073/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classA/NucleoL152/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classA/SAML21/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
2 changes: 1 addition & 1 deletion src/apps/LoRaMac/classB/NAMote72/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 )
defined( REGION_KR920 ) || defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classB/NucleoL073/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classB/SAML21/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
2 changes: 1 addition & 1 deletion src/apps/LoRaMac/classC/NAMote72/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 )
defined( REGION_KR920 ) || defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classC/NucleoL073/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classC/NucleoL152/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
3 changes: 2 additions & 1 deletion src/apps/LoRaMac/classC/SAML21/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ static void McpsConfirm( McpsConfirm_t *mcpsConfirm )
printf("CHANNEL MASK: ");
#if defined( REGION_AS923 ) || defined( REGION_CN779 ) || \
defined( REGION_EU868 ) || defined( REGION_IN865 ) || \
defined( REGION_KR920 ) || defined( REGION_EU433 )
defined( REGION_KR920 ) || defined( REGION_EU433 ) || \
defined( REGION_RU864 )

for( uint8_t i = 0; i < 1; i++)

Expand Down
4 changes: 4 additions & 0 deletions src/apps/ping-pong/NAMote72/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/ping-pong/NucleoL073/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/ping-pong/NucleoL152/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/ping-pong/SAML21/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/rx-sensi/NAMote72/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/rx-sensi/NucleoL073/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/rx-sensi/NucleoL152/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/rx-sensi/SAML21/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else
#error "Please define a frequency band in the compiler options."
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/apps/tx-cw/NAMote72/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else

#error "Please define a frequency band in the compiler options."
Expand Down
5 changes: 5 additions & 0 deletions src/apps/tx-cw/NucleoL073/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
#define RF_FREQUENCY 915000000 // Hz
#define TX_OUTPUT_POWER 14 // 14 dBm

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz
#define TX_OUTPUT_POWER 14 // 14 dBm

#else

#error "Please define a frequency band in the compiler options."
Expand Down
5 changes: 5 additions & 0 deletions src/apps/tx-cw/NucleoL152/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
#define RF_FREQUENCY 915000000 // Hz
#define TX_OUTPUT_POWER 14 // 14 dBm

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz
#define TX_OUTPUT_POWER 14 // 14 dBm

#else

#error "Please define a frequency band in the compiler options."
Expand Down
4 changes: 4 additions & 0 deletions src/apps/tx-cw/SAML21/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@

#define RF_FREQUENCY 915000000 // Hz

#elif defined( REGION_RU864 )

#define RF_FREQUENCY 864000000 // Hz

#else

#error "Please define a frequency band in the compiler options."
Expand Down
3 changes: 2 additions & 1 deletion src/mac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ option(REGION_AS923 "Region AS923" OFF)
option(REGION_CN470 "Region CN470" OFF)
option(REGION_KR920 "Region KR920" OFF)
option(REGION_IN865 "Region IN865" OFF)
set(REGION_LIST REGION_EU868 REGION_US915 REGION_CN779 REGION_EU433 REGION_AU915 REGION_AS923 REGION_CN470 REGION_KR920 REGION_IN865)
option(REGION_RU864 "Region RU864" OFF)
set(REGION_LIST REGION_EU868 REGION_US915 REGION_CN779 REGION_EU433 REGION_AU915 REGION_AS923 REGION_CN470 REGION_KR920 REGION_IN865 REGION_RU864)

#---------------------------------------------------------------------------------------
# Target
Expand Down
4 changes: 4 additions & 0 deletions src/mac/LoRaMac.h
Original file line number Diff line number Diff line change
Expand Up @@ -2213,6 +2213,10 @@ typedef enum eLoRaMacRegion_t
* North american band on 915MHz
*/
LORAMAC_REGION_US915,
/*!
* Russia band on 864MHz
*/
LORAMAC_REGION_RU864,
}LoRaMacRegion_t;

/*!
Expand Down
Loading

0 comments on commit c9d4f25

Please sign in to comment.