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

Static Passkey nRF52840

Hi, 

I've followed the link https://devzone.nordicsemi.com/f/nordic-q-a/35675/how-to-use-static-passkey-for-a-no-display-no-output-peripheral

and added it to uart example. if connection via android settings , phone asked for passkey and process continue. 

however - when connecting fro nRFUART or nRFConnet, passkey is being asked. 

any idea why ? 

Parents
  • Hi Rani, 

    Which behavior were you expect the phone/nRFConnect should do ? To be asked or not to be asked? 

    Could you explain more clearly ? 

  • Sorry, it seems like a type, let me rephrase  

    When connecting via Android settings, the user is prompted with a request to enter passkey, and bonding succeed if passkey match 

    When connecting via nRFToolbox , user is NOT prompted to enter the passkey and the connection fails. 

    If the device is bonded ( via Android settings ) nRFToolbox can connect successfully . 

    On another note - how come there is a bug difference between ses_startup_nrf52840.s and gcc_startup_nrf52840.s . why is that ? 

  • Could you explain more on "connection fails" ? what exactly happened ? 
    Which firmware you have on the nRF52 ? Please be aware that when connecting using nRFToolbox, if the app doesn't try to read/write a characteristic that requires bonding the bonding process won't happen. You would need to do a read or write on a characteristic that require encryption/bonding. Please try again using nRFConnect app and try to read your characteristics. 

  • Hi,

    1.I am using SDK 15.2

    2.When connecting via nRFToolbox I am getting "rejected by <APP> " .

    ( connection is ok only if using Android setting to bond first ) 

    3. My application is UART service based, how can I define RX\TX to require bonding ? 

    Thanks, 

    Ran

  • We would need to look at how you modified your application firmware. 
    Could you take a screenshot when you see "rejected by <APP> "? 

    If you have a look at ble_nus_init() you can find that the characteristic was added as "SEC_OPEN". 

    If you change the read/write access of the characteristic to SEC_MITM, then when the characteristic is being read/write the phone will automatically request bonding. 

Reply
  • We would need to look at how you modified your application firmware. 
    Could you take a screenshot when you see "rejected by <APP> "? 

    If you have a look at ble_nus_init() you can find that the characteristic was added as "SEC_OPEN". 

    If you change the read/write access of the characteristic to SEC_MITM, then when the characteristic is being read/write the phone will automatically request bonding. 

Children
Related