Skip to main content
alessandro morniroli
Associate III
April 20, 2022
Solved

BlueNRG2 - Bonded device list empty

  • April 20, 2022
  • 2 replies
  • 986 views

Hi all,

I'm using for evaluating purpose two NucleoL4 boards w/ X-NUCLEO-BNRG2A1:

  • the first one is running the standard firmware working w/ BlueNRG GUI 4.2.0 (v1.2e - DTM SPI v3.3.0). I setup this board as peripheral;
  • the seconds one is running NimBLE stack on the NucleoL4 and DTM SPI basic firmware compiled w/ LL_ONLY option (in order to use HCI commands).

Everything is working as expected: NimBLE is able to scan the peripheral / connect to it / execute pairing.

The problem is that after bonding succeed, if I check bonded devices list (on the board running the peripheral role), this is always empty, as shown in the image.

0693W00000LyV0pQAF.png 

As result, if I try to reconnect w/ LTK key just exchanged I got pairing error due to encryption failed.

0693W00000LyV3jQAF.pngAm I missing something? Similar question was already asked but no answer to the problem

https://community.st.com/s/question/0D50X00009XkWrdSAF/bonding-problem

Thanks for the support.

Alessandro Morniroli

    This topic has been closed for replies.
    Best answer by alessandro morniroli

    Resolved:

    In the NimBLE board, I was setting initiator dist key flag. Still have to understand the full meaning of it, but clearing it resolves the problem.

    The question can be closed.

    Alessandro Morniroli

    2 replies

    alessandro morniroli
    Associate III
    April 21, 2022

    Hi,

    an update about the problem: the function ""smp_add_pairing_record_to_bonding_database" is correctly called, as shown in the image, but when calling "get_bonded_devices" the list is always empty.

    0693W00000LyZPPQA3.png 

    Any suggestions?

    Alessandro Morniroli

    alessandro morniroli
    alessandro morniroliAuthorBest answer
    Associate III
    April 21, 2022

    Resolved:

    In the NimBLE board, I was setting initiator dist key flag. Still have to understand the full meaning of it, but clearing it resolves the problem.

    The question can be closed.

    Alessandro Morniroli