Hi -
Is there a simple way to dynamically enable characteristics within a given service profile for a GATT server? For example, we are using the Fitness Machine Service (FTM). If our product knows at runtime that's it's configured as a rower, we want to only allow the Rower Data characteristic to be discoverable. If it's configured as a bike, we want to only allow the Indoor Bike Data characteristic to be discoverable.
I realize this can be accomplished by defining two different ftm_services (i.e. ftm_service_rower and ftm_service_bike) then using the bt_gatt_service_register() to select the appropriate implementation, however, this would quickly get resource intensive if there were numerous combinations which could occur at runtime.
Could all possible characteristics be defined then selectively disabled, preventing them from being discovered by a client?
Thanks,