What is the maximum number of characteristics that can be supported using smartBASIC?

The maximum number of characteristics is not a limitation in smartBASIC but a limitation in the underlying Nordic SoftDevice SDK. The SoftDevice has a maximum RAM allowance of 64KB, adding more characteristics will increase RAM usage and depending on other configuration, will determine how many characteristics can be supported within the 64KB allowed RAM space.

The maximum number of characteristics supported in smartBASIC is roughly 24. This is a product of the combination of the total RAM allowance of 64K for SoftDevice, GATT Table configuration as well as the GATT Table size as is specified in Configuration Key 204 (refer to BL654 smartBASIC Extension Guide). The default GATT table size is 1792 bytes (Config 204)) which will allow for roughly 11 characteristics.

If using the AT Interface application the maximum number of characteristics is set to 24 by default. The default configuration can be found in $autorun$.AT.interface.BL654._.sb file:

 //This defines the maximum number of characteristics we can manage

 

 

#define MAX_CHARACTERISTICS 24


As mentioned previously this is the max number of characteristics that can be supported but Out of Box the GATT table size is 1792 bytes resulting in roughly 11 characteristics.

 

Categories

Products