FreeRTOS: FreeRTOS Cellular Library v1.4.0
FreeRTOS Cellular Library
 
Loading...
Searching...
No Matches
cellular_config_defaults.h File Reference

This represents the default values for the configuration macros for the Cellular library. More...

Go to the source code of this file.

Macros

#define CELLULAR_DO_NOT_USE_CUSTOM_CONFIG
 Define this macro to build the Cellular library without the custom config file cellular_config.h.
 
#define CELLULAR_MCC_MAX_SIZE   ( 3U )
 Mobile country code max size.

 
#define CELLULAR_MNC_MAX_SIZE   ( 3U )
 Mobile network code max size.

 
#define CELLULAR_ICCID_MAX_SIZE   ( 20U )
 Integrate circuit card identity max size.

 
#define CELLULAR_IMSI_MAX_SIZE   ( 15U )
 International Mobile Subscriber Identity max size.

 
#define CELLULAR_FW_VERSION_MAX_SIZE   ( 32U )
 Cellular module firmware version max size.

 
#define CELLULAR_HW_VERSION_MAX_SIZE   ( 12U )
 Cellular module hardware version max size.

 
#define CELLULAR_SERIAL_NUM_MAX_SIZE   ( 12U )
 Cellular module serial number max size.

 
#define CELLULAR_IMEI_MAX_SIZE   ( 15U )
 International Mobile Equipment Identity number max size.

 
#define CELLULAR_NETWORK_NAME_MAX_SIZE   ( 32U )
 Registered network operator name max size.

 
#define CELLULAR_APN_MAX_SIZE   ( 64U )
 Access point name max size.

 
#define CELLULAR_PDN_USERNAME_MAX_SIZE   ( 32U )
 Packet data network username max size.

 
#define CELLULAR_PDN_PASSWORD_MAX_SIZE   ( 32u )
 Packet data network password max size.

 
#define CELLULAR_IP_ADDRESS_MAX_SIZE   ( 40U )
 Cellular data network IP address max size.

 
#define CELLULAR_AT_CMD_MAX_SIZE   ( 200U )
 Cellular AT command max size.

 
#define CELLULAR_NUM_SOCKET_MAX   ( 12U )
 Cellular module number of socket max size.

 
#define CELLULAR_MANUFACTURE_ID_MAX_SIZE   ( 20U )
 Cellular module manufacture ID max size.

 
#define CELLULAR_MODEL_ID_MAX_SIZE   ( 10U )
 Cellular module ID max size.

 
#define CELLULAR_EDRX_LIST_MAX_SIZE   ( 4U )
 Cellular EDRX list max size.

 
#define CELLULAR_PDN_CONTEXT_ID_MIN   ( 1U )
 Cellular PDN context ID min value.

 
#define CELLULAR_PDN_CONTEXT_ID_MAX   ( 16U )
 Cellular PDN context ID max value.

 
#define CELLULAR_MAX_RAT_PRIORITY_COUNT   ( 3U )
 Cellular RAT ( radio access technology ) priority count.

 
#define CELLULAR_MAX_SEND_DATA_LEN   ( 1460U )
 Cellular socket max send data length.

 
#define CELLULAR_MAX_RECV_DATA_LEN   ( 1500U )
 Cellular socket max receive data length.

 
#define CELLULAR_SUPPORT_GETHOSTBYNAME   ( 1U )
 Cellular module support getHostByName.

 
#define CELLULAR_COMM_IF_SEND_TIMEOUT_MS   ( 1000U )
 Cellular comm interface send timeout in MS.

 
#define CELLULAR_COMM_IF_RECV_TIMEOUT_MS   ( 1000U )
 Cellular comm interface receive timeout in MS.

 
#define CELLULAR_CONFIG_STATIC_ALLOCATION_CONTEXT   ( 0U )
 FreeRTOS Cellular Library use static context.

 
#define CELLULAR_CONFIG_STATIC_COMM_CONTEXT_ALLOCATION   ( 0U )
 Cellular comm interface use static context.

 
#define CELLULAR_CONFIG_DEFAULT_RAT   ( 8 ) /* Set default RAT to CELLULAR_RAT_CATM1 @ref CellularRat_t. */
 Default radio access technology.

 
