BLE connection processing with nRF5340 Audio

I have a few questions about the sample source of nRF5340 Audio.

1. Where does the connection processing between the Gateway and Headset take place?

2. Where is the BLE bonding information set?

3. Is it possible to rewrite the bonding information?

Thank you in advance.

Parents
  • Hi

    1. Where does the connection processing between the Gateway and Headset take place?

    The handling of advertising occurs in bt_mgmt_adv.c, while the connection handling can be found in bt_mgmt.c. 

    2. Where is the BLE bonding information set?

    BLE bonding is handled by the Bluetooth host, similar to other (no audio) Bluetooth applications. 

    The exact storage of keys is handled by the bt_keys_store(..) function, which is called from smp.c here. The function itself is implemented in keys.c here, and uses the bt_settings module for the actual storage of data in flash. 

    3. Is it possible to rewrite the bonding information?

    Yes, this is possible. The bt_mgmt_bonding_clear() function in bt_mgmt.h/c allows you to delete the existing bonding data, in order to make room for new bonds. 

    Best regards
    Torbjørn

  • Is the connection process performed when bt_mgmt_init() is executed?

    Which function in bt_mgmt.c performs the connection process?

  • Hi

    Which particular part of the connection process are you referring to? 

    As a peripheral device you don't control when the connection process starts. Essentially what you do is to start some type of connectable advertising, and wait for a scanner nearby to send a connection request, which will start the connection process. Once the connection is established it will trigger the connected_cb(..) function in bt_mgmt.c, which controls what happens next.

    The low level handling of establishing and maintaining a connection is handled by the Bluetooth link layer directly, and as such is not visible in the application code. 

    Best regards
    Torbjørn

  • Which part of the source is responsible for sending the connection request?

Reply Children
No Data
Related