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.

  • 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. 

  • Hi,

    Jaydev Borkar said:
    Is there any other parameter that I need to change ?

    I can see that an error has been detected, but not what error. Please build the debug target (Select "Debug" in the dropdown menue in the upper left part of the screen when not in debug mode). If you also enable logging, you will get a log printed when there is an error. If not, inspect p_info etc. to see what error you got where. It will tell you which file, at which line you got which error code.

    Jaydev Borkar said:
    I want bond management service just to have read/write characteristic access. 

    I don't understand. Why do you want BMS when you are not using bonding? The whole purpose of BMS is to manage bonds, but there will not be any if you don't support bonding. 

  • I can see that an error has been detected, but not what error. Please build the debug target (Select "Debug" in the dropdown menue in the upper left part of the screen when not in debug mode). If you also enable logging, you will get a log printed when there is an error. If not, inspect p_info etc. to see what error you got where. It will tell you which file, at which line you got which error code.

    I enabled logging using PUTTY . I get error 7. NRF_ERROR_INVALID_PARAM. I have put in many log details in each of the functions .. Please check the below screenshot .

    I don't understand. Why do you want BMS when you are not using bonding? The whole purpose of BMS is to manage bonds, but there will not be any if you don't support bonding.

    BMS was used in our previous implementation just to have read and write characteristic access. We could have used any other service . But we ended up taking BMS .  So I wanted to replicate the same in new project . 

  • Hi,

    Jaydev Borkar said:

    I enabled logging using PUTTY . I get error 7. NRF_ERROR_INVALID_PARAM. I have put in many log details in each of the functions .. Please check the below screenshot .

    I see. The error code is typically returned from a function call and then detected by an APP_ERROR_CHECK(), which is on line 735 in your modified BMS example. Which function returns this error code? When you know the function and the error code you can start to check what would cause that function to return the specific error code. Often it will be quite obvious, but sometimes it requires a bit more digging.

Related