Skip to content

Commit bc41ef1

Browse files
koffescarlescufi
authored andcommitted
applications: nrf5340_audio: Added handling as scan delegator
Removed scanning code on BTN5 press Added handling of pairing complete event, which is relevant for scan delegators as they depend on a broadcast assistant to transfer the broadcast source info. OCT-3668 Signed-off-by: Kristoffer Skøien <kristoffer.skoien@nordicsemi.no>
1 parent 07a371d commit bc41ef1

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

  • applications/nrf5340_audio/broadcast_sink

applications/nrf5340_audio/broadcast_sink/main.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ static void button_msg_sub_thread(void)
144144
break;
145145
}
146146

147+
if (IS_ENABLED(CONFIG_BT_AUDIO_SCAN_DELEGATOR)) {
148+
/* If this device is a scan delegator, we depend on a broadcast
149+
* assistant to transfer the broadcast source info.
150+
* It should not scan by itself.
151+
*/
152+
break;
153+
}
154+
147155
ret = broadcast_sink_disable();
148156
if (ret) {
149157
LOG_ERR("Failed to disable the broadcast sink: %d", ret);
@@ -339,6 +347,11 @@ static void bt_mgmt_msg_sub_thread(void)
339347
LOG_DBG("Security changed");
340348
break;
341349

350+
case BT_MGMT_PAIRING_COMPLETE:
351+
/* If this device is a scan delegator */
352+
LOG_DBG("Pairing complete");
353+
break;
354+
342355
case BT_MGMT_PA_SYNCED:
343356
LOG_DBG("PA synced");
344357

0 commit comments

Comments
 (0)