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
  • Example code for passkey 123456.

    #define STATIC_PASSKEY          {0x31, 0x32, 0x33, 0x34, 0x35, 0x36}
    
    ble_opt_t      opt;
    static uint8_t config_passkey[BLE_GAP_PASSKEY_LEN]  = STATIC_PASSKEY;
    
    opt.gap_opt.passkey.p_passkey = m_config_passkey;
    
    err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &opt);
    
Reply
  • Example code for passkey 123456.

    #define STATIC_PASSKEY          {0x31, 0x32, 0x33, 0x34, 0x35, 0x36}
    
    ble_opt_t      opt;
    static uint8_t config_passkey[BLE_GAP_PASSKEY_LEN]  = STATIC_PASSKEY;
    
    opt.gap_opt.passkey.p_passkey = m_config_passkey;
    
    err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &opt);
    
Children
No Data
Related