diff --git a/source/cellular_bg96.c b/source/cellular_bg96.c index 4a3e98b..15fba99 100644 --- a/source/cellular_bg96.c +++ b/source/cellular_bg96.c @@ -261,12 +261,14 @@ CellularError_t Cellular_ModuleEnableUE( CellularContext_t * pContext ) cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult ); } - if( cellularStatus == CELLULAR_SUCCESS ) - { - /* Configure Band configuration to all bands. */ - atReqGetNoResult.pAtCmd = "AT+QCFG=\"band\",f,400a0e189f,a0e189f"; - cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult ); - } + #if ( CELLULAR_BG96_ENABLE_BAND_CONFIGURATION == 1 ) + if( cellularStatus == CELLULAR_SUCCESS ) + { + /* Configure Band configuration to all bands. */ + atReqGetNoResult.pAtCmd = "AT+QCFG=\"band\","CELLULAR_BG96_BAND_CONFIGURATION; + cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult ); + } + #endif if( cellularStatus == CELLULAR_SUCCESS ) { diff --git a/source/cellular_bg96.h b/source/cellular_bg96.h index 7c93795..24904eb 100644 --- a/source/cellular_bg96.h +++ b/source/cellular_bg96.h @@ -57,6 +57,16 @@ #define CELLULAR_BG96_DIRECT_PUSH_SOCKET_BUFFER_SIZE ( 2048UL ) #endif /* CELLULAR_BG96_DIRECT_PUSH_SOCKET_BUFFER_SIZE. */ +/* Enable/disable band configuration for BG96 modules */ +#ifndef CELLULAR_BG96_ENABLE_BAND_CONFIGURATION + #define CELLULAR_BG96_ENABLE_BAND_CONFIGURATION ( 1 ) +#endif + +/* Default band configuration if enabled */ +#ifndef CELLULAR_BG96_BAND_CONFIGURATION + #define CELLULAR_BG96_BAND_CONFIGURATION "f,400a0e189f,a0e189f" +#endif + /*-----------------------------------------------------------*/ /**