This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do I create my own service on the BLE stack?

I've sifted through the examples given to me, and none of them seem to explain how to create your own service and add it to the stack. All of the services that are registered in the ble examples (nRF51 nordic pca10001) have their own header and c files.

Does anyone know how to create your own service, or at least know of any documentation that could point me in the right direction?

Thanks in advance!

Parents
  • Hi there,

    If by "create your own service" you mean simply adding a service to the ATT table so it's visible to all GATT clients connecting to your application, then it's simply a matter of using the provided APIs:

    sd_ble_gatts_service_add sd_ble_gatts_include_add sd_ble_gatts_characteristic_add sd_ble_gatts_descriptor_add

    All those APIs can be used both with 16-bit UUIDs (for SIG approved services) and 128-bit UUIDs (if you are designing your own proprietary services).

    Carles

Reply
  • Hi there,

    If by "create your own service" you mean simply adding a service to the ATT table so it's visible to all GATT clients connecting to your application, then it's simply a matter of using the provided APIs:

    sd_ble_gatts_service_add sd_ble_gatts_include_add sd_ble_gatts_characteristic_add sd_ble_gatts_descriptor_add

    All those APIs can be used both with 16-bit UUIDs (for SIG approved services) and 128-bit UUIDs (if you are designing your own proprietary services).

    Carles

Children
No Data
Related