linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Tao-B46827 <b46827@freescale.com>
To: Lukasz Rymanowski <lukasz.rymanowski@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>, <max.tsai@freescale.com>,
	<xiao-lizhang@freescale.com>
Subject: Re: BlueZ for Android 4.4.3
Date: Mon, 2 Mar 2015 14:54:00 +0800	[thread overview]
Message-ID: <54F40908.1090501@freescale.com> (raw)
In-Reply-To: <CAN_7+YaXZd4VPwk0VnSW8dP21PpmQMphf7T+UrkC9f4V7HcELg@mail.gmail.com>


On 2/14/2015 12:02 AM, Lukasz Rymanowski wrote:
> Hi Tony,
>
> On Thu, Feb 12, 2015 at 3:22 AM, Zheng Tao-B46827 <b46827@freescale.com> wrote:
>> Hi, Lukasz
>>
>>
>> On 2/11/2015 7:41 PM, Lukasz Rymanowski wrote:
>>> Hi,
>>>
>>> On Wed, Feb 11, 2015 at 10:37 AM, Zheng Tao-B46827 <b46827@freescale.com>
>>> wrote:
>>>> Hi, Lukasz
>>>> Thanks for your reply. Following you steps, the previous problem has been
>>>> resolved, but it seems that the connection is not stable. When I execute
>>>> av
>>>> connect, I can hear "Connected" from my Bluetooth headset, but it will be
>>>> disconnected immediately which i can hear "disconnected".  And it will
>>>> prompt "I/bluetoothd( 1061): bluetoothd[1062]: Unable to find matching
>>>> endpoint". Is this a bug? can you give some advise?
>>>>
>>>>> av connect 24:fd:52:b6:a0:99
>>>> connection_state: connection_state=BTAV_CONNECTION_STATE_CONNECTING
>>>> remote_bd_addr=24:fd:52:b6:a0:99
>>>> if_av->connect: BT_STATUS_SUCCESS
>>>>> D/BlueZ   ( 1060):
>>>>> external/bluetooth/bluez/android/hal-a2dp.c:a2dp_connect()
>>>> acl_state_changed_cb: status=BT_STATUS_SUCCESS
>>>> remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_CONNECTED
>>>>> D/BlueZ   ( 1060):
>>>>>
>>>>> external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed()
>>>>> state 0
>>>> connection_state: connection_state=BTAV_CONNECTION_STATE_DISCONNECTED
>>>> remote_bd_addr=24:fd:52:b6:a0:99
>>>>> I/bluetoothd( 1061): bluetoothd[1062]: Unable to find matching endpoint
>>> Here is the clue.
>>>
>>> Can you provide btmon logs?
>> I found this log when execute av connect command:
>> < HCI Command: Disconnect (0x01|0x0006) plen 3 [hci0] 215.582054
>>          Handle: 71
>>          Reason: Remote User Terminated Connection (0x13)
>> I doubt that why "Remote User Terminated Connection", because when I heard
>> "connected" from Bluetooth headset and I have done nothing with it.  The
>> full log when execute av connect command is attached. Thanks.
>>
>  From your logs I see that we did discover SEPs on your Jabra device
> and got capabilities of SBC SNK endpoint.
> Then we want to connect that SEP to our SRC endpoint but it is
> actually not there.
>
> After that I realized that I told you to do "av connect" before
> actually "audio init" and that is wrong.
> "Audio init" does register your SRC endpoints. So you should do that
> and after that try "av connect"
>
>
> BR
> Lukasz
Sorry to reply to you so late for Chinese New Year. Do you mean to 
follow steps like this:

 1. bluetooth init
 2. bluetooth enable
 3. bluetooth get_profile_interface a2dp
 4. bluetooth start_discovery
 5. bluetooth create_bond xxxxxxxx
 6. audio init
 7. av connect xxxxxxxx
 8. audio open_output_stream

But in this way, when I execute "audio init", I will return back the 
initial problems:
  "D/BlueZ   ( 1033): 
