Hello,
At the moment we are at a point to decide, if we want to expose our loads of data in “parallel” over BLE characteristics or if we should better implement a serial BLE service, which allows to transmit the desired data via serial packets. For App development, other departments wished to get the desired data over separate characteristics. Knowing that more RAM overhead will cause more current consumption in standby, I started investigating in this.
To find out how much RAM the system needs as overhead for one characteristic value of 16 bytes, I wanted to implement some characteristics and measure the amount of RAM needed by the application (compiler shows amount of used RAM). As basis project, I use https://github.com/bjornspockeli/custom_ble_service_example
By doing so, I recognized that the Softdevice creates the parameters/metadata and attribute value in the system stack which is shared by application and Softdevice. But in this area, I cannot see how much RAM is used.
So I tried to set the NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE to 4, 8, 16, … to get the system messaging me NRF_ERROR_NO_MEM and iterating the TAB_SIZE until the error message disapears to find the amount of used RAM memory. But I do never get any error message and the system works – all services and characteristics are visible. I have a 16-byte attribute value. Also stored in STACK RAM. So 16 bytes as TAB_SIZE shall be too small at all.
Q1: Why does it work?
Q2: What can I do to set the NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE to another value?
Thank you,
Regards
Andre