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

bonding issue

i was trying to implement bonding in ble_app_hrs example(SDK V6.1.0 and soft device v7.0.0) i have given params

#define SEC_PARAM_TIMEOUT                    30                                   
#define SEC_PARAM_BOND                         1                                          
#define SEC_PARAM_MITM                          1                                      
#define SEC_PARAM_IO_CAPABILITIES           BLE_GAP_IO_CAPS_DISPLAY_YESNO       
#define SEC_PARAM_OOB                            0                                          
#define SEC_PARAM_MIN_KEY_SIZE              7                                    
#define SEC_PARAM_MAX_KEY_SIZE             16   

when i tried to bond in master control panel it asks for 6 digit number with any number it shows bonded:true.... but could not get connected.

  1. i have given io_capabilities as BLE_GAP_IO_CAPS_DISPLAY_YESNO , then why it asks for 6 digit number rather than yes/no.
  2. why device get bonded for every number. 3.i tried in debug mode also... it shows an error .. error code 132.. what it means
Parents
  • Hi Sruthiraj,

    What is the IO Capability of your Master Control Panel? If you have not changed it, then it will be the default 'Keyboard And Display'. So you will be in a situation where the initiator (Master) has a 'Keyboard And Display' and the responder (Slave) has 'DisplayYesNo'. In this case, as per spec, the responder will have to display and the initiator will have to input. And this is probably what is happening for you.

    There are two things you can do now.

    1 . On the slave side, check if you are getting a BLE_GAP_EVT_PASSKEY_DISPLAY event. When you do, you will have to get the passkey contained in p_ble_evt->evt.gap_evt.params.passkey_display.passkey and enter it when the Master Control Panel prompts you for the key.

    OR

    2 . On the Master Control Panel, change the IO Capabilities to 'No Keyboard or display'. (You can do it in File -> Options -> Security) and then do 'Bond' from Master Control Panel. If Master Control Panel log says 'Bond already exists with the device', then please restart Master Control Panel, and try again (you will need to set the IO capabilities again). Please note that in this case, the generated key will be 'unauthenticated no MITM protection' key. If you want MITM, then please use the 1st approach.

    See Table 2.5 (Mapping of IO Capabilities to STK Generation Method) of Bluetooth Specification Vol 3, Part H Section 2.3.5.1 for more information.

    Cheers, Balaji

Reply
  • Hi Sruthiraj,

    What is the IO Capability of your Master Control Panel? If you have not changed it, then it will be the default 'Keyboard And Display'. So you will be in a situation where the initiator (Master) has a 'Keyboard And Display' and the responder (Slave) has 'DisplayYesNo'. In this case, as per spec, the responder will have to display and the initiator will have to input. And this is probably what is happening for you.

    There are two things you can do now.

    1 . On the slave side, check if you are getting a BLE_GAP_EVT_PASSKEY_DISPLAY event. When you do, you will have to get the passkey contained in p_ble_evt->evt.gap_evt.params.passkey_display.passkey and enter it when the Master Control Panel prompts you for the key.

    OR

    2 . On the Master Control Panel, change the IO Capabilities to 'No Keyboard or display'. (You can do it in File -> Options -> Security) and then do 'Bond' from Master Control Panel. If Master Control Panel log says 'Bond already exists with the device', then please restart Master Control Panel, and try again (you will need to set the IO capabilities again). Please note that in this case, the generated key will be 'unauthenticated no MITM protection' key. If you want MITM, then please use the 1st approach.

    See Table 2.5 (Mapping of IO Capabilities to STK Generation Method) of Bluetooth Specification Vol 3, Part H Section 2.3.5.1 for more information.

    Cheers, Balaji

Children
No Data
Related