nRF Connect can connect nRF52832 without passkey

I refer to https://github.com/alc6/nrf52-pc10040-multiperipheral-passkey/blob/master/main.c for implementing static passkey. But nRF Connect can connect nRF52832 without passkey.

 0> <info> app: Version 1.0.0
 0>
 0> <info> app: ========| flash info |========
 0> <info> app: erase unit:   4096 bytes
 0> <info> app: program unit: 4 bytes
 0> <info> app: end address: 0x7FFFF
 0> <info> app: ==============================
 0> <info> app_timer: RTC: initialized.
 0> <debug> app: NOR_DATA_PERIOD=819
 0>
 0> <debug> app: NOR_RECORD_PERIOD=8192
 0>
 0> <info> app: bsp_button_longkey_handler 0.
 0> <warning> app: Battery volage 128mV is too low
 0>
 0> <warning> app: Battery volage 8mV is too low
 0>
 0> <warning> app: Battery volage -8mV is too low
 0>
 0> <debug> app: Battery volage 3981mV
 0>
 0> <info> app: POWER_ON.
 0> <info> app: External devices initializing start
 0> <info> app: External devices initializing finish
 0> <info> app: bsp_button_longkey_handler 1.
 0> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 185 bytes on connection 0x0.
 0> <info> app: Connected.
 0> <debug> app: state=1
 0>
 0> <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).

Parents
  • Hi Snowuyl, 
    I'm not familiar with the code provided. 
    However, what I can see in your log and your screenshot is that the two devices just connected and not bonded. 
    Note that the passkey bonding process only occurs when the two device bond, not when connect. 

    Usually bonding happens automatically when the central try to read/write an encrypted characteristic. 

    You can test bonding by click the lock button in nRF Connect: 

    For passkey bonding, please try to test with our ble_app_gls example. 

Reply
  • Hi Snowuyl, 
    I'm not familiar with the code provided. 
    However, what I can see in your log and your screenshot is that the two devices just connected and not bonded. 
    Note that the passkey bonding process only occurs when the two device bond, not when connect. 

    Usually bonding happens automatically when the central try to read/write an encrypted characteristic. 

    You can test bonding by click the lock button in nRF Connect: 

    For passkey bonding, please try to test with our ble_app_gls example. 

Children
Related