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

changing ble_gatts_attr_t max length dynamically

Hi All

is it possible to change the max length of ble_gatts_attr_t dynamically.

Thanks

Parents
  • No it's not - you have to set the max length you are ever going to use at the start. If the characteristic is softdevice-managed then it will reserve that amount of storage, if it's managed by you, you manage the memory however you can't change the location of the characteristic after you register it (I believe) so you still really have to allocate yourself enough memory for the max characteristic size, or play some complicated memory games.

Reply
  • No it's not - you have to set the max length you are ever going to use at the start. If the characteristic is softdevice-managed then it will reserve that amount of storage, if it's managed by you, you manage the memory however you can't change the location of the characteristic after you register it (I believe) so you still really have to allocate yourself enough memory for the max characteristic size, or play some complicated memory games.

Children
No Data
Related