err_code = sd_ble_uuid_vs_add(&base_uuid, &p_led->uuid_type);
softdevice_handler.c–softdevice_enable_get_default_config()
原因1:数量不够
- 增大uuid_count数量
p_ble_enable_params->common_enable_params.vs_uuid_count = 2;
原因2:空间大小不够
- p_ble_enable_params->gatts_enable_params.attr_tab_size = SOFTDEVICE_GATTS_ATTR_TAB_SIZE;
修改宏定义,增大空间[BLE_GATTS_ATTR_TAB_SIZE_DEFAULT]
#define SOFTDEVICE_GATTS_ATTR_TAB_SIZE BLE_GATTS_ATTR_TAB_SIZE_DEFAULT
/** @defgroup BLE_GATTS_ATTR_TAB_SIZE Attribute Table size
* @{
*/
#define BLE_GATTS_ATTR_TAB_SIZE_MIN 256 /**< Minimum Attribute Table size */
#define BLE_GATTS_ATTR_TAB_SIZE_DEFAULT 0x000 /**< Default Attribute Table size (0x580 bytes for this version of the SoftDevice). */