#define CELLULAR_CONFIG_STATIC_SOCKET_CONTEXT_ALLOCATION   ( 0 )
 Cellular comm interface use static socket context.

 
#define CELLULAR_COMMON_AT_COMMAND_TIMEOUT_MS   ( 5000U )
 Cellular common AT command timeout.

 
#define CELLULAR_AT_COMMAND_RAW_TIMEOUT_MS   ( 5000U )
 Cellular AT command raw timeout.

 
#define CELLULAR_CONFIG_MAX_PREFIX_STRING_LENGTH   ( 32U )
 Cellular AT command response prefix string length.

 
#define CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR(x)   ( ( x ) == '+' )
 Macro to check prefix leading char.

 
#define CELLULAR_CHECK_IS_PREFIX_CHAR(inputChar)
 Macro to check prefix chars.

 
#define CELLULAR_AT_MAX_STRING_SIZE   ( 256U )
 Cellular AT string length.

 
#define CELLULAR_CONFIG_USE_CCID_COMMAND   1
 Use AT+CCID command for Integrated Circuit Card ID( ICCID ) information.

 
#define CELLULAR_CONFIG_ASSERT(X)   configASSERT( X )
 Assert function for cellular interface.
 
#define CELLULAR_CONFIG_PLATFORM_FREERTOS   1
 Use FreeRTOS platform function for backward compatibility.

 
#define CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE   1600U
 Pktio read buffer size.
 
#define LogError(message)
 Macro that is called in the cellular library for logging "Error" level messages.
 
#define LogWarn(message)
 Macro that is called in the cellular library for logging "Warning" level messages.
 
#define LogInfo(message)
 Macro that is called in the cellular library for logging "Info" level messages.
 
#define LogDebug(message)
 Macro that is called in the cellular library for logging "Debug" level messages.
 

Detailed Description

This represents the default values for the configuration macros for the Cellular library.

Note
This file SHOULD NOT be modified. If custom values are needed for any configuration macro, a cellular_config.h file should be provided to the Cellular library to override the default values defined in this file. To use the custom config file, the CELLULAR_DO_NOT_USE_CUSTOM_CONFIG preprocessor macro SHOULD NOT be set.

Macro Definition Documentation

◆ CELLULAR_DO_NOT_USE_CUSTOM_CONFIG

#define CELLULAR_DO_NOT_USE_CUSTOM_CONFIG

Define this macro to build the Cellular library without the custom config file cellular_config.h.

Without the custom config, the Cellular library builds with default values of config macros defined in cellular_config_defaults.h file.

If a custom config is provided, then CELLULAR_DO_NOT_USE_CUSTOM_CONFIG should not be defined.

◆ CELLULAR_MCC_MAX_SIZE

#define CELLULAR_MCC_MAX_SIZE   ( 3U )

Mobile country code max size.

Possible values:Any positive integer
Default value (if undefined): 3

◆ CELLULAR_MNC_MAX_SIZE

#define CELLULAR_MNC_MAX_SIZE   ( 3U )

Mobile network code max size.

Possible values:Any positive integer
Default value (if undefined): 3

◆ CELLULAR_ICCID_MAX_SIZE

#define CELLULAR_ICCID_MAX_SIZE   ( 20U )

Integrate circuit card identity max size.

Possible values:Any positive integer
Default value (if undefined): 20

◆ CELLULAR_IMSI_MAX_SIZE

#define CELLULAR_IMSI_MAX_SIZE   ( 15U )

International Mobile Subscriber Identity max size.

Possible values:Any positive integer
Default value (if undefined): 15

◆ CELLULAR_FW_VERSION_MAX_SIZE

#define CELLULAR_FW_VERSION_MAX_SIZE   ( 32U )

Cellular module firmware version max size.

Possible values:Any positive integer
Default value (if undefined): 32

◆ CELLULAR_HW_VERSION_MAX_SIZE

#define CELLULAR_HW_VERSION_MAX_SIZE   ( 12U )

Cellular module hardware version max size.

Possible values:Any positive integer
Default value (if undefined): 12

