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.

wl1271 bluetooth configuration: audio routing

Other Parts Discussed in Thread: WL1271, AM3517

Hello,

I use omap3evm board from Mistral with Wireless Connectivity Card which incorporates a WL1271 chip (required bluetooth firmware version is TIInit_7.2.31.bts).

I can hear sound in my headset only if I send sound data to WL1271 over PCM. I tried bluez4 config option SCORouting to both HCI and PCM, but it didn't help.

The same situation can be observed in e.g. TI_OMAP35x_WL1271_6.1.0.0.144 demo package (see bluetooth demo script BT_HFP_Play.sh):

bluez4 configures audio on BT chip, but sound data is sent over PCM.

So It looks like BT chip is always expecting audio from PCM regardless how bluez4 is configured.

Is there a way to configure audio routing  for wl1271 chip if I want to choose either HCI or PCM ?

 

Thanks,

Sergey

  • Hi Sergey,

    Currently, SCO connection is routed over PCM on OMAP3 EVM. If needed, SCO can be routed over HCI; You need to configure SCO routing in blueZ as well as WL1271;

    blueZ configuration is SCORouting=HCI  in audio.conf.

    It is possible to write and read WL1271 SCO configuration using HCI commands HCI_VS_Write_SCO_Configuration (0xFE10) and  HCI_VS_Read_SCO_Configuration (0xFE11) respectively;

    The 'Connection type' parameter sets the SCO routing on WL1271
    0 - PCM
    1 - HCI


    You need to adjust/set other parameters as per your requirement;
    Here is one example of read and write using hcitool command on OMAP3 EVM;


    HCI_VS_Read_SCO_Configuration (0xFE11) (Read current configuration)

    root@omap3evm:~/omap35x-wl1271-ga-demo/bluetooth_scripts# ../bluetooth/bin/hcitool cmd 0x3f 0x211
    < HCI Command: ogf 0x3f, ocf 0x0211, plen 0
    > HCI Event: 0x0e plen 16
      01 11 FE 00    00 30 0C D0 02 01   00 30 0C D0 02 01


    Description:

      Channel 0                    Channel 1
      01 30 0C D0 02 01   01 30 0C D0 02 01


    Return parameters:

    00

    Channel X connection type                       Size: 1 byte
    Value                     Parameter Description
    0x0                       CODEC connection
    0x1                       Host connection

    30
    Channel X TX buffer size                          Size: 1 byte
    Value                    Parameter Description
    0x0                      Illegal value
    0x1 – 0xFF               New buffer size in bytes


    0c

    Channel X number of buffers                             Size: 1 byte
    Value                       Parameter Description
    0x0 – 0xFF                  Number of available buffers


    2D0

    Channel X TX buffer maximum latency                          Size: 2 bytes
    Value                               Parameter Description
    0x0 – 0xFFFF                        Maximum latency in bytes


    01

    Channel X accept packet with bad CRC                             Size: 1 byte
    Value                                Parameter Description
    0x0                                  Reject packet with bad CRC.
    0x1                                  Accept packet with bad CRC.



    HCI_VS_Write_SCO_Configuration (0xFE10) (Set SCO configuration )

    root@omap3evm:~/omap35x-wl1271-ga-demo/bluetooth_scripts# ../bluetooth/bin/hcitool cmd 0x3f 0x210   0x01 0x30 0xD0 0x02 0x01

    < HCI Command: ogf 0x3f, ocf 0x0210, plen 5
      00 30 D0 02 01
    > HCI Event: 0x0e plen 6
      01 10 FE   00 30 0C


    Description:
    0x00 0x30 0xD0 0x02 0x01


    SCO connection type: host or CODEC

    0x01
    Connection type                       Size: 1 byte
    Value           Parameter Description
    0x0             CODEC connection
    0x1             Host connection
    0xFF            Do not change.


    0x30
    TX buffer size                           Size: 1 byte
    Value          Parameter Description
    0x0            Keep current packet size.
    0x1 – 0xFF     New packet size in bytes



     0xD0 0x02  = 0x02D0
    TX buffer maximum latency                               Size: 2 bytes
    Value                     Parameter Description
    0                         Keep current maximum latency.
    1 – 720                   New maximum latency in bytes



    0x01

    Accept packet with bad CRC                             Size: 1 byte
    Value                      Parameter Description
    0x0                        Reject packet with bad CRC.
    0x1                        Accept packet with bad CRC.
    0xFF                       Do not change.



    Return parameters:

    Status                       Size: 1 byte
    Value  Parameter Description
    0      Command succeeded.

    TX buffer size                          Size: 1 byte
    Value          Parameter Description
    0x0            Illegal value
    0x1 – 0xFF     New buffer size in bytes

    Number of buffers                             Size: 1 byte
    Value             Parameter Description
    0x0 – 0xFF        Number of available buffers

     

    Thanks,

    Sinoj

  • Hello Sinoj,

    Thanks for the information !

    Following your guidelines  I got audio stream via HCI interface of BT chip wl1271.

    Quality is not as good as in the case of PCM, but it is acceptable for voice.

     

    By the way, did you have experience in sending two audio streams to two headsets via wl1271 BT chip ?

    I tried to do it in a usual manner:

     1. To add two pcm entries to .asoundrc:

    pcm.bt1 {

       type bluetooth

       device XXXXXX

    }

    pcm.bt2 {

       type bluetooth

       device XXXXX

    }

    2.  To play two instances of aplay or mplayer with two different alsa devices: bt1 and bt2

    Using this simple setup I get successful results on integrated BT module on my laptop,

    but I get errors from bluez4 on omap3evm with wl1271 chip:

    bluetoothd[975]: link_key_request (sba=00:23:D4:E8:CA:D0, dba=00:18:13:FC:F2:7E)
    bluetoothd[975]: link_key_request (sba=00:23:D4:E8:CA:D0, dba=00:18:13:FC:F2:7E)
    bluetoothd[975]: sco_bind: Address already in use (98)
    bluetoothd[975]: start_resume: resume failed

    Do you have any idea where may be the difference in my two usecases assuming that bluez4 is the same.

    Does wl1271 BT has a restriction on sco streams supported over HCI ?

    Thanks,

    Sergey

  • Hi Sergey,

    Could you please provide the commands used to create two sco connections? Usually, there will be some configuration parameters to limit number of SCO connections.

    Thanks,

    Sinoj

  • Hello Sinoj,

    Some time after I wrote my prevous post, I checked again my bluetooth setup on laptop and found out that I get the same message

    'sco_bind: Address already in use' as in my previous post. I can only explain this result by the following: at that time  I was experimenting with

    two bluetooth devices (one was built-in to mylaptop and the other one was usb dongle) and finally I occasionally connected each headset to

    its own bluetooth host device. That is why everything was working like a charm. So my previous information about working setup with two

    sco connection is not correct.

     

    In order to understand that sco_bind failure and finally get two sco connections I spent some time investigating bluez source code.

    Finally I found out that in bluez they bind sco socket even in the case of client connection.

    However 'sockaddr_sco' structure looks as follows:

    struct sockaddr_sco {
            sa_family_t     sco_family;
            bdaddr_t        sco_bdaddr;
    };

    which explains why we can bind only one sco socket to each bluetooth host device. For instance, in the case of rfcomm sockets

    the structure 'sockadd_rc' contains two connection params - bluetooth address and channel number:

    struct sockaddr_rc {
            sa_family_t     rc_family;
            bdaddr_t        rc_bdaddr;
            u8              rc_channel;
    };

    that is why we can bind several sockets to bluetooth host device - one socket per channel.

     

    In order to check if it is possible to connect and use an sco client socket without binding it I did the following quick hack in bluez:

    diff --git a/btio/btio.c b/btio/btio.c
    index d8439e0..bb21138 100644
    --- a/btio/btio.c
    +++ b/btio/btio.c
    @@ -1190,8 +1190,12 @@ static GIOChannel *create_io(BtIOType type, gboolean server,
                            ERROR_FAILED(err, "socket(SEQPACKET, SCO)", errno);
                            return NULL;
                    }
    -               if (sco_bind(sock, &opts->src, err) < 0)
    -                       goto failed;
    +
    +               if (server) {
    +                       if (sco_bind(sock, &opts->src, err) < 0)
    +                               goto failed;
    +               }
    +
                    if (!sco_set(sock, opts->mtu, err))
                            goto failed;
                    break;

     

    Using patched bluez I got two working sco connections from one bluetooth host device to the two different headsets.

    The setup was as follows:

    # cat /home/test/.asoundrc

    pcm.bt1 {
        type bluetooth
        device 00:15:A0:B9:5E:B7
    }

    pcm.bt2 {
        type bluetooth
        device 00:18:13:FC:F2:7E
    }

    Then two headsets were paired with the only available bluetooth device on my workstation, and finally I simultaneously played two files,

    one for each headset:

    # aplay -D bt1 sample1.wav

    # aplay -D bt2 sample2.wav

     

    Sound quality was awful, but at least I got an answer for my question.

    In a couple of days I will get back my omap3evm board and try the same experiment on its wl1271 bluetooth module and then

    I will report the result. I think it should work for that chip unless there are some TI specific HCI commands which limit the

    amount of available sco links.

     

    Thanks,

    Sergey

  • Hello Sinoj,

    I repeated the same result on omap3evm board with wl1271 extension. I used the same hacked bluetoothd and the same .asound config as in my previous post.

    After I configured SCO routing over HCI using commands from your answer, I could send sound (running two separate instances of mplayer or aplay)

    to the two different headsets simultaneously.

     

    By the way, have you ever seen working drivers which utilize multiplexing features of PCM channel ?

    I mean the following configuration: suppose that we want to send two SCO streams to two different connected headsets over PCM (not over HCI).

    So we might try to use multiplexing in PCM channel (half of slots goes to one headset, another half goes to another one).

    I have seen such a feature, for example, in CSR BC6  specification, but haven't yet found any drivers implementing this functionality.

    Besides, do you know whether wl1271 BT chip supports such a multiplexing ?

     

    Thanks,

    Sergey.

  • Hi Sergey,

    The CODEC interface of the WL1271 can be configured as 2-channel PCM bus where the two channels have different word sizes and arbitrary positions in the bus’ frame. However, i have not done feasibility of the same on omap35x EVM (Please see sound/soc/codecs/wl1271bt.c included in common/patches/PSP-linux-03.00.01.06-wl1271-support.patch)

    Thanks,

    Sinoj

  • Hello Sinoj,

     

    Finally I got a working setup with two headsets where  audio data is sent to wl1271 via PCM channel (using your wl1271bt codec) and then sent to headsets with acceptable voice quality. Here I provide a brief description in order to make our forum thread completed.

     

    In your patches for PSP-linux-3.00.01.06  a new sound device is implemented which corresponds to this PCM channel to wl1271 chip. For ALSA this device looks like a stereo audio device, but it turns out that in default confguration of wl1271 chip one mono substream is sent to one voice link, and the other mono substream is sent to another voice link (if second link exists). So the final working setup requires the following things:

    a. BlueZ with sco workaround (patch is given earlier in this thread)

    b. Proper alsa config:

            pcm.bt1 {
                    type bluetooth
                    device 00:15:A0:B9:5E:B7
                    profile voice
            }

            pcm.bt2 {
                    type bluetooth
                    device 00:18:13:FC:F2:7E
                    profile voice
            }

            pcm.head {
                    type hw
                    card 0
                    device 1
            }

            pcm.dshare {
                    type dmix
                    ipc_key 2048
                    slave {
                            pcm "hw:0,1"
                            period_time 0
                            period_size 1024
                            channels 2
                    }
                    bindings {
                       0 0
                       1 1
                    }
            }

            pcm.ch1 {
                    type plug
                    slave {
                            pcm "dshare"
                            channels 2
                    }
                    ttable.0.0 1
            }

            pcm.ch2 {
                    type plug
                    slave {
                            pcm "dshare"
                            channels 2
                    }
                    ttable.1.1 1
            }

    c. Option in /etc/bluetooth/audio.conf

            MaxConnected=2

            SCORouting=PCM

     

    Besides, the maximum number of voice connections should be configured using HCI command HCI_VS_Set_Max_Voice_Connections. This should be done after  BlueZ is started and wl1271 BT chip is attached and configured by the hciattach.

    When everything is started/configured and headsets are paired, then we start two 'configuration instances' of mplayer:
            # mplayer -ao alsa:device=bt1 music.mp3
            # mplayer -ao alsa:device=bt2 music.mp3

    These instances do not produce sound (since data is not sent to PCM channel), but they provide proper BlueZ configuration (via pcm_bluetooth alsa plugin) and proper voice link setup. Next two commands start  'actual playing instances' of mplayer:

            # mplayer -ao alsa:device=ch1 a.mp3
            # mplayer -ao alsa:device=ch2 b.mp3


    Remaining issue.

    It should be possible to to avoid the use two 'configuration instances' of mplayer and to configure voice links using DBus commands as it is done in PSP-linux-3.00.01.06 bluetooth tests. However the use of the same set of commands for two headsets doesn't work for some reason. 'Play' command can't be completed for the second headset. But it should be possible to track dbus messages from 'configuration instances' of mplayer  and to figure out proper dbus commands.

     

    Thanks for you comments and remarks.

    Sergey.

     

     

  • Hi Sergey,

    Thanks for the update and i am glad to hear that the Bluetooth PCM multiplexing is working for you. Thank you very much for providing proper alsa configuration and sco workaround. When time permits i will definitely try this.

    Once again, thank you for sharing this with the community.

    Best Regards,
    Sinoj

  • Hi Sergey & Sinoj,

    I'm developing similar application too. Your information is very useful for me.

    Could you tell me the detail of HCI command HCI_VS_Set_Max_Voice_Connections ?

    According to your information, the wl1271 has two SCO routing modes (HCI<==>Headset, PCM<==>Headset) at least.

    Does the wl1271 have  a special  SCO routing(or testing) mode:   HCI <==> PCM?

    Thanks in advance.

    Peter Luo

  • Hi Peter Luo,

    "HCI_VS_Set_Max_Voice_Connections" is the command with opcode 0xFE2F and one parameter  (size = 1 byte)
     Following are the valid values:
     0 = No voice connections
     1 = One voice connection
     2 or more = Two voice connections

    I dont know about HCI <==> PCM routing.

    Thanks,

    Sinoj

  • Hi Sinoj,

    Thanks for your information !

    Following your guideline,  I executed command: hcitool cmd 0x3f 0x22f 0x00,  then no SCO connection can be established, it's correct.

    After edited audio.conf (set SCORouting=HCI,  MaxConnections=4) and executed following commands:

    hcitool cmd 0x3f 0x210 0x01 0x30 0xD0 0x02 0x01

    hcitool cmd 0x3f 0x22f 0x04

    , just only one SCO over HCI connection  can be established.

    Could you give me some suggestions?

    Thank again for your kindly help!

    PS: 

    test case:

    Bluetooth adapter  A (wl1271)  as a server,

    Bluetooth adapter B as a client, make  SCO connection to A,

    Bluetooth adapter C as another client,  make SCO connection to A.

    if B make a connection to A first, connection can be established successfully,  but C can't make connection to A until B release connection;

    If C make a connection to A first,  connection can be established too, but B can't make connection to A until C release connection.

     

    source piece (use Bluez):

       struct sockaddr_sco addr;
        int s;

       if ((s = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO)) < 0)
        {
            return -1;
        }

        memset(&addr, 0, sizeof(addr));
        addr.sco_family = AF_BLUETOOTH;
        bacpy(&addr.sco_bdaddr, &localbdaddr);
        if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0)
        {
            close(s);
            return -1;
        }

        if (listen(s, 10) < 0 )
        {
            close(s);
            return -1;
        }

        printf("SCO Listening...\n",);


  • Hi Luo Peter,

    Applying the patch provided by Sergey or modifying it manually in btio.c will help in establishing two HFP connections simultaneously, won't it?

    Thanks,

    Sinoj

  • Hi Luo Peter,

    Check verbose logs of bluetoothd. You should see something like 'sco_bind: Address already in use'  if you use plain bluetoothd daemon without workaround provided earlier in this thread. And this issue doesn't depend on SCO transport (HCI or PCM): you can bind only one SCO socket. Rough explanation of this issue can be also found earlier in this thread.

    By the way, in my experiments, I got very poor sound quality when I tried to use HCI transport (rather than PCM)  for two SCO voice links.

     

    Thanks,

    Sergey

  • Hi Sinoj & Sergey,

    Yes,  after apply patch, wl1271 can build two or  more outgoing SCO connection to different bluetooth adapters.

    My application takes role as a server, it should accept incoming SCO connection requests from others,

    needn't make any outgoing sco connection. So my question is :

    Does the wl1271 support two or more incoming SCO  over HCI connections simultaneously ?

    Thanks

    Peter

     

  • Hello Peter Luo,

    If I am not mistaken, according to BT spec SCO link is a symmetric point-to-point channel between master and slave. Bandwidth for this channel is preallocated which means that SCO logical transport reserves time slots on the physical channel. Main point here is that the channel is symmetric: slots are allocated in both directions. When you use your BT headset with your mobile, you have the only SCO link between them which carries voice in both directions. So you probably should ask yourself what do you mean by 'incoming' and 'outgoing' connections. If everything is about voice direction, then it doesn't matter whether connection is outgoing or incoming. Anyway, ACL control connection is established at first and SCO link is negotiated over this control connection.

    For example, in HSP profile there are two participants - HS (headset) and AG (audio gateway - e.g. mobile phone). Connection can be initiated by either of them, but after initial negotiation SCO voice link is always created by AG. It seems to be close to your usecase: clients establish ACL control connections with 'server', after negotiation 'server' connects SCO voice links to both clients.

     

    Thanks,

    Sergey

  • Hello,

    We are trying to record and playback audio over bluetooth using alsa library and utils on ARM platform.

    ALSA seems to be set up fine. Audio Playback over bluetooth is working well, recording does not work. arecord does not record silence but simply blocks after writing the 44 byte wave file header:

    $ arecord -f cd test.wav
    Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    (CTRL-C after a while)
    Aborted by signal break...

    $ ls -lh test.wav
    -rw-r--r-- 1 user user 44 2011-03-10 16:46 test.wav

    We also tried some arecord options (other sample formats or devices) without success.

    Any hints what we are missing?

     

    Regards,

    Krunal

  • Hi Krunal,

    Please provide us the details of your platform (hardware and software).

    Thanks,

    Sinoj

  • Hello Sinoj,

    We are using AM3517 EVM from logicPD. We are using AM35x-OMAP35x PSP 03.00.01.06 and following wilink setup guide provided by logicpd to setup wlan and bluetooth. Audio playback steps are mentioned in Wilink setup guide but not for audio record.

    Software Specification:

    1. AM35x-OMAP35x PSP 03.00.01.06 which has "Linux am3517-evm 2.6.32" along with the wilink patches provided by logicpd
    2. bluez-4.59.tar.gz alsa-lib-1.0.23.tar.bz2 alsa-utils-1.0.23.tar.bz2 as recommended in setup guide

    Audio Playback over bluetooth is working well, recording does not work. arecord does not record silence but simply blocks after writing the 44 byte wave file header:

    Is audio recording over bluetooth is tested on AM3517 EVM with AM35x-OMAP35x PSP 03.00.01.06 SDK.

    Following is my /etc/asound.conf

    pcm.rawbluetooth {
            @args [ ADDRESS ]
            @args.ADDRESS {
                    type string
            }
            type bluetooth
            device $ADDRESS
    }

    pcm.bluetooth {
            @args [ ADDRESS ]
            @args.ADDRESS {
                    type string
            }
            type plug
            slave {
                    pcm {
                            type bluetooth
                            device $ADDRESS
                    }
            }
    }


    Any hints what we are missing?

     

    Regards,

    Krunal

  • Hi Krunal,

    We don't have the AM3517 EVM from Logicpd. We do support OMAP3 EVM from Mistral+WL1271 solution. I hope someone else will respond to help you.

    Thanks,

    Sinoj

  • Hello,

     

    Thanks for the reply.

    We are using AM3517 with WL1271 only. I guess I am missing some basic configurations. May be some alsa or HCI command configuration. Can you please provide me set of steps where in I can configure WL1271 and record and playback audio over bluetooth.

     

    --

    Regards,

    Krunal

  • Dear Sergey

    Could you help me and tell - what I have to enable in kernel - that A2DP headset can work with aplay...

    now bluetoothhd - still activ... all servicec activate, but aplay - dont work with BT ... 

  • Hello Nikolay,

    1. Kernel bluetooth configuration

    The simplest way is to enable all the kernel configuration options under Networking support -> Bluetooth subsystem support.

    2. BlueZ (bluetoothd)

    You have to pair bluetooth headset with bluetooth service. If you are not using any existing bluetooth GUI (e.g. gnome bluetooth applet), then you will have to use command-line agent to pair with your headset. The simplest agent can be found in bluetoothd source tree: test/simple-agent.This is how to use it:

    # test/simple-agent hci0 XX:XX:XX:XX:XX:XX

    Now I don't remember exactly, but you might also need the following command after pairing:

    #  test/test-audio connect XX:XX:XX:XX:XX:XX

    3. Audio: here I consider only alsa configuration

    Create or modify existing alsa configuration ~/.asoundrc adding the following lines:

    pcm.bt {
        type bluetooth
        device XX:XX:XX:XX:XX:XX
        profile hifi
    }

    You may play wav file using 'aplay' utility:

    # aplay -D bt /path/to/test.wav

    or mplayer:

    # mplayer -ao alsa:device=bt /path/to/test.mp3

    Thanks,

    Sergey

  • Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_7.2.31.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Device setup complete
    < HCI Command: ogf 0x3f, ocf 0x0210, plen 5
      01 30 D0 02 01
    > HCI Event: 0x0e plen 6
      01 10 FE 00 30 0C
    rm: cannot remove '/usr/var/run/messagebus.pid': No such file or directory
    bluetoothd[1237]: Bluetooth daemon 4.98
    bluetoothd[1237]: src/main.c:parse_config() parsing main.conf
    bluetoothd[1237]: src/main.c:parse_config() discovto=0
    bluetoothd[1237]: src/main.c:parse_config() pairto=0
    bluetoothd[1237]: src/main.c:parse_config() pageto=8192
    bluetoothd[1237]: src/main.c:parse_config() auto_to=60
    bluetoothd[1237]: src/main.c:parse_config() name=%h-%d
    bluetoothd[1237]: src/main.c:parse_config() class=0x000100
    bluetoothd[1237]: src/main.c:parse_config() discov_interval=30
    bluetoothd[1237]: src/main.c:parse_config() Key file does not have key 'DeviceID'
    bluetoothd[1237]: Starting SDP server
    bluetoothd[1237]: src/plugin.c:plugin_init() Loading builtin plugins
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading audio plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading input plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading serial plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading network plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading service plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading hciops plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading mgmtops plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading formfactor plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading storage plugin
    bluetoothd[1237]: src/plugin.c:add_plugin() Loading adaptername plugin
    bluetoothd[1237]: src/plugin.c:plugin_init() Loading plugins /usr/lib/bluetooth/plugins
    bluetoothd[1237]: plugins/service.c:register_interface() path /org/bluez/1237/any
    bluetoothd[1237]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/1237/any
    bluetoothd[1237]: network/manager.c:read_config() Config options: Security=true
    bluetoothd[1237]: Failed to open control socket: Protocol not supported (93)
    bluetoothd[1237]: Can't init bnep module
    bluetoothd[1237]: Failed to init network plugin
    bluetoothd[1237]: input/manager.c:input_manager_init() input.conf: Key file does not have key 'IdleTimeout'
    bluetoothd[1237]: plugins/hciops.c:hciops_init()
    bluetoothd[1237]: plugins/hciops.c:hciops_setup()
    bluetoothd[1237]: Failed to open RFKILL control device
    bluetoothd[1237]: src/main.c:main() Entering main loop
    bluetoothd[1237]: plugins/hciops.c:init_known_adapters()
    bluetoothd[1237]: plugins/hciops.c:init_device() hci0
    bluetoothd[1237]: Listening for HCI events on hci0
    bluetoothd[1237]: plugins/hciops.c:init_conn_list() hci0
    bluetoothd[1237]: HCI dev 0 up
    bluetoothd[1237]: plugins/hciops.c:device_devup_setup() hci0
    bluetoothd[1237]: plugins/hciops.c:read_local_version_complete() Got version for hci0
    bluetoothd[1237]: src/adapter.c:btd_adapter_ref() 0x54b43458: ref=1
    bluetoothd[1237]: plugins/hciops.c:hciops_read_bdaddr() hci0
    bluetoothd[1237]: src/sdpd-database.c:sdp_init_services_list()
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 0
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 0
    bluetoothd[1237]: plugins/service.c:register_interface() path /org/bluez/1237/hci0
    bluetoothd[1237]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/1237/hci0
    bluetoothd[1237]: serial/manager.c:proxy_probe() path /org/bluez/1237/hci0
    bluetoothd[1237]: src/adapter.c:btd_adapter_ref() 0x54b43458: ref=2
    bluetoothd[1237]: serial/proxy.c:proxy_register() Registered interface org.bluez.SerialProxyManager on path /org/bluez/1237/                  hci0
    bluetoothd[1237]: Parsing /usr/etc/bluetooth/serial.conf failed: No such file or directory
    bluetoothd[1237]: src/adapter.c:btd_adapter_ref() 0x54b43458: ref=3
    bluetoothd[1237]: audio/manager.c:media_server_probe() path /org/bluez/1237/hci0
    bluetoothd[1237]: src/adapter.c:btd_adapter_ref() 0x54b43458: ref=4
    bluetoothd[1237]: audio/manager.c:audio_adapter_ref() 0x54b43a38: ref=1
    bluetoothd[1237]: media: Operation not permitted (1)
    bluetoothd[1237]: audio/manager.c:headset_server_probe() path /org/bluez/1237/hci0
    bluetoothd[1237]: audio/manager.c:audio_adapter_ref() 0x54b43a38: ref=2
    bluetoothd[1237]: audio/manager.c:state_changed() /org/bluez/1237/hci0 powered on
    bluetoothd[1237]: audio/telephony.c:telephony_init()
    bluetoothd[1237]: audio/headset.c:telephony_ready_ind() Telephony plugin initialized
    bluetoothd[1237]: audio/headset.c:print_ag_features() HFP AG features: "Ability to reject a call" "Enhanced call status" "Ex                  tended Error Result Codes"
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10000
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 0
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000003-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001108-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001112-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001203-0000-1000-8000-00805f9
    bluetoothd[1237]: plugins/hciops.c:hciops_set_fast_connectable() hci0 enable 0
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 64
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000003-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000111e-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000111f-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001203-0000-1000-8000-00805f9
    bluetoothd[1237]: audio/manager.c:a2dp_server_probe() path /org/bluez/1237/hci0
    bluetoothd[1237]: audio/manager.c:audio_adapter_ref() 0x54b43a38: ref=3
    bluetoothd[1237]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have key 'Disable'
    bluetoothd[1237]: audio/a2dp.c:a2dp_register() audio.conf: Key file does not have key 'MPEG12Sinks'
    bluetoothd[1237]: audio/avdtp.c:avdtp_register_sep() SEP 0x54b44b48 registered: type:0 codec:0 seid:1
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 72
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000019-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110a-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110d-0000-1000-8000-00805f9
    bluetoothd[1237]: audio/avdtp.c:avdtp_register_sep() SEP 0x54b44e18 registered: type:1 codec:0 seid:2
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10003
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 76
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000019-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110b-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110d-0000-1000-8000-00805f9
    bluetoothd[1237]: audio/manager.c:avrcp_server_probe() path /org/bluez/1237/hci0
    bluetoothd[1237]: audio/manager.c:audio_adapter_ref() 0x54b43a38: ref=4
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10004
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 76
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10005
    bluetoothd[1237]: plugins/hciops.c:hciops_add_uuid() hci0
    bluetoothd[1237]: plugins/hciops.c:update_service_classes() hci0 value 76
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
    bluetoothd[1237]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
    bluetoothd[1237]: plugins/adaptername.c:adaptername_probe() Setting name 'freescale-0' for device 'hci0'
    bluetoothd[1237]: plugins/hciops.c:hciops_set_name() hci0, name freescale-0
    bluetoothd[1237]: plugins/hciops.c:update_ext_inquiry_response() hci0
    bluetoothd[1237]: Could not get the contents of DMI chassis type
    bluetoothd[1237]: plugins/hciops.c:hciops_unblock_device() hci0 dba 00:00:00:00:00:00
    bluetoothd[1237]: Clearing blocked list failed: Invalid argument (22)
    bluetoothd[1237]: src/device.c:device_create() Creating device /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59
    bluetoothd[1237]: src/device.c:device_set_bonded() bonded 1
    bluetoothd[1237]: src/device.c:btd_device_ref() 0x54b46558: ref=1
    bluetoothd[1237]: src/device.c:device_set_temporary() temporary 0
    bluetoothd[1237]: src/device.c:device_probe_drivers() Probing drivers for F0:BF:97:8A:CB:59
    bluetoothd[1237]: serial/manager.c:serial_probe() path /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59: 00001108-0000-1000-8000-0                  0805f9b34fb
    bluetoothd[1237]: serial/port.c:create_serial_device() Registered interface org.bluez.Serial on path /org/bluez/1237/hci0/de                  v_F0_BF_97_8A_CB_59
    bluetoothd[1237]: serial/manager.c:serial_probe() path /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59: 0000111e-0000-1000-8000-0                  0805f9b34fb
    bluetoothd[1237]: input/manager.c:headset_probe() path /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59
    bluetoothd[1237]: src/device.c:btd_device_ref() 0x54b46558: ref=2
    bluetoothd[1237]: input/device.c:input_device_new() Registered interface org.bluez.Input on path /org/bluez/1237/hci0/dev_F0                  _BF_97_8A_CB_59
    bluetoothd[1237]: src/adapter.c:adapter_get_device() F0:BF:97:8A:CB:59
    bluetoothd[1237]: src/device.c:btd_device_ref() 0x54b46558: ref=3
    bluetoothd[1237]: audio/device.c:audio_device_register() Registered interface org.bluez.Audio on path /org/bluez/1237/hci0/d                  ev_F0_BF_97_8A_CB_59
    bluetoothd[1237]: audio/manager.c:handle_uuid() Found Headset record
    bluetoothd[1237]: audio/headset.c:headset_init() Registered interface org.bluez.Headset on path /org/bluez/1237/hci0/dev_F0_                  BF_97_8A_CB_59
    bluetoothd[1237]: audio/manager.c:handle_uuid() Found Handsfree record
    bluetoothd[1237]: audio/manager.c:handle_uuid() Found Audio Sink
    bluetoothd[1237]: audio/sink.c:sink_init() Registered interface org.bluez.AudioSink on path /org/bluez/1237/hci0/dev_F0_BF_9                  7_8A_CB_59
    bluetoothd[1237]: audio/manager.c:handle_uuid() Found AV Remote
    bluetoothd[1237]: audio/control.c:control_init() Registered interface org.bluez.Control on path /org/bluez/1237/hci0/dev_F0_                  BF_97_8A_CB_59
    bluetoothd[1237]: plugins/hciops.c:hciops_load_keys() hci0 keys 1 debug_keys 0
    bluetoothd[1237]: plugins/hciops.c:hciops_get_conn_list() hci0
    bluetoothd[1237]: src/manager.c:btd_manager_register_adapter() Adapter /org/bluez/1237/hci0 registered
    bluetoothd[1237]: src/adapter.c:btd_adapter_ref() 0x54b43458: ref=5
    bluetoothd[1237]: plugins/hciops.c:hciops_set_dev_class() hci0 major 1 minor 0
    bluetoothd[1237]: audio/manager.c:state_changed() /org/bluez/1237/hci0 powered on
    bluetoothd[1237]: plugins/hciops.c:hciops_disable_cod_cache() hci0 cache_enable 1
    bluetoothd[1237]: plugins/hciops.c:hciops_disable_cod_cache() hci0 current_cod 0x000000 wanted_cod 0x4c0100
    bluetoothd[1237]: plugins/hciops.c:write_class() hci0 class 0x4c0100
    bluetoothd[1237]: Adapter /org/bluez/1237/hci0 has been enabled
    bluetoothd[1237]: plugins/hciops.c:hciops_set_discoverable() hci0 discoverable 0
    bluetoothd[1237]: plugins/hciops.c:hciops_set_pairable() hci0 pairable 1
    bluetoothd[1237]: plugins/hciops.c:hciops_stop_inquiry() hci0
    bluetoothd[1237]: src/adapter.c:btd_adapter_unref() 0x54b43458: ref=4
    bluetoothd[1237]: plugins/hciops.c:read_local_ext_features_complete() hci0 status 0
    bluetoothd[1237]: plugins/hciops.c:read_tx_power_complete() hci0 status 0
    bluetoothd[1237]: plugins/hciops.c:update_ext_inquiry_response() hci0
    bluetoothd[1237]: plugins/hciops.c:update_ext_inquiry_response() hci0
    bluetoothd[1237]: plugins/hciops.c:read_local_name_complete() hci0 status 0
    bluetoothd[1237]: plugins/hciops.c:update_ext_inquiry_response() hci0
    bluetoothd[1237]: plugins/hciops.c:read_simple_pairing_mode_complete() hci0 status 0
    bluetoothd[1237]: plugins/hciops.c:update_ext_inquiry_response() hci0
    bluetoothd[1237]: plugins/hciops.c:read_scan_complete() hci0 status 0
    bluetoothd[1237]: src/adapter.c:adapter_mode_changed() old 0x00 new 0x02
    bluetoothd[1237]: src/adapter.c:adapter_set_limited_discoverable() FALSE
    bluetoothd[1237]: plugins/hciops.c:hciops_set_limited_discoverable() hci0 limited 0
    bluetoothd[1237]: src/adapter.c:set_mode_complete()
    bluetoothd[1237]: src/adapter.c:register_agent() Agent registered for hci0 at :1.1:/org/bluez/agent
    root@freescale ~$
    root@freescale ~$
    root@freescale ~$
    root@freescale ~$
    root@freescale ~$
    root@freescale ~$ bluetoothd[1237]: plugins/hciops.c:conn_complete() status 0x00
    bluetoothd[1237]: src/adapter.c:adapter_get_device() F0:BF:97:8A:CB:59
    bluetoothd[1237]: plugins/hciops.c:remote_features_information() hci0 status 0
    bluetoothd[1237]: plugins/hciops.c:link_key_request() hci0 dba F0:BF:97:8A:CB:59
    bluetoothd[1237]: plugins/hciops.c:get_auth_info() hci0 dba F0:BF:97:8A:CB:59
    bluetoothd[1237]: plugins/hciops.c:link_key_request() kernel auth requirements = 0x04
    bluetoothd[1237]: plugins/hciops.c:link_key_request() Matching key found
    bluetoothd[1237]: plugins/hciops.c:link_key_request() link key type 0x00
    bluetoothd[1237]: plugins/hciops.c:link_key_request() hci0 dba F0:BF:97:8A:CB:59
    bluetoothd[1237]: plugins/hciops.c:get_auth_info() hci0 dba F0:BF:97:8A:CB:59
    bluetoothd[1237]: plugins/hciops.c:link_key_request() kernel auth requirements = 0x04
    bluetoothd[1237]: plugins/hciops.c:link_key_request() Matching key found
    bluetoothd[1237]: plugins/hciops.c:link_key_request() link key type 0x00
    bluetoothd[1237]: plugins/hciops.c:auth_complete() hci0 status 0
    bluetoothd[1237]: plugins/hciops.c:bonding_complete() status 0x00
    bluetoothd[1237]: src/adapter.c:adapter_get_device() F0:BF:97:8A:CB:59
    bluetoothd[1237]: src/device.c:device_bonding_complete() bonding (nil) status 0x00
    bluetoothd[1237]: audio/headset.c:headset_set_state() State changed /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59: HEADSET_STATE_DISCONNECTED -> HEADSET_STATE_CONNECTING
    bluetoothd[1237]: src/agent.c:agent_authorize() authorize request was sent for /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59
    Authorizing request for /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59
    bluetoothd[1237]: audio/headset.c:headset_connect_cb() /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59: Connected to F0:BF:97:8A:CB:59
    bluetoothd[1237]: audio/headset.c:handle_event() Received AT+BRSF=8
    bluetoothd[1237]: audio/headset.c:print_hf_features() HFP HF features: "Voice recognition activation"
    bluetoothd[1237]: audio/headset.c:handle_event() Received AT+CIND=?
    bluetoothd[1237]: audio/headset.c:handle_event() Received AT+CIND?
    bluetoothd[1237]: audio/headset.c:handle_event() Received AT+CMER=3, 0, 0, 1
    bluetoothd[1237]: audio/headset.c:event_reporting() Event reporting (CMER): mode=3, ind=1
    bluetoothd[1237]: audio/headset.c:hfp_slc_complete() HFP Service Level Connection established
    bluetoothd[1237]: audio/telephony.c:telephony_device_connected() telephony-dummy: device 0x54b47c58 connected
    bluetoothd[1237]: audio/headset.c:headset_set_state() State changed /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59: HEADSET_STATE_CONNECTING -> HEADSET_STATE_CONNECTED
    bluetoothd[1237]: audio/avdtp.c:avdtp_ref() 0x54b48948: ref=2
    bluetoothd[1237]: audio/avdtp.c:avdtp_ref() 0x54b48948: ref=3
    bluetoothd[1237]: audio/sink.c:sink_set_state() State changed /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59: SINK_STATE_DISCONNECTED -> SINK_STATE_CONNECTING
    bluetoothd[1237]: audio/avdtp.c:avdtp_unref() 0x54b48948: ref=2
    bluetoothd[1237]: audio/avdtp.c:avdtp_connect_cb() AVDTP: connected signaling channel to F0:BF:97:8A:CB:59
    bluetoothd[1237]: audio/avdtp.c:avdtp_connect_cb() AVDTP imtu=672, omtu=895
    bluetoothd[1237]: audio/avctp.c:avctp_set_state() AVCTP Connecting
    bluetoothd[1237]: audio/avdtp.c:session_cb()
    bluetoothd[1237]: audio/avdtp.c:avdtp_parse_resp() DISCOVER request succeeded
    bluetoothd[1237]: audio/avdtp.c:avdtp_discover_resp() seid 1 type 1 media 0 in use 0
    bluetoothd[1237]: audio/avdtp.c:avdtp_discover_resp() seid 2 type 1 media 0 in use 0
    bluetoothd[1237]: audio/avdtp.c:session_cb()
    bluetoothd[1237]: audio/avdtp.c:avdtp_parse_resp() GET_CAPABILITIES request succeeded
    bluetoothd[1237]: audio/avdtp.c:avdtp_get_capabilities_resp() seid 1 type 1 media 0
    bluetoothd[1237]: audio/avdtp.c:session_cb()
    bluetoothd[1237]: audio/avdtp.c:avdtp_parse_resp() GET_CAPABILITIES request succeeded
    bluetoothd[1237]: audio/avdtp.c:avdtp_get_capabilities_resp() seid 2 type 1 media 0
    bluetoothd[1237]: audio/sink.c:discovery_complete() Discovery complete
    bluetoothd[1237]: audio/avdtp.c:avdtp_ref() 0x54b48948: ref=3
    bluetoothd[1237]: audio/a2dp.c:setup_ref() 0x54b3fad8: ref=1
    bluetoothd[1237]: audio/a2dp.c:a2dp_config() a2dp_config: selected SEP 0x54b44b48
    bluetoothd[1237]: audio/a2dp.c:setup_ref() 0x54b3fad8: ref=2
    bluetoothd[1237]: audio/avdtp.c:avdtp_set_configuration() 0x54b48948: int_seid=1, acp_seid=1
    bluetoothd[1237]: audio/a2dp.c:setup_unref() 0x54b3fad8: ref=1
    bluetoothd[1237]: audio/avdtp.c:session_cb()
    bluetoothd[1237]: audio/avdtp.c:avdtp_parse_resp() SET_CONFIGURATION request succeeded
    bluetoothd[1237]: audio/a2dp.c:setconf_cfm() Source 0x54b44b48: Set_Configuration_Cfm
    bluetoothd[1237]: audio/avdtp.c:avdtp_sep_set_state() stream state changed: IDLE -> CONFIGURED
    bluetoothd[1237]: audio/avdtp.c:session_cb()
    bluetoothd[1237]: audio/avdtp.c:avdtp_parse_resp() OPEN request succeeded
    bluetoothd[1237]: audio/avctp.c:avctp_connect_cb() AVCTP: connected to F0:BF:97:8A:CB:59
    bluetoothd[1237]: Can't open input device: No such file or directory (2)
    bluetoothd[1237]: AVRCP: failed to init uinput for F0:BF:97:8A:CB:59
    bluetoothd[1237]: audio/avctp.c:avctp_set_state() AVCTP Connected
    bluetoothd[1237]: audio/avdtp.c:avdtp_connect_cb() AVDTP: connected transport channel to F0:BF:97:8A:CB:59
    bluetoothd[1237]: Enabling flushable packets failed: l2cap_set_flushable: Protocol not available (92)
    bluetoothd[1237]: audio/avdtp.c:handle_transport_connect() sk 23, omtu 895, send buffer size 54272
    bluetoothd[1237]: audio/a2dp.c:open_cfm() Source 0x54b44b48: Open_Cfm
    bluetoothd[1237]: audio/sink.c:stream_setup_complete() Stream successfully created
    bluetoothd[1237]: audio/a2dp.c:setup_unref() 0x54b3fad8: ref=0
    bluetoothd[1237]: audio/a2dp.c:setup_free() 0x54b3fad8
    bluetoothd[1237]: audio/avdtp.c:avdtp_unref() 0x54b48948: ref=2
    bluetoothd[1237]: audio/avdtp.c:avdtp_sep_set_state() stream state changed: CONFIGURED -> OPEN
    bluetoothd[1237]: audio/sink.c:sink_set_state() State changed /org/bluez/1237/hci0/dev_F0_BF_97_8A_CB_59: SINK_STATE_CONNECTING -> SINK_STATE_CONNECTED
    
    root@freescale ~$
    
    
    root@freescale ~$ aplay -D bt1 /ti/gallery/Pop.wav
    DEBUG: _snd_pcm_bluetooth_open: Bluetooth PCM plugin (Playback)
    bt_audio_service_open: connect() failed: Connection refused (111)
    aplay: main:682: audio open error: Connection refused
    root@freescale ~$
    root@freescale ~$ cat /etc/asound.conf
    
    pcm.bt1 {
        type bluetooth
        device F0:BF:97:8A:CB:59
        profile "hifi"
        }
    
    
    root@freescale ~$
    
    
    
    
    

    Sergey I attach BT_LOG.txt..

    I start system..  and make:

    hciconfig hci0 piscan
    hcitool cmd 0x3f 0x210 0x01 0x30 0xD0 0x02 0x01

    rm /usr/var/run/messagebus.pid
    rm /usr/var/run/dbus/pid
    sleep 1
    dbus-daemon --system &
    sleep 2
    bluetoothd -nd &
    sleep 5
    agent --path /org/bluez/agent 0000 &
    
    
    and - BT headset - after anable it automatical detected OS and connection...
    
    
    But - aplay - cant connect to bluetooth $(
  • hi ~

    can wl1271 work on ti 8148 and can bt pcm  use mcasp4 ?

  • We have used below hci commands, and enabled the audio code in the BT module,
    Now we are able to get the I2s clock output from the BT Module, but there is no I2S data coming out of the Device even after playback/record is initiated via bluetooth stack (here bluez).

    So Is there any other HCI VS command, that needs to be called specifically in sequence before playback/record via PCM?

    Enable Audio Routing via PCM in BT Module

    HCI_VS_Write_CODEC_Config (0xFD06)106

    $ hcitool cmd 0x3f 0x106 0x0 0x8 0x0 0x40 0x1F 0x0 0x0 0x1 0x0 0x0 0x0 0x0 0x10 0x0 0x1 0x0 0x0 0x10 0x0 0x1 0x0 0x1 0x0 0x10 0x0 0x11 0x0 0x0 0x10 0x0 0x11 0x0 0x1 0x0


    HCI_VS_Write_CODEC_Config_Enhanced (0xFD07) 107

    $ hcitool cmd 0x3f 0x107 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0


    HCI_VS_Write_SCO_Configuration (0xFE10)

    $ hcitool cmd 0x3f 0x210 0x0 0x0 0x0 0x0 0x0



    HCI_VS_A3DP_Codec_Configuration (0xFD8E)

    $ hcitool cmd 0x3f 0x18e 0x0 0x04 0x1 0x0 0x0 0x4 0x4 0x0 0x00 0x00 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0

  • Hi,

    We will track this latest query as part of e2e.ti.com/.../1420546

    Regards,
    Gigi Joseph.