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.

WL1273L: Modifying Freescale BSP (Android 4.1.2) to be aware of Bluetooth?

Hi,

I have a development board based on the Freescale iMX6 on which we have added the TI WL1273L. My job is to make the Bluetooth part work as a HSP and HFP audio gateway, but as I'm new to Android I not sure were to begin. I've added:

service hciattach /system/bin/logwrapper /system/bin/hciattach /dev/ttymxc4 texas 115200 flow

to init.rc. And have successfully paired a headset using the Bluetooth settings UI, used bt_sco_app, tinycap and tinyplay to record and playback a sample:

tinycap /sdcard/Music/temp.wav -D 1 -c 1 -r 8000 -b 8

tinyplay /sdcard/Music/temp.wav -D 1

I added the BluetoothSCOApp to our build, but when I play a song using the Music app the audio goes to the speaker. (The connected headset supports A2DP)

So I guess, I'm missing something to make the Android upper layers aware of the Bluetooth.

Any help would be much appreciated!

/Thomas

  • Can someone help me with what files I would need to modify? I expect that TI has implemented the driver and HAL interface, so do I just need to modify our audio_policy.conf?

    Thanks!

    /Thomas

  • Hi Thomas,
    
    
    From Bluetooth settings UI, If you see hands free audio is connected that means that the service level connection has established.
    So first you need to check if SCO connected. Only once the SCO is connected the audio will be routed to the headset.
    
    
    Thanks and regards,
    Sundeep.
  • I added A2DP to the audio_policy.conf and the audio was routed to the headset, but it's very unstable. If I play back a song with the Music app, it's doesn't always play in the headset. I think the BT link breaks and I have to reboot the dev board to get Bluetooth working again. If the audio is played in the headset the sound stutters very badly.

    After a reboot the Bluetooth isn't always working.

    Is it "just" a matter of configuration to get Bluetooth working or do I have to implement something? Or is TI supplying all the necessary drivers and HAL implementation?

    Do you have a guide on how to set up Android to use your chip?

    Thanks!

  • Hi Thomas,

     

    Are you using the latest service pack you can get it from the below link
    https://github.com/TI-ECS/bt-firmware

     

    If you are still facing the A2DP breaks, you can play around with the bit pool.

     

    Just to make sure if your antenna is connected properly, Try placing the BT headset as near as possible to the handset device and see if you see the breaks.

     

    For building android you can refer to the below links
    http://www.omappedia.com/wiki/Main_Page

     

    Regards,
    Sundeep.