◆ CELLULAR_SERIAL_NUM_MAX_SIZE

#define CELLULAR_SERIAL_NUM_MAX_SIZE   ( 12U )

Cellular module serial number max size.

Possible values:Any positive integer
Default value (if undefined): 12

◆ CELLULAR_IMEI_MAX_SIZE

#define CELLULAR_IMEI_MAX_SIZE   ( 15U )

International Mobile Equipment Identity number max size.

Possible values:Any positive integer
Default value (if undefined): 15

◆ CELLULAR_NETWORK_NAME_MAX_SIZE

#define CELLULAR_NETWORK_NAME_MAX_SIZE   ( 32U )

Registered network operator name max size.

Possible values:Any positive integer
Default value (if undefined): 32

◆ CELLULAR_APN_MAX_SIZE

#define CELLULAR_APN_MAX_SIZE   ( 64U )

Access point name max size.

Possible values:Any positive integer
Default value (if undefined): 32

◆ CELLULAR_PDN_USERNAME_MAX_SIZE

#define CELLULAR_PDN_USERNAME_MAX_SIZE   ( 32U )

Packet data network username max size.

Possible values:Any positive integer
Default value (if undefined): 32

◆ CELLULAR_PDN_PASSWORD_MAX_SIZE

#define CELLULAR_PDN_PASSWORD_MAX_SIZE   ( 32u )

Packet data network password max size.

Possible values:Any positive integer
Default value (if undefined): 32

◆ CELLULAR_IP_ADDRESS_MAX_SIZE

#define CELLULAR_IP_ADDRESS_MAX_SIZE   ( 40U )

Cellular data network IP address max size.

Possible values:Any positive integer
Default value (if undefined): 40

◆ CELLULAR_AT_CMD_MAX_SIZE

#define CELLULAR_AT_CMD_MAX_SIZE   ( 200U )

Cellular AT command max size.

Possible values:Any positive integer
Default value (if undefined): 200

◆ CELLULAR_NUM_SOCKET_MAX

#define CELLULAR_NUM_SOCKET_MAX   ( 12U )

Cellular module number of socket max size.

Possible values:Any positive integer
Default value (if undefined): 12

◆ CELLULAR_MANUFACTURE_ID_MAX_SIZE

#define CELLULAR_MANUFACTURE_ID_MAX_SIZE   ( 20U )

Cellular module manufacture ID max size.

Possible values:Any positive integer
Default value (if undefined): 20

◆ CELLULAR_MODEL_ID_MAX_SIZE

#define CELLULAR_MODEL_ID_MAX_SIZE   ( 10U )

Cellular module ID max size.

Possible values:Any positive integer
Default value (if undefined): 10

◆ CELLULAR_EDRX_LIST_MAX_SIZE

#define CELLULAR_EDRX_LIST_MAX_SIZE   ( 4U )

Cellular EDRX list max size.

Possible values:Any positive integer
Default value (if undefined): 4

◆ CELLULAR_PDN_CONTEXT_ID_MIN

#define CELLULAR_PDN_CONTEXT_ID_MIN   ( 1U )

Cellular PDN context ID min value.

Possible values:Any positive integer
Default value (if undefined): 1

◆ CELLULAR_PDN_CONTEXT_ID_MAX

#define CELLULAR_PDN_CONTEXT_ID_MAX   ( 16U )

Cellular PDN context ID max value.

Possible values:Any positive integer
Default value (if undefined): 1

◆ CELLULAR_MAX_RAT_PRIORITY_COUNT

#define CELLULAR_MAX_RAT_PRIORITY_COUNT   ( 3U )

Cellular RAT ( radio access technology ) priority count.

Possible values:Any positive integer
Default value (if undefined): 1

◆ CELLULAR_MAX_SEND_DATA_LEN

#define CELLULAR_MAX_SEND_DATA_LEN   ( 1460U )

Cellular socket max send data length.

Possible values:Any positive integer
Default value (if undefined): 1460

◆ CELLULAR_MAX_RECV_DATA_LEN

#define CELLULAR_MAX_RECV_DATA_LEN   ( 1500U )

Cellular socket max receive data length.

Possible values:Any positive integer
Default value (if undefined): 1500

◆ CELLULAR_SUPPORT_GETHOSTBYNAME

#define CELLULAR_SUPPORT_GETHOSTBYNAME   ( 1U )

Cellular module support getHostByName.

Possible values:0 or 1
Default value (if undefined): 1

◆ CELLULAR_COMM_IF_SEND_TIMEOUT_MS

#define CELLULAR_COMM_IF_SEND_TIMEOUT_MS   ( 1000U )

Cellular comm interface send timeout in MS.

Possible values:Any positive integer
Default value (if undefined): 1000

◆ CELLULAR_COMM_IF_RECV_TIMEOUT_MS

#define CELLULAR_COMM_IF_RECV_TIMEOUT_MS   ( 1000U )

Cellular comm interface receive timeout in MS.

Possible values:Any positive integer
Default value (if undefined): 1000

◆ CELLULAR_CONFIG_STATIC_ALLOCATION_CONTEXT

#define CELLULAR_CONFIG_STATIC_ALLOCATION_CONTEXT   ( 0U )

FreeRTOS Cellular Library use static context.

Possible values:0 or 1
Default value (if undefined): 0

◆ CELLULAR_CONFIG_STATIC_COMM_CONTEXT_ALLOCATION

#define CELLULAR_CONFIG_STATIC_COMM_CONTEXT_ALLOCATION   ( 0U )

Cellular comm interface use static context.

Possible values:0 or 1
Default value (if undefined): 0

◆ CELLULAR_CONFIG_DEFAULT_RAT

#define CELLULAR_CONFIG_DEFAULT_RAT   ( 8 ) /* Set default RAT to CELLULAR_RAT_CATM1 @ref CellularRat_t. */

Default radio access technology.

Possible values:Any value before CELLULAR_RAT_MAX ( Reference : CellularRat_t )
Default value (if undefined): CELLULAR_RAT_CATM1

◆ CELLULAR_CONFIG_STATIC_SOCKET_CONTEXT_ALLOCATION

#define CELLULAR_CONFIG_STATIC_SOCKET_CONTEXT_ALLOCATION   ( 0 )

Cellular comm interface use static socket context.

Possible values:0 or 1
Default value (if undefined): 0

◆ CELLULAR_COMMON_AT_COMMAND_TIMEOUT_MS

#define CELLULAR_COMMON_AT_COMMAND_TIMEOUT_MS   ( 5000U )

Cellular common AT command timeout.

The timeout value for Cellular_Common prefix APIs. The timeout value should be set according to spec. It should be long enough for AT command used in cellular common APIs.

Possible values:Any positive integer
Default value (if undefined): 5000

◆ CELLULAR_AT_COMMAND_RAW_TIMEOUT_MS

#define CELLULAR_AT_COMMAND_RAW_TIMEOUT_MS   ( 5000U )

Cellular AT command raw timeout.

The timeout value for Cellular_ATCommandRaw API.

Possible values:Any positive integer
Default value (if undefined): 5000

◆ CELLULAR_CONFIG_MAX_PREFIX_STRING_LENGTH

#define CELLULAR_CONFIG_MAX_PREFIX_STRING_LENGTH   ( 32U )

Cellular AT command response prefix string length.

The maximum length of AT command response prefix string.

Possible values:Any positive integer
Default value (if undefined): 32

◆ CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR

#define CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR (   x)    ( ( x ) == '+' )

Macro to check prefix leading char.

Cellular interface requires prefix string starts with "+". Some cellular modem uses different leading char. This macro can be defined in cellular_config.h to support different leading char.

Default value (if undefined): '+'

For example:

‍^SMSO:(list of supported<fso>s)

The prefix string contains "^" which is not default leading char for prefix string. User can define this config to support this prefix string.

◆ CELLULAR_CHECK_IS_PREFIX_CHAR

#define CELLULAR_CHECK_IS_PREFIX_CHAR (   inputChar)
Value:
( ( ( ( int32_t ) isalpha( ( ( int8_t ) ( inputChar ) ) ) ) == 0 ) && \
( ( ( int32_t ) isdigit( ( ( int8_t ) ( inputChar ) ) ) ) == 0 ) && \
( ( inputChar ) != '_' ) && \
( !( CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR( inputChar ) ) ) )
#define CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR(x)
Macro to check prefix leading char.
Definition: cellular_config_defaults.h:419

Macro to check prefix chars.

The macro to check prefix string contains valid char. Modem with different prefix strings can be supported with this config.

Default value (if undefined): alphabet, digit, '+' and '_'

For example:

‍+APP PDP: 0,ACTIVE

The prefix string contains space which is not default valid char. User can define this config to support this prefix string.

◆ CELLULAR_AT_MAX_STRING_SIZE

#define CELLULAR_AT_MAX_STRING_SIZE   ( 256U )

Cellular AT string length.

The maximum length of an AT string.

Possible values:Any positive integer
Default value (if undefined): 256

◆ CELLULAR_CONFIG_USE_CCID_COMMAND

#define CELLULAR_CONFIG_USE_CCID_COMMAND   1

Use AT+CCID command for Integrated Circuit Card ID( ICCID ) information.

Acquire ICCID with non-standard 3GPP command AT+CCID in Cellular_CommonGetSimCardInfo.

Possible values:0 or 1
Default value (if undefined): 1

◆ CELLULAR_CONFIG_ASSERT

#define CELLULAR_CONFIG_ASSERT (   X)    configASSERT( X )

Assert function for cellular interface.

Possible values:any assert function
Default value (if undefined): configASSERT

◆ CELLULAR_CONFIG_PLATFORM_FREERTOS

#define CELLULAR_CONFIG_PLATFORM_FREERTOS   1

Use FreeRTOS platform function for backward compatibility.

Define FreeRTOS platform function for cellular interface backward compatibility with version earlier than v1.4.0.

Possible values:0 or 1
Default value (if undefined): 1

◆ CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE

#define CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE   1600U

Pktio read buffer size.

The pktio read buffer size should be configured to greater than the maximum AT command response size, which is typically the TCP socket receive command response packet size.

Possible values:Any positive integer
Default value (if undefined): 1600

◆ LogError

#define LogError (   message)

Macro that is called in the cellular library for logging "Error" level messages.

To enable error level logging in the cellular library, this macro should be mapped to the application-specific logging implementation that supports error logging.

Note
This logging macro is called in the cellular library with parameters wrapped in double parentheses to be ISO C89/C90 standard compliant. For a reference POSIX implementation of the logging macros, refer to cellular_config.h files.

Default value: Error logging is turned off, and no code is generated for calls to the macro in the cellular library on compilation.

◆ LogWarn

#define LogWarn (   message)

Macro that is called in the cellular library for logging "Warning" level messages.

To enable warning level logging in the cellular library, this macro should be mapped to the application-specific logging implementation that supports warning logging.

Note
This logging macro is called in the cellular library with parameters wrapped in double parentheses to be ISO C89/C90 standard compliant. For a reference POSIX implementation of the logging macros, refer to cellular_config.h files.

Default value: Warning logs are turned off, and no code is generated for calls to the macro in the cellular library on compilation.

◆ LogInfo

#define LogInfo (   message)

Macro that is called in the cellular library for logging "Info" level messages.

To enable info level logging in the cellular library, this macro should be mapped to the application-specific logging implementation that supports info logging.

Note
This logging macro is called in the cellular library with parameters wrapped in double parentheses to be ISO C89/C90 standard compliant. For a reference POSIX implementation of the logging macros, refer to cellular_config.h files.

Default value: Info logging is turned off, and no code is generated for calls to the macro in the cellular library on compilation.

◆ LogDebug

#define LogDebug (   message)

Macro that is called in the cellular library for logging "Debug" level messages.

To enable debug level logging from cellular library, this macro should be mapped to the application-specific logging implementation that supports debug logging.

Note
This logging macro is called in the cellular library with parameters wrapped in double parentheses to be ISO C89/C90 standard compliant. For a reference POSIX implementation of the logging macros, refer to cellular_config.h files.

Default value: Debug logging is turned off, and no code is generated for calls to the macro in the cellular library on compilation.