Hi,
I am working with CC2564C and a STM32F4 microcontroller. I am using the Bluetopia stack offered by Texas.
My goal is switch between A2DP and HFP profiles to listen music and manage calls.
My first question is related to the automatic connection procedure. I used the "HFPDemo_HF" example to execute some tests. So, after the initialization procedure, I used the "HFRE_Open_HandsFree_Server_Port" and "HFRE_Register_HandsFree_SDP_Record" routines to open the server. After the pair procedure, I received all events that are expected because the mobile phone starts the connection. But my goal is execute a automatic connection after ther power cycle. To this, I used the "HFRE_Open_Remote_Audio_Gateway_Port" routine, however I received only the "etHFRE_Open_Port_Confirmation" indication and result was different to a Iphone (HFRE_OPEN_PORT_STATUS_SUCCESS) and an Android (HFRE_OPEN_PORT_STATUS_CONNECTION_REFUSED). So, what is the correct procedure to start the connection from my module?
My second question is related to this switch procedure. I am using the "AUD_Open_Remote_Stream" and "AUD_Close_Stream" to open and close the connection with the mobile phone. If I use the "HFRE_Open_HandsFree_Server_Port" and "HFRE_Register_HandsFree_SDP_Record" routines to open the server after the stack initialization and the "AUD_Open_Remote_Stream" to open the stream, I can listen music through A2DP and receive a call indication in the "HFRE_Event_Callback". My next step was close the stream to set up the audio connection of the hands free ("ManageAudioConnection" of the "HFPDemo_HF" example). However, again I had a different behavior in a Iphone and an Andriod. After try close the stream with "AUD_Close_Stream", the Iphone returned the "etAUD_Signalling_Channel_Close_Indication", but this did not happen with the Android. So, what is the correct procedure to switch between A2DP and HFP?
I will appreciate some help.
Best regards,
Vinícius.