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

Establishing a connection with a bonded phone

I have the following problem:

  • 1 to 3 phones are bonded with an nRF52832
  • These phones are on the whitelist of nRF52832
  • nRF52832 goes into Power Off Mode
  • nRF52832 is woken by a sensor and wants to send this current value to a cell phone that is on the whitelist.

I only need to establish a connection after waking up so that I can send the data
The only thing missing is the connection after waking up so I can send the data. The other functions are implemented.

Is there an example for the connection establishment? Probably I have to read the connection data of the glued devices from the whitelist?

Thank you in advance

Best regards,
Werner Loser

Parents Reply
  • Hello,

    sorry if I ask the questions differently again, but the answer does not help me.

    Question 1

    On the peripheral side the connection with Advertising works if the whitelist is configured ( init.config.ble_adv_whitelist_enabled = true; ).

    But on the central side I did not understand how can I start a scan with only one or more whitelist entriy/entries.

    Question 2

    Is it correct that I need IRK in my case?

    Question 3

    The whitelist is completely managed by the peer manager - is that correct?

    Question 4

    Again, are there one or more examples or which functions with which parameters do I have to call for this?

    Thank you in advance

    Best regards,
    Werner Loser

Children
  • 1. Sorry, I did not realize you where also asking about scanning. Did you already read the documentation her: Whitelist?

    2. The IRK will normally be exchanged at the end of the pairing process. If the peer devices uses a resolvable private address you need the IRK.

    3. Yes, it's stored when exchanged. But the application has to tell the SD to use the whitelist. As mentioned in my previous reply.

    4. Did you already look at the hids_keyboard example? Main.c: line 353. For scanning look atthe function nrf_ble_scan_start in nrf_ble_scan.c. This takes a struct called: nrf_ble_scan_t -> ble_gap_scan_params_t  set the filter policy to whitelist.

Related