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

SDK13 NRF_ERROR_NO_MEM at sd_ble_gatts_characteristic_add()

Hello, when starting a new project I took the nice Heart-Rate-Example which works fine at my PCA10040. Then I started to add services and characteristics by copying and adapting the HRS - I know that I will have to declare them as vendor specific services and characteristics - this is not already done. One new service with 11 characteristics works fine, but adding a second will lead to a NRF_ERROR_NO_MEM as return value at the sd_ble_gatts_characteristic_add() function and then a Reset is executed. In one post in this forum I saw that adding

memset(&ble_cfg, 0, sizeof(ble_cfg));
ble_cfg.gatts_cfg.attr_tab_size.attr_tab_size = BLE_GATTS_ATTR_TAB_SIZE_MIN;
err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &ble_cfg, ram_start);
APP_ERROR_CHECK(err_code);

could help, but in my project this is not the case. I tried already various RAM-settings in the linker configuration file, but all without success. What can I do next?

Parents
  • I don't see any problem mixing the measured data in one characteristic. They are just an array of bytes. You can use the first byte to determine which type of data is in the array. Says first byte = 1 mean the next byte is motor speed. First byte = 2 means next byte is temperature. You then can also group them together , first byte = 2 means next byte is temperature. Third byte = 1 mean forth byte is motor speed, and so on. (the length of the sensor data is determined so you should be able to extract them from the array)

Reply
  • I don't see any problem mixing the measured data in one characteristic. They are just an array of bytes. You can use the first byte to determine which type of data is in the array. Says first byte = 1 mean the next byte is motor speed. First byte = 2 means next byte is temperature. You then can also group them together , first byte = 2 means next byte is temperature. Third byte = 1 mean forth byte is motor speed, and so on. (the length of the sensor data is determined so you should be able to extract them from the array)

Children
No Data
Related