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 Alex

    A good place to start would be the ble_app_template example. I created one generic working service from there and used it to build multiple of my own services.

    Unfortunately you will not be able to move away from using .c and .h files to configure your services. If you look at figure 2 on page 7 of the softdevice specification, you will see that the setup of services and attributes is the responsibility of your app. Even though the Softdevice hosts the GAPP server, the configuration is up to the you. As far as adding your own service to the stack: This is not possible since the stack is a pre-compiled .hex file supplied by Nordic. You can simply send your setup and configuration at runtime to the stack to configure the GATT server.

    Hope this helps a bit

Reply
  • Hi Alex

    A good place to start would be the ble_app_template example. I created one generic working service from there and used it to build multiple of my own services.

    Unfortunately you will not be able to move away from using .c and .h files to configure your services. If you look at figure 2 on page 7 of the softdevice specification, you will see that the setup of services and attributes is the responsibility of your app. Even though the Softdevice hosts the GAPP server, the configuration is up to the you. As far as adding your own service to the stack: This is not possible since the stack is a pre-compiled .hex file supplied by Nordic. You can simply send your setup and configuration at runtime to the stack to configure the GATT server.

    Hope this helps a bit

Children
Related