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

Declaring a service structure in your application

Hi,

I am trying to develop the ble_app_template project into a custom ble application.

Where is says

/* YOUR_JOB: Declare all services structure you application is using
   static ble_xx_service_t          m_xxxs;
   static ble_yy_service_t          m_yys;
*/

What am I supposed to do? Am I supposed to create data structs with members representing properties of the service? Is there an example somewhere?

Thanks

Parents
  • Depends if you app needs to have a service, its perfectly possible to have an app which just advertises data but is not connectable..

    But if your app will have a connectable service (or services), the normal advice is to not start from the blank template if you are a beginner, but start by copying the exmple which is most similar to your product requirements

    If you are developing a custom service, the best example to use is the ble_app_uart as this uses the NUS service which is a custom service in the first place.

    Then just duplicate the NUS Service to make your own service and update the nble_app_uart template to use your own custom service(s)

  • Even if you don't want to use the UART service, it contains an "example" of how to write the service structure stuff, and the NUS is a good example of a simple service

Reply Children
No Data
Related