Delete a BlueNRG service
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-14 2:32 AM
Hello,
In order to have more than 6 services on my BlueNRG-MS device, I wanted to create a service that will add/remove the other ones.
At the beginning, it worked well, I could choose the services I wanted to activate but quickly, a problem appear. Indeed, it seems that the memory is not freed after deleting characteristics and services : after few adding/removing, I can't anymore add service because of a out of memory error.
I use the aci_gatt_del_char and aci_gatt_del_service functions to remove a service but is there something more to do ?
Thanks,
Julien
#bluenrg-ms #bleSolved! Go to Solution.
- Labels:
-
BLE
-
Low Power RF Solutions
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-21 12:39 AM
Dear Customer,
as Andrea has said before the functions aci_gatt_del_char() and aci_gatt_del_service() don't work properly because they don't reallocate properly the memory area used to store attribute values.
Therefore we suggest to not use them, instead to delete characteriscitc and service reboot the system (GATT init and
GAP init) and re-insert the correct services and characteristics.
Regards,
Graziella
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-19 1:22 AM
Hi Julien,
the current implementation of the
aci_gatt_del_char
and
aci_gatt_del_service
doesn't free memory.
Marchese.Graziella
can provide further info.‌Kind regards
Andrea
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-20 4:28 AM
Thank you for your response, you confirmed what I thought.
It is weird that this 2 functions doesn't free memory. Is there technical constraints that prevent to do it ?
Surely Graziella will give me more information.
Thanks,
Julien.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-21 12:39 AM
Dear Customer,
as Andrea has said before the functions aci_gatt_del_char() and aci_gatt_del_service() don't work properly because they don't reallocate properly the memory area used to store attribute values.
Therefore we suggest to not use them, instead to delete characteriscitc and service reboot the system (GATT init and
GAP init) and re-insert the correct services and characteristics.
Regards,
Graziella
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-05-19 5:54 AM
Does reinitialization of GATT and GAP keep current connection or disconnects it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-05-22 2:43 AM
No, after a re-initialization of GATT and GAP the connections will be lost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-05-22 2:49 PM
So it's not possible to change services without disconnecting? If so, how can I notify central device about new services and characteristics? Devices like mobile phones tend to cache information about services. Should I re-initialize GATT and GAP, wait for new connection and send an indication on Service Changed characteristic?
