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: Realizing Autoconnect with BlueZ

Part Number: CC2564MODA


Hello there, 

We are currently working with a CC2564MODA in our Linux Embedded Device, our System is based on Kernel 4.14.

The CC2564MODA is connected to our host controller via UART. The communication is based on the HCI-Interface and BlueZ 5.62.
Managing telephony (HFP-profile) and phonebook (PBAB-profile) we use ofono and obex.

The current topics we are working towards are: 

Automatically reconnect (auto-connect)

  • Requirement: We want to be able to auto-connect with an already paired device (Smartphones), without interaction of the user on the device. After a reboot our CC2564MODA should know the paired device and connects to it 

  • Problem:  The CC2564MODA does not store any key after pairing a device and BlueZ does not provide any solution for saving paired devices after a reboot. Do you know any mechanism to save a paired Device after a reboot, which works with CC2564MODA and BlueZ in combination?

 A3DP 

  • Requirements: We want to do Audiostreaming with A2DP-Profile. To route the audio streams directly, via I2S to an external audio codec we use the assisted mode. On regular Linux Devices the A2DP-Connection would be solved by bluealsa or PulseAudio in blueZ. (creating SBC, etc.) 

  • You may have any knowledge or experience how this case is solvable in the CC2564MODA environment?

Thank you a lot in advance. 

  • Hi Giuseppe,

    I'll follow up here tomorrow.

    Thanks,
    Jacob

  • Hi Giuseppe,

    TI officially supports the Bluetopia Bluetooth stack instead of BlueZ. I have limited knowledge of BlueZ, but I can support CC2564MODA-related questions.

    Problem:  The CC2564MODA does not store any key after pairing a device and BlueZ does not provide any solution for saving paired devices after a reboot. Do you know any mechanism to save a paired Device after a reboot, which works with CC2564MODA and BlueZ in combination?

    Storing the link key for pairing is Bluetooth stack responsibility. If BlueZ does not handle this, maybe you could try writing to the /var/lib/bluetooth directory.  

    Requirements: We want to do Audiostreaming with A2DP-Profile. To route the audio streams directly, via I2S to an external audio codec we use the assisted mode. On regular Linux Devices the A2DP-Connection would be solved by bluealsa or PulseAudio in blueZ. (creating SBC, etc.) 

    Are you unable to run Linux commands on your Linux embedded device? The CC2564MODA is just a Bluetooth transceiver; it is up to the Host to handle audio codecs and audio streaming. You review I2S configurations for A2DP for the CC2564MODA in the datasheet.

    Thanks,
    Jacob

  • Hi Jacob,

    thank you for your reply.

    I'll follow up on monday.

    Greetings

    Giuseppe

  • Hello Jacob, 

    First of all thanks for your answer. You gave us the last bit to solve the missing link key, was all about an non persistent partition. 

    For the A3DP Question we're maybe talking past each other. We want to use the “Assisted A2DP Sink Architecture”, as mentioned in the picture below (Datasheet Chapter 5.9.2.1 Assisted A2DP Sink). 

     

    In our understanding we don't have to care about the layers L-L2CAP, L-AVDTP and SBC decoding because they are taken care of by the CC2564MODA. (Datasheet Chapter 5.9.2.1 Assisted A2DP Sink: ” The assisted A2DP takes advantage of this modularity to handle the data packet logic transport in the module by implementing a light L2CAP layer (L-L2CAP) and light AVDTP layer (L-AVDTP) to defragment the packets. Then the assisted A2DP performs the SBC decoding on-chip to deliver raw audio data through the module PCM–I2S interface.”)  
    Did we understand that correctly? 

    If so, our question is how to tell our Bluetooth stack to connect A2DP, since the BlueZ stack so far always assumes to find an architecture like the one in Figure 5-10. (A2DP Sink Architecture) on the left.

    Greetings and thanks

    Giuseppe

  • Hi Giuseppe,

    Glad to hear that you resolved your link key issue. 

    Yes, you are right: In the Assisted A2DP Sink scenario, the CC2564MODA handles the data packet logic transport in the module by implementing a light L2CAP layer (L-L2CAP) and light AVDTP layer (L-AVDTP) to defragment the packets and then performs SBC decoding.

    In the unassisted A2DP Sink architecture on the left, audio will be routed through UART over HCI. Are you able to connect to the device using hciattach? I'm not sure how you establish an audio connection using BlueZ, but you may be able to reach out here. To be clear, the Unassisted A2DP Sink Architecture does not contain the L-L2CAP, L-AVDTP, and SBC decoding mentioned earlier. 

    Thanks,
    Jacob

  • Hi Jacob, 

    Thanks for your answer. 

    In the unassisted A2DP sink we can fully connect all profiles (A2DP, hfp etc.) with the device, but that is not our goal. Because we don’t want to route the audio via hci. 

    While using the assisted A2DP scenario the connection can be established to the device, but the “audio” profiles (A2DP & AVRCP) will not be connected. 

    Using Assisted A2DP Mode and giving the host the information that the A2DP connection doesn’t require a SBC sink. 
    How does bluetopia handle this situation? 
    On my perception this issue is solved via hci commands, you may have knowledge if this? 

    Thanks,
    Giuseppe

  • Hi Giuseppe,

    Using Assisted A2DP Mode and giving the host the information that the A2DP connection doesn’t require a SBC sink. 
    How does bluetopia handle this situation? 

    I'm not sure this is possible in Bluetopia, because I think our device expects a codec like SBC to use the PCM interface. However, you can refer to the HCI_VS_A3DP_Codec_Configuration (0xFD8E) and HCI_VS_Write_CODEC_Config (0xFD06) in the attached file.

    Thanks,

    Jacob

  • Hi Jacob,

    thanks for your answer.
    Unfortunately there is no file attached to your post.

    Am I not seeing it or will you do it when you have time?

    Greetings 

    Giuseppe

  • Hi Giuseppe,

    I apologize, I forgot to attach it. Here it is:

    7318.CC256x VS HCI Commands - Texas Instruments Wiki.pdf

    Thanks,
    Jacob