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

Add a service and characteristics to advertising data

Is it possible to include an existing service and characteristics on a peripheral to its advertising packets?

I would like to add a custom BLE service to my peripheral to be used as a status indicator. A central device would need to be able to read this as part of advertising data in order to decide whether or not it should connect, and then be able to write to it in order to change the status of the device. Currently I'm ble_advdata_set() in order to advertise service that I build on the fly, but I'm not sure if it's possible to use a previously added service for this and have it be discoverable as well.

Related