external/bluetooth/bluez/android/hal-audio.c:ipc_handler() Waiting for 
connection ..."
and when execute "av connect xxxxxxxx", it will prompt "if_av->connect: 
BT_STATUS_NOT_READY".
>>>> acl_state_changed_cb: status=BT_STATUS_SUCCESS
>>>> remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTED
>>>>> D/BlueZ   ( 1060):
>>>>>
>>>>> external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed()
>>>>> state 1
>>>>
>>> \Łukasz
>>>
>>>> On 2/11/2015 4:16 PM, Lukasz Rymanowski wrote:
>>>>> Hi Tony,
>>>>>
>>>>> On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <b46827@freescale.com>
>>>>> wrote:
>>>>>> Hi, Peers
>>>>>>
>>>>>> Thanks for your hard work that let us can experience BlueZ for Android.
>>>>>> But
>>>>>> I am faced with a audio/a2dp problems that stick me many weeks.
>>>>>>
>>>>>> I’m try to port Bluez to kitkat 4.4.3, and many common profiles, such
>>>>>> as
>>>>>> HIDP/FTP/GATT can function successfully. But the A2DP profile failed.
>>>>>>
>>>>>> So, I try to debug it using haltest tool as follows(with USB Bluetooth
>>>>>> Dongle):
>>>>>>
>>>>>> 1.bluetooth init
>>>>>>
>>>>>> 2.bluetooth enable
>>>>>>
>>>>>> 3.bluetooth get_profile_interface a2dp
>>>>>>
>>>>>> 4.bluetooth start_discovery
>>>>>>
>>>>>> 5.bluetooth create_bond xxxxxxxx
>>>>>>
>>>>> Here you should setup A2DP using "av connect <bdaddr>." (don't forget
>>>>> to do av init before.)  Once you are connected you can open stream.
>>>>>
>>>>>
>>>>>> 6.audio init
>>>>>>
>>>>>> 7.audio open_output_stream
>>>>>>
>>>>>> Then it will prompts:
>>>>>>
>>>>>> D/BlueZ   ( 1106):
>>>>>> external/bluetooth/bluez/android/hal-audio.c:audio_open_output_stream()
>>>>>>
>>>>>> D/BlueZ   ( 1106):
>>>>>> external/bluetooth/bluez/android/hal-audio.c:ipc_open_stream_cmd()
>>>>>>
>>>>>> E/BlueZ   ( 1106): audio: Invalid cmd socket passed to audio_ipc_cmd
>>>>>>
>>>>>> E/BlueZ   ( 1106): audio: cannot open output stream
>>>>>>
>>>>>> when I debug it , I found that
>>>>>>
>>>>>> BlueZ   ( 1106):
>>>>>> external/bluetooth/bluez/android/hal-audio.c:ipc_handler()
>>>>>> Waiting for connection ...
>>>>>>
>>>>>> And it seems that there is no audio socket to connect it.
>>>>>>
>>>>>> I’m not familiar with Bluez stack details, can you give some advice?
>>>>>> What
>>>>>> should I do to enable audio/a2dp functionality and execute audio play
>>>>>> command? Thanks.
>>>>>
>>>>> \Lukasz
>>>>>
>>>>>> ----------------------------------------------
>>>>>>
>>>>>> *Best Regards!*
>>>>>>
>>>>>> Tony Zheng
>>>>>>
>>>>>> --
>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>> linux-bluetooth"
>>>>>> in
>>>>>> the body of a message to majordomo@vger.kernel.org
>>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>


  reply	other threads:[~2015-03-02  6:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10  1:51 BlueZ for Android 4.4.3 Zheng Tao-B46827
2015-02-11  8:16 ` Lukasz Rymanowski
2015-02-11  9:37   ` Zheng Tao-B46827
2015-02-11 11:41     ` Lukasz Rymanowski
2015-02-12  2:22       ` Zheng Tao-B46827
2015-02-13 16:02         ` Lukasz Rymanowski
2015-03-02  6:54           ` Zheng Tao-B46827 [this message]
2015-03-04 11:43             ` Lukasz Rymanowski
     [not found]               ` <54FD4B0E.9010306@freescale.com>
2015-03-16 10:16                 ` Lukasz Rymanowski
  -- strict thread matches above, loose matches on Subject: below --
2015-02-10  1:37 Zheng Tao-B46827

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F40908.1090501@freescale.com \
    --to=b46827@freescale.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lukasz.rymanowski@gmail.com \
    --cc=max.tsai@freescale.com \
    --cc=xiao-lizhang@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).