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

Integration of Bond Management Service in GATT Server Profile

Hi ,
I would want to establish a GATT Server application as well as integrate Bond Management Service from glucose example (ble_app_gls) in examples folder of SDK15.3.0_59ac345 into my GATT Server Application. How to integrate this service into GATT Server application. What are the dependencies which I need to take care of while integrating this service.

Parents Reply Children
  • Thanks a lot .  Can you help me with adding custom service ? I tried using the following github code .

    https://github.com/bjornspockeli/custom_ble_service_example 

    I am getting following error with respect to SDK15.3.0. Error Attached herewith

    I am getting errors using SDK15.0.0 too ..

    Can you help me out with this ?

  • Hi,

    The first error is because of nrf_power_clock.c no longer exist in SDK 15.3, and the example was made for an earlier SDK version. It has been split in two files, nrfx_clock.c and nrfx_power.c. But you can still refer to the example since you should anyway modify the BMS example and not the other way around (that has most of what you need), so there is no reason to use the segger project form the custom service example.

    Regarding the second error in SDK 15.0.0 I don't immediately understand why you get that. GPIO_COUNT is defined in nrf52832_peripherals.h, which is included in nrf_peripherals.h as long as NRF52832_XXAA or NRF52832_XXAB is defined in the project, and it is for the example project. This, in turn, is included in nrfx_common.h, which is included in the nrfx files that need it.

  • The first error is because of nrf_power_clock.c no longer exist in SDK 15.3, and the example was made for an earlier SDK version. It has been split in two files, nrfx_clock.c and nrfx_power.c. But you can still refer to the example since you should anyway modify the BMS example and not the other way around (that has most of what you need), so there is no reason to use the segger project form the custom service example.

    Thank you ! When I try to get connected to BMS service, the device gets connected for only few seconds. Then it asks for Bonding request as a pairing pop up, if I click on PAIR & CONNECT , it says pairing rejected by NORDIC_BMS . Then the connection gets disconnected . I actually dont need BONDING setup . NOT BONDED is the one which I am looking out for . Please advise .

  • Hi,

    You can set SEC_PARAM_BOND to 0 in the main.c of the BMS example (in that case there will still be pairing, but no bonding). However, it is a bit strange... How can it make sense to include the BMS if you don't want to use bonding?

    Update: it just came to me that you did not intend to use BMS, I just forget every time I read the title of this case Slight smile  Obviously in that case you should start with the GLS example (if you are sure GLS is what you need?) instead of the BMS example. This also includes DIS, so the earlier posts are still valid. And you can disable bonding here by setting SEC_PARAM_BOND to 0, as mentionned before.

    Note that the GLS characteristics require security, so it will not work without being paired. Do you intend to remove pairing as well? If so, you can do that (stript out all peer manager related code), but you also have to update the security modes for the characteristics. In practice, replace all instances of SEC_JUST_WORKS with SEC_OPEN in the main.c of the example.

  • You can set SEC_PARAM_BOND to 0 in the main.c of the BMS example (in that case there will still be pairing, but no bonding)

    I am getting an error after doing this ! The code gets redirected to NRF_BREAKPOINT_COND .

    Is there any other parameter that I need to change ?

    I want bond management service just to have read/write characteristic access. 

Related