diff --git a/example/a2dp_sink_demo.c b/example/a2dp_sink_demo.c index a5027a32f..27b030041 100644 --- a/example/a2dp_sink_demo.c +++ b/example/a2dp_sink_demo.c @@ -340,16 +340,18 @@ static int setup_demo(void){ // - Allow to show up in Bluetooth inquiry gap_discoverable_control(1); - // - Set Class of Device - Service Class: Audio, Major Device Class: Audio, Minor: Loudspeaker - gap_set_class_of_device(0x200414); + // - Set Class of Device + gap_set_class_of_device(0x7c0414); - // - Allow for role switch in general and sniff mode - gap_set_default_link_policy_settings( LM_LINK_POLICY_ENABLE_ROLE_SWITCH | LM_LINK_POLICY_ENABLE_SNIFF_MODE ); + // - Allow all modes + gap_set_default_link_policy_settings( 0x000f ); // - Allow for role switch on outgoing connections // - This allows A2DP Source, e.g. smartphone, to become master when we re-connect to it. gap_set_allow_role_switch(true); + // request to become master on incoming connections + hci_set_master_slave_policy(0); // Register for HCI events hci_event_callback_registration.callback = &hci_packet_handler;