This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564MODA: A3DP sink demo: cannot connect to iPhone automatically

Part Number: CC2564MODA
Other Parts Discussed in Thread: CC3200AUDBOOST, CC256XMS432BTBLESW

Hi,

I am testing A3DP sink demo with below HW/SW configuration.

MSP-EXP432P401R
BOOST-CC2564MODA
CC3200AUDBOOST

CC256XMS432BTBLESW(v.4.0.3.0)

Smartphone(iPhone) is used as a source.

I referred below documents for setup.
http://www.ti.com/lit/ug/swru453b/swru453b.pdf
http://processors.wiki.ti.com/index.php/CC256x_TI_Bluetooth_Stack_AssistedA2DPSinkDemo_App

The demo worked fine when CC2564B was connected to the iPhone at the first time.
But once the device is disconnected (by power cycle, reset, etc.), it is never connected to the iPhone again.
The only solution I found is removing the device (named as “A3DPDemo_SNK”) from the device list inside iPhone.
Then I can connect it again with iPhone as same as the 1st time.

Here are two UART logs:
- “1st connection.txt” is the log at the 1st time. The device is connected properly and I can play the audio from iPhone.

1st_connection.txt
OpenStack().
Bluetooth Stack ID: 1
Device Chipset: 4.1
BTPS Version  : 4.0.3.0
Project Type  : 6
FW Version    : 7.26
App Name      : A3DPDemo_SNK
App Version   : 0.1
BD_ADDR: 0xCC78AB67F02C
A3DP endpoint opened successfully.
Class of Device: 0x040424.
Supported formats:
   Frequency: 44100, Channels: 2, Flags: 0
   Frequency: 48000, Channels: 2, Flags: 0
   Frequency: 48000, Channels: 1, Flags: 0
   Frequency: 44100, Channels: 1, Flags: 0

******************************************************************
* Command Options: Inquiry, DisplayInquiryList, Pair,            *
*                  EndPairing, PINCodeResponse, PassKeyResponse, *
*                  UserConfirmationResponse,                     *
*                  SetDiscoverabilityMode, SetConnectabilityMode,*
*                  SetPairabilityMode, SetBaudRate               *
*                  ChangeSimplePairingParameters,                *
*                  GetLocalAddress, GetLocalName, SetLocalName,  *
*                  GetClassOfDevice, SetClassOfDevice,           *
*                  GetRemoteName, OpenSink, CloseSink,           *
*                  RemotePlay, RemotePause, RemoteNext,          *
*                  RemotePrev, Help                              *
******************************************************************


A3DP+SNK>
atIOCapabilityResponse: 0xFC183C12E722
Capabilities: Display Yes/No

A3DP+SNK>
atIOCapabilityRequest: 0xFC183C12E722

Auth success.

A3DP+SNK>
atUserConfirmationRequest: 0xFC183C12E722

Auto Accepting:

                GAP_Authentication_Response success.

A3DP+SNK>Un-handled Auth. Event.

A3DP+SNK>
atLinkKeyCreation: 0xFC183C12E722
Link Key Stored.

A3DP+SNK>
etAUD_Signalling_Channel_Open_Indication
BD_ADDR:  0xFC183C12E722

A3DP+SNK>
etAUD_Remote_Control_Open_Indication
BD_ADDR:     0xFC183C12E722

A3DP+SNK>
etAUD_Stream_Open_Indication
BD_ADDR:     0xFC183C12E722
MediaMTU:    1004
StreamType:  SNK
Status: VS_A3DP_Sink_Open_Stream(): 0

 Send HCI Flow Spec for guaranteed ACL connection

 Send HCI VS DDIP for ACL priority over scans
Status: Enable the audio codec.

A3DP+SNK>

- “after_powercycle.txt” is the case when the device is power-off then power-up again.
In this case, nothing happens. The log stops at line#34.
Then I tried to connect from iPhone side and line#35 and later are displayed.
But the device does not connect to iPhone.
after_powercycle.txt
OpenStack().
Bluetooth Stack ID: 1
Device Chipset: 4.1
BTPS Version  : 4.0.3.0
Project Type  : 6
FW Version    : 7.26
App Name      : A3DPDemo_SNK
App Version   : 0.1
BD_ADDR: 0xCC78AB67F02C
A3DP endpoint opened successfully.
Class of Device: 0x040424.
Supported formats:
   Frequency: 44100, Channels: 2, Flags: 0
   Frequency: 48000, Channels: 2, Flags: 0
   Frequency: 48000, Channels: 1, Flags: 0
   Frequency: 44100, Channels: 1, Flags: 0

******************************************************************
* Command Options: Inquiry, DisplayInquiryList, Pair,            *
*                  EndPairing, PINCodeResponse, PassKeyResponse, *
*                  UserConfirmationResponse,                     *
*                  SetDiscoverabilityMode, SetConnectabilityMode,*
*                  SetPairabilityMode, SetBaudRate               *
*                  ChangeSimplePairingParameters,                *
*                  GetLocalAddress, GetLocalName, SetLocalName,  *
*                  GetClassOfDevice, SetClassOfDevice,           *
*                  GetRemoteName, OpenSink, CloseSink,           *
*                  RemotePlay, RemotePause, RemoteNext,          *
*                  RemotePrev, Help                              *
******************************************************************


A3DP+SNK>
atLinkKeyRequest: 0xFC183C12E722

GAP_Authentication_Response success.

A3DP+SNK>
atLinkKeyRequest: 0xFC183C12E722

GAP_Authentication_Response success.

A3DP+SNK>

Could you tell me what is needed to enable the device automatically connect to iPhone for 2nd time or later?

Thanks and regards,
Koichiro Tashiro

  • Koichiro-san,

    Koichiro Tashiro said:
    The demo worked fine when CC2564B was connected to the iPhone at the first time.
    But once the device is disconnected (by power cycle, reset, etc.), it is never connected to the iPhone again.
    The only solution I found is removing the device (named as “A3DPDemo_SNK”) from the device list inside iPhone.
    Then I can connect it again with iPhone as same as the 1st time.

    This is mainly happening because the A3DP demo does not store the Link Key and BD_ADDR of the paired device in flash. So, when the A3DP demo is power-cycled, it effectively "forgets" the iPhone while iPhone still thinks the A3DP demo is paired. When initiating the connection from the iPhone again, the A3DP demo replies with Link_Key_Request_Negative_Reply and the iPhone does not initiate the pairing again without forgetting the A3DP demo from the iPhone side first.

    As a demo, the way around this is to forget the A3DP demo from the iPhone every time after disconnection/power off.

    For a commercial product, the proper way to implement the solution is to store the paired devices' BD_ADDR and Link key in the flash / non-volatile memory on the host and reloading this information when the product initializes after a power-cycle.

    Best regards,

    Vihang

  • Vihang,

    I see. Thanks!

    Regards,
    Koichiro Tashiro