This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

S130 Attribute Table Size anomaly

I was looking into changing the S130 attribute table size, which is by default set to BLE_GATTS_ATTR_TAB_SIZE_DEFAULT, and noticed that this default seems to be set to zero (in ble_gatts.h):

#define BLE_GATTS_ATTR_TAB_SIZE_DEFAULT 0x0000 /**< Default Attribute Table size (0x600 bytes for this version of the SoftDevice). */

The define is clearly set to zero but the comment suggests it ought to be 0x600. Could you clarify this? Does a zero value mean that the S130 automatically uses the 0x600 default?

Parents
  • Hi,

    Yes, using an attr_tab_size of BLE_GATTS_ATTR_TAB_SIZE_DEFAULT will set the default attribute table size on SoftDevice initialisation. The default value depends on SoftDevice and SoftDevice version, and it is 0x600 for the particular SoftDevice that you are using. You can use another value if you want to, as long as it is not less than BLE_GATTS_ATTR_TAB_SIZE_MIN.

    Examples for how the attribute table size is set can be found in the ble_central examples. The attr_tab_size value is part of the ble_enable_params_t structure passed to sd_ble_enable() for initialising the SoftDevice (in main.c).

    Regards, Terje

Reply
  • Hi,

    Yes, using an attr_tab_size of BLE_GATTS_ATTR_TAB_SIZE_DEFAULT will set the default attribute table size on SoftDevice initialisation. The default value depends on SoftDevice and SoftDevice version, and it is 0x600 for the particular SoftDevice that you are using. You can use another value if you want to, as long as it is not less than BLE_GATTS_ATTR_TAB_SIZE_MIN.

    Examples for how the attribute table size is set can be found in the ble_central examples. The attr_tab_size value is part of the ble_enable_params_t structure passed to sd_ble_enable() for initialising the SoftDevice (in main.c).

    Regards, Terje

Children
Related