Bonding information with bootloader

Hello all,

I have this problem:
when I add support for OTA my bonding information are canceled after power on. Without ota all is perfect.

Example:
- Turn on the device;
- pair it with phone;
- use the device (everything is good);
- turn it off;
- I turn the device on again, and it is no longer paired with the phone. I have to delete the pairing from the phone's Bluetooth list and pair them again. I have to do this procedure every time I turn off the device. Why is this happening? Is there a solution to avoid this?

Thanks in advance.

Best regards

Parents
  • Hi, 

    Do you use the Bluetooth setting for key storing in your application? Please take a look at this DevAcademy course Lesson 5 – Security in Bluetooth LE communication/Exercise 2.  

    Regards,
    Amanda H.

  • Hello Amanda,

    Thanks al lot. I was using setting for key storing.

    Now I have fixed it.
    Thanks again.

  • Hello Amanda,

    sorry to border you agan but i have this problem.
    I do not receive "disconnected" callback after bonding with Android.
    If I restart the device, everything is ok. I have this problem only after bonding and with Android.

    If I use iOS everything is ok.

    I have used the peripheral_lbs example, i have changed only:
    BT_GATT_PERM_WRITE to BT_GATT_PERM_WRITE_ENCRYPT (in lbs.h file) just to have the pairing when i'll go to write on that characteristic.

    Can you help me?

    Bluetooth initialized<CR><LF>
    I: Identity: E4:B3:9D:F1:7E:1F (random)<CR><LF>
    I: HCI: version 5.4 (0x0d) revision 0x118f, manufacturer 0x0059<CR><LF>
    I: LMP: version 5.4 (0x0d) subver 0x118f<CR><LF>
    Advertising successfully started<CR><LF>
    Connected<CR><LF>
    Passkey for 7B:AD:BF:A4:E9:EB (random): 588282<CR><LF>
    Security changed: 7B:AD:BF:A4:E9:EB (random) level 4<CR><LF>
    Pairing completed: 94:45:60:2A:DD:EA (public), bonded: 1<CR><LF>
    
    I have closed lightblue app. But I do not have received "disconnected" collaback
    
    
    Restart the device:
    <NUL>*** Booting nRF Connect SDK 3758bcbfa5cd ***<CR><LF>
    Starting Bluetooth Peripheral LBS example<CR><LF>
    I: 8 Sectors of 4096 bytes<CR><LF>
    I: alloc wra: 0, f88<CR><LF>
    I: data wra: 0, c0<CR><LF>
    I: SoftDevice Controller build revision: <CR><LF>
    I: 36 f0 e5 0e 87 68 48 fb |6....hH.<CR><LF>
    I: 02 fd 9f 82 cc 32 e5 7b |.....2.{<CR><LF>
    I: 91 b1 5c ed             |..\.    <CR><LF>
    I: HW Platform: Nordic Semiconductor (0x0002)<CR><LF>
    I: HW Variant: nRF52x (0x0002)<CR><LF>
    I: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870<CR><LF>
    I: No ID address. App must call settings_load()<CR><LF>
    Bluetooth initialized<CR><LF>
    I: Identity: E4:B3:9D:F1:7E:1F (random)<CR><LF>
    I: HCI: version 5.4 (0x0d) revision 0x118f, manufacturer 0x0059<CR><LF>
    I: LMP: version 5.4 (0x0d) subver 0x118f<CR><LF>
    Advertising successfully started<CR><LF>
    Connected<CR><LF>
    Security changed: 94:45:60:2A:DD:EA (public) level 4<CR><LF>
    Disconnected (reason 19)<CR><LF>
    
    Everything is working good

  • Hi, 

    What NCS version are you using? Could you test with the latest version NCS, v2.9.0? 

    Epasta said:
    I have closed lightblue app. But I do not have received "disconnected" collaback

    How did you close the app? Did you delete the app job? Maybe your app is still running in the background.

    Could you test with nRF Connect for Mobile app?

    I cannot reproduce the issue. I can get the disconnection if I delete the nRF Connect for Mobile app job on the Android phone (Pixel 9). 

    Regards,
    Amanda H.

  • Hello Amanda,

    I have tried with NRF Connect APP and i have the same problem.
    In the next days, if I can, I will try with V2.9.0 and I will let you know.

    No, my app is not working in background I tried also to delete the app after the disconnection and I don't receive the disconnection message.

    The strange things is that instead using OPPO RENO 6 (phone that have the problem written above) I'll use Pixel 4a I do not have the problem. And android version is the same 13.

    I really can not undertstad what happen with OPPO RENO 6.

    Thanks

  • I would suggest you test with other Android phones. Maybe the issue is in OPPO RENO 6. 

Reply Children
No Data
Related