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

How to increase number of characteristics

Hi,

Using S130 via mBed, I'd like to have a fairly large number of characteristics (say 30). Unfortunately this seems to be too many, as sd_ble_gatts_characteristic_add() returns an error after I get to maybe 18 characteristics (i.e. 17 works, 18 doesn't, it also depends on the specific characteristics). Also the mBed code has a hard limit of 20 characteristics (well actually the code is buggy and will overflow/crash if you go past 20). I have submitted a patch for that.

As I understand it, some data about the characteristics (I assume UUID, characteristic value buffer, CCCD, etc.) is stored in an internal table of the softdevice. Is there any way to increase the size of this table?

According to the documentation you can specify BLE_GATTS_VLOC_USER instead of BLE_GATTS_VLOC_STACK in custom_helper.cpp, but I don't really want to change the library code, and also it says it will only store the attribute value in user memory, which is only one or two bytes in my case. The UUID is much bigger, so I doubt I'll save much there.

Is there any solution?

Related