Hi All, I have a generic question about the nimBLE capabilities. I'm trying to build a BLE GATT server which has a set of services (say services A and B). However, these services need to be registered dynamically. What I mean is that when I boot up I won't know which services I need to register with the GATT server. I'd like to boot up, probe around a bit, and then make a decision on whether I want to register and then advertise either service A only, service B only, or both.
However I'm not quite sure I see a way to do that. It seems like services need to be added and registered before the os runs. Here's what the comment says in ble_gatts.c /** * Queues a set of service definitions for registration. All services queued * in this manner get registered when ble_hs_init() is called. * * @param svcs An array of service definitions to queue for * registration. This array must be * terminated with an entry whose 'type' * equals 0. * * @return 0 on success; * BLE_HS_ENOMEM on heap exhaustion. */ Is what I'm expecting to do not possible? Thanks, Pritish
