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

passkey. work with any passkey. SDK9 nRF51

I use this code and static passkey

void ble_gap_params_init(const char * device_name, uint8_t * passkey, int8_t tx_power)
{	
	uint32_t err_code;
	ble_opt_t static_pin_option;
    static_pin_option.gap_opt.passkey.p_passkey = passkey;        
	err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &static_pin_option);
	APP_ERROR_CHECK(err_code);
...

to this function I transfer pointer to array of my passkey. for ex. 123456

But I have

register_param.sec_param.io_caps = BLE_GAP_IO_CAPS_NONE

in function

static void device_manager_init(bool erase_bonds)

I see that I can connect to my device with any passkey. Not only with 123456 ??? I suppose, that this passkey needs for settings in function

static void device_manager_init(bool erase_bonds)
register_param.sec_param.io_caps = BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY

Is it correct?

And I can connect to my device with settings

register_param.sec_param.io_caps = BLE_GAP_IO_CAPS_NONE

with any passkey?

Parents Reply Children
No Data
Related