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

Services initialisation and setup template?

Now that I have TWI and the BLE stack initialising, I'd like to create services. The Server (peripheral) sends out a few bytes to the client when a local trigger happens, and also needs to be able to accept bytes from the client whenever they are sent. Which is the best service template I should start out with? I'm looking at the heart rate service, but that seems too complicated to start out with. Any other pointers? Thanks!

EDIT: I'm a bit confused about "services". The general recommendation on the forum seems to be to use the battery services as a template, but Nordic people also strongly state that the API cannot change. How then is this considered a template? My understanding is that I have to create a new service, but I cannot find a resource that shows me how to do that. Pretty frustrating.

Parents
  • Hi sd,

    The battery service is a nice template example to start with that you can modify yourself and use the SDK. What is meant with that the API will not change, is that all functions called sd_ will have the same functionality over different versions of softdevices, as long as the major version number does not change.

    The SDK examples might change, and this is not part of the API that will not change (the Battery Service is part of the SDK and the other profiles/services as well) So the SDK can be modified as you see it fit.

    The only time the API changes is between major version numbers, and it is used to indicate that some API calls have changed, or that you need to handle additional events.

    for adding additional services, you can have a look at this previous answer: devzone.nordicsemi.com/.../how-do-i-create-my-own-service-on-the-ble-stack

Reply
  • Hi sd,

    The battery service is a nice template example to start with that you can modify yourself and use the SDK. What is meant with that the API will not change, is that all functions called sd_ will have the same functionality over different versions of softdevices, as long as the major version number does not change.

    The SDK examples might change, and this is not part of the API that will not change (the Battery Service is part of the SDK and the other profiles/services as well) So the SDK can be modified as you see it fit.

    The only time the API changes is between major version numbers, and it is used to indicate that some API calls have changed, or that you need to handle additional events.

    for adding additional services, you can have a look at this previous answer: devzone.nordicsemi.com/.../how-do-i-create-my-own-service-on-the-ble-stack

Children
No Data
Related