BlueZ for Android 4.4.3
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
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.
----------------------------------------------
*Best Regards!*
Tony Zheng
Hi Tony,
Quoted 13 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxx
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.
Quoted 18 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/BlueZ ( 1106): audio: cannot open output stream
when I debug it , I found that
Quoted 8 lines
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
Quoted 12 lines
----------------------------------------------
*Best Regards!*
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
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?
Quoted 1 line
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
Quoted 1 line
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
Quoted 1 line
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
Quoted 1 line
I/bluetoothd( 1061): bluetoothd[1062]: Unable to find matching endpoint
acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTED
Quoted 1 line
D/BlueZ ( 1060): external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1
Quoted 68 lines · Lukasz Rymanowski
Hi Tony,
Quoted 13 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxxHere you should setup A2DP using "av connect <bdaddr>." (don't forget to do av init before.) Once you are connected you can open stream.
Quoted 18 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/BlueZ ( 1106): audio: cannot open output stream
when I debug it , I found that
Quoted 8 lines
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
Quoted 11 lines
----------------------------------------------
*Best Regards!*
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 14 lines · On Wed, Feb 11, 2015 at 10:37 AM, Zheng Tao-B46827 <[email protected]> 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?Quoted 1 line
av connect 24:fd:52:b6:a0:99
connection_state: connection_state=BTAV_CONNECTION_STATE_CONNECTING remote_bd_addr=24:fd:52:b6:a0:99if_av->connect:BT_STATUS_SUCCESSQuoted 2 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-a2dp.c:a2dp_connect()
Quoted 8 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_CONNECTEDQuoted 3 lines
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:99Quoted 1 line
I/bluetoothd( 1061): bluetoothd[1062]: Unable to find matching endpoint
Here is the clue.
Can you provide btmon logs?
Quoted 7 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTEDQuoted 3 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1
\Łukasz
Quoted 79 lines · Lukasz Rymanowski
Quoted 75 lines
Hi Tony,
Quoted 15 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxxHere you should setup A2DP using "av connect <bdaddr>." (don't forget to do av init before.) Once you are connected you can open stream.
Quoted 22 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/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 ...Quoted 5 lines
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
Quoted 12 lines
----------------------------------------------
*Best Regards!*
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, Lukasz
Quoted 22 lines · Lukasz Rymanowski
Hi,
Quoted 19 lines · On Wed, Feb 11, 2015 at 10:37 AM, Zheng Tao-B46827 <[email protected]> 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?Quoted 1 line
av connect 24:fd:52:b6:a0:99
connection_state: connection_state=BTAV_CONNECTION_STATE_CONNECTING remote_bd_addr=24:fd:52:b6:a0:99if_av->connect:BT_STATUS_SUCCESSQuoted 2 lines
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_CONNECTEDQuoted 3 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 0
Quoted 6 lines
Quoted 3 lines
connection_state: connection_state=BTAV_CONNECTION_STATE_DISCONNECTED remote_bd_addr=24:fd:52:b6:a0:99Quoted 1 line
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.
Quoted 84 lines
Quoted 7 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTEDQuoted 3 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1\Łukasz
Quoted 65 lines · Lukasz Rymanowski
Quoted 64 lines
Hi Tony,
Quoted 14 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxxHere you should setup A2DP using "av connect <bdaddr>." (don't forget to do av init before.) Once you are connected you can open stream.
Quoted 22 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/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 ...Quoted 5 lines
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
Quoted 4 lines
----------------------------------------------
*Best Regards!*
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line
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
< HCI Command: Create Connection (0x01|0x0005) plen 13 [hci0] 210.555389
Address: 24:FD:52:B6:A0:99 (OUI 24-FD-52)
Packet type: 0xcc18if_av->connect: BT_STATUS_SUCCESS
DM1 may be used
Quoted 1 line
DH1 may be used
DM3 may be used
DH3 may be used
DM5 may be used
DH5 may be used
Page scan repetition mode: R1 (0x01)
Page scan mode: Mandatory (0x00)
Clock offset: 0xef5a
Role switch: Allow slave (0x01)
D/BlueZ ( 1789): external/bluetooth/bluez/android/hal-a2dp.c:a2dp_connect()
Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 210.567941
Create Connection (0x01|0x0005) ncmd 1
Status: Success (0x00)Quoted 1 line
HCI Event: Connect Complete (
0x03) plen 11 [hci0] 211.234923
Status: Success (0x00)
Handle: 71
Address: 24:FD:52:B6:A0:99 (OUI 24-FD-52)
Link type: ACL (0x01)
Encryption: Disabled (0x00)
< HCI Command: Read Remote Supported... (0x01|0x001b) plen 2 [hci0] 211.235356
Handle: 71Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 211.240943
Read Remote Supported Features (0x01|0x001b) ncmd 0
Status: Success (0x00)Quoted 1 line
HCI Event: Max Slots Change (
0x1b) plen 3 [hci0] 211.253913
Handle: 71
Max slots: 5
Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 211.261920
NOP (0x00|0x0000) ncmd 1
Status: Success (0x00)Quoted 1 line
HCI Event: Read Remote Supported Features (
0x0b) plen 11 [hci0] 211.290914
Status: Success (0x00)
Handle: 71
Features: 0xbf 0xfe 0x8b 0xfe 0x98 0xbf 0x59 0x83
3 slot packets
5 slot packets
Encryption
Slot offset
Timing accuracy
Role switch
Sniff mode
Power control requests
Channel quality driven data rate (CQDDR)
SCO link
HV2 packets
HV3 packets
u-law log synchronous data
A-law log synchronous data
CVSD synchronous data
Paging parameter negotiation
Transparent synchronous data
Broadcast Encryption
Enhanced Data Rate ACL 2 Mbps mode
Enhanced Data Rate ACL 3 Mbps mode
Enhanced inquiry scan
Interlaced inquiry scan
Interlaced page scan
RSSI with inquiry results
Extended SCO link (EV3 packets)
AFH capable slave
AFH classification slave
3-slot Enhanced Data Rate ACL packets
5-slot Enhanced Data Rate ACL packets
Sniff subrating
Pause encryption
AFH capable master
AFH classification master
Enhanced Data Rate eSCO 2 Mbps mode
3-slot Enhanced Data Rate eSCO packets
Extended Inquiry Response
Secure Simple Pairing
Encapsulated PDU
Non-flushable Packet Boundary Flag
Link Supervision Timeout Changed Event
Inquiry TX Power Level
Extended features
< HCI Command: Read Remote Extended F.. (0x01|0x001c) plen 3 [hci0] 211.291032
Handle: 71
Page: 1Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 211.294936
Read Remote Extended Features (0x01|0x001c) ncmd 1
Status: Success (0x00)Quoted 1 line
HCI Event: Read Remote Extended Features (
0x23) plen 13 [hci0] 211.308913
Status: Success (0x00)
Handle: 71
Page: 1/1
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Secure Simple Pairing (Host Support)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10 [hci0] 211.309034
Address: 24:FD:52:B6:A0:99 (OUI 24-FD-52)
Page scan repetition mode: R2 (0x02)
Page scan mode: Mandatory (0x00)
Clock offset: 0x0000Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 211.312941
Remote Name Request (0x01|0x0019) ncmd 1
Status: Success (0x00)Quoted 1 line
HCI Event: Remote Name Req Complete (
0x07) plen 255 [hci0] 211.377906
Status: Success (0x00)
Address: 24:FD:52:B6:A0:99 (OUI 24-FD-52)
Name: Jabra TAG v2.0.0
< HCI Command: Authentication Requested (0x01|0x0011) plen 2 [hci0] 211.378061
Handle: 71acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_CONNECTED @ Device Connected: 24:FD:52:B6:A0:99 (0) flags 0x0000
Quoted 1 line
11 09 4a 61 62 72 61 20 54 41 47 20 76 32 2e 30 ..Jabra TAG v2.0
2e 30 04 0d 04 04 24 .0....$
Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 211.378942
Authentication Requested (0x01|0x0011) ncmd 1
Status: Success (0x00)D/BlueZ ( 1789): external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 0
Quoted 1 line
HCI Event: Link Key Request (
0x17) plen 6 [hci0] 211.380917
Address: 24:FD:52:B6:A0:99 (OUI 24-FD-52)
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22 [hci0] 211.381022
Address: 24:FD:52:B6:A0:99 (OUI 24-FD-52)
Link key: fee034056a0a8b4a7351c74c2f3eda48Quoted 1 line
HCI Event: Command Complete (
0x0e) plen 10 [hci0] 211.384929
Link Key Request Reply (0x01|0x000b) ncmd 1
Status: Success (0x00)
Address: 24:FD:52:B6:A0:99 (OUI 24-FD-52)Quoted 1 line
HCI Event: Auth Complete (
0x06) plen 3 [hci0] 211.418913
Status: Success (0x00)
Handle: 71
< HCI Command: Set Connection Encrypt.. (0x01|0x0013) plen 3 [hci0] 211.419023
Handle: 71
Encryption: Enabled (0x01)Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 211.423930
Set Connection Encryption (0x01|0x0013) ncmd 1
Status: Success (0x00)Quoted 1 line
HCI Event: Encryption Change (
0x08) plen 4 [hci0] 211.471916
Status: Success (0x00)
Handle: 71
Encryption: Enabled with E0 (0x01)
< ACL Data TX: Handle 71 flags 0x00 dlen 10 [hci0] 211.472047
L2CAP: Information Request (0x0a) ident 1 len 2
Type: Extended features supported (0x0002)Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.476929
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 211.486916
L2CAP: Information Response (0x0b) ident 1 len 8
Type: Extended features supported (0x0002)
Result: Success (0x0000)
Features: 0x00000038
Enhanced Retransmission Mode
Streaming Mode
FCS Option
< ACL Data TX: Handle 71 flags 0x00 dlen 12 [hci0] 211.487039
L2CAP: Connection Request (0x02) ident 2 len 4
PSM: 25 (0x0019)
Source CID: 64Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.492915
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 211.497913
L2CAP: Connection Response (0x03) ident 2 len 8
Destination CID: 192
Source CID: 64
Result: Connection pending (0x0001)
Status: Authorization pending (0x0002)Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 211.556919
L2CAP: Connection Response (0x03) ident 2 len 8
Destination CID: 192
Source CID: 64
Result: Connection successful (0x0000)
Status: No further information available (0x0000)< ACL Data TX: Handle 71 flags 0x00 dlen 23 [hci0] 211.557047
L2CAP: Configure Request (0x04) ident 3 len 15
Destination CID: 192
Flags: 0x0000
Option: Retransmission and Flow Control (0x04)
Mode: Basic (0x00)
TX window size: 0
Max transmit: 0
Retransmission timeout: 0
Monitor timeout: 0
Maximum PDU size: 0
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 20 [hci0] 211.559915
L2CAP: Configure Request (0x04) ident 1 len 12
Destination CID: 64
Flags: 0x0000
Option: Maximum Transmission Unit (0x01)
MTU: 895
Option: Flush Timeout (0x02)
Flush timeout: 65535
< ACL Data TX: Handle 71 flags 0x00 dlen 18 [hci0] 211.560027
L2CAP: Configure Response (0x05) ident 1 len 10
Source CID: 192
Flags: 0x0000
Result: Success (0x0000)
Option: Maximum Transmission Unit (0x01)
MTU: 895Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.562913
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.564916
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 22 [hci0] 211.573919
L2CAP: Configure Response (0x05) ident 3 len 14
Source CID: 64
Flags: 0x0000
Result: Success (0x0000)
Option: Maximum Transmission Unit (0x01)
MTU: 672
Option: Flush Timeout (0x02)
Flush timeout: 65535< ACL Data TX: Handle 71 flags 0x00 dlen 6 [hci0] 211.574327
Channel: 192 len 2 [PSM 25 mode 0] {chan 0}
00 01 ..
< ACL Data TX: Handle 71 flags 0x00 dlen 12 [hci0] 211.574585
L2CAP: Connection Request (0x02) ident 4 len 4
PSM: 1 (0x0001)
Source CID: 65Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.581918
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.582941
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 211.592918
L2CAP: Connection Response (0x03) ident 4 len 8
Destination CID: 257
Source CID: 65
Result: Connection pending (0x0001)
Status: Authorization pending (0x0002)Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 211.606918
L2CAP: Connection Response (0x03) ident 4 len 8
connection_state: connection_state=BTAV_CONNECTION_STATE_DISCONNECTED remote_bd_addr=24:fd:52:b6:a0:99
Quoted 1 line
I/bluetoothd( 1790): bluetoothd[1791]: Unable to find matching endpoint
Destination CID: 257
Source CID: 65
Result: Connection successful (0x0000)
Status: No further information available (0x0000)
< ACL Data TX: Handle 71 flags 0x00 dlen 23 [hci0] 211.607038
L2CAP: Configure Request (0x04) ident 5 len 15
Destination CID: 257
Flags: 0x0000
Option: Retransmission and Flow Control (0x04)
Mode: Basic (0x00)
TX window size: 0
Max transmit: 0
Retransmission timeout: 0
Monitor timeout: 0
Maximum PDU size: 0
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 211.610919
L2CAP: Configure Request (0x04) ident 2 len 8
Destination CID: 65
Flags: 0x0000
Option: Maximum Transmission Unit (0x01)
MTU: 48
< ACL Data TX: Handle 71 flags 0x00 dlen 18 [hci0] 211.611032
L2CAP: Configure Response (0x05) ident 2 len 10
Source CID: 257
Flags: 0x0000
Result: Success (0x0000)
Option: Maximum Transmission Unit (0x01)
MTU: 48Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.611927
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.616913
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 14 [hci0] 211.622917
L2CAP: Configure Response (0x05) ident 5 len 6
Source CID: 65
Flags: 0x0000
Result: Success (0x0000)< ACL Data TX: Handle 71 flags 0x00 dlen 24 [hci0] 211.623221
Channel: 257 len 20 [PSM 1 mode 0] {chan 1}
SDP: Service Search Attribute Request (0x06) tid 0 len 15
Search pattern: [len 5]
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
A/V Remote Control (0x110e)
Max record count: 65535
Attribute list: [len 7]
Sequence (6) with 5 bytes [8 extra bits] len 7
Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
0x0000ffff
Continuation state: 0
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.628912
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 52 [hci0] 211.649917
Channel: 65 len 48 [PSM 1 mode 0] {chan 1}
SDP: Service Search Attribute Response (0x07) tid 0 len 43
Attribute bytes: 38
Continuation state: 2
00 1b ..
< ACL Data TX: Handle 71 flags 0x00 dlen 26 [hci0] 211.650419
Channel: 257 len 22 [PSM 1 mode 0] {chan 1}
SDP: Service Search Attribute Request (0x06) tid 1 len 17
Search pattern: [len 5]
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
A/V Remote Control (0x110e)
Max record count: 65535
Attribute list: [len 7]
Sequence (6) with 5 bytes [8 extra bits] len 7
Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
0x0000ffff
Continuation state: 2
00 1b ..
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.654912
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 39 [hci0] 211.665918
Channel: 65 len 35 [PSM 1 mode 0] {chan 1}
SDP: Service Search Attribute Response (0x07) tid 1 len 30
Attribute bytes: 27
Continuation state: 0
Combined attribute bytes: 65
Attribute list: [len 59] {position 0}
Attribute: Service Record Handle (0x0000) [len 2]
0x00010003
Attribute: Service Class ID List (0x0001) [len 2]
UUID (3) with 2 bytes [0 extra bits] len 3
A/V Remote Control (0x110e)
UUID (3) with 2 bytes [0 extra bits] len 3
A/V Remote Control Controller (0x110f)
Attribute: Protocol Descriptor List (0x0004) [len 2]
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
L2CAP (0x0100)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0017
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
AVCTP (0x0017)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0103
Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
A/V Remote Control (0x110e)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0104
Attribute: Unknown (0x0311) [len 2]
0x0001
< ACL Data TX: Handle 71 flags 0x00 dlen 12 [hci0] 211.666605
L2CAP: Connection Request (0x02) ident 6 len 4
PSM: 23 (0x0017)
Source CID: 66Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 211.671916
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 211.681918
L2CAP: Connection Response (0x03) ident 6 len 8
Destination CID: 322
Source CID: 66
Result: Connection pending (0x0001)
Status: Authorization pending (0x0002)Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 8 [hci0] 211.997917
Channel: 64 len 4 [PSM 25 mode 0] {chan 0}
02 01 04 08 ....
< ACL Data TX: Handle 71 flags 0x00 dlen 7 [hci0] 211.998265
Channel: 192 len 3 [PSM 25 mode 0] {chan 0}
10 02 04 ...
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 212.003915
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 20 [hci0] 212.072919
Channel: 64 len 16 [PSM 25 mode 0] {chan 0}
12 02 01 00 07 06 00 00 ff ff 02 35 04 02 02 00 ........??.5....< ACL Data TX: Handle 71 flags 0x00 dlen 12 [hci0] 212.073712
L2CAP: Disconnection Request (0x06) ident 7 len 4
Destination CID: 192
Source CID: 64
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 16 [hci0] 212.075921
L2CAP: Connection Response (0x03) ident 6 len 8
Destination CID: 322
Source CID: 66
Result: Connection successful (0x0000)
Status: No further information available (0x0000)Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 10 [hci0] 212.076931
L2CAP: Information Request (0x0a) ident 3 len 2
Type: Extended features supported (0x0002)
< ACL Data TX: Handle 71 flags 0x00 dlen 16 [hci0] 212.077034
L2CAP: Information Response (0x0b) ident 3 len 8
Type: Extended features supported (0x0002)
Result: Success (0x0000)
Features: 0x000002b8
Enhanced Retransmission Mode
Streaming Mode
FCS Option
Fixed Channels
Unicast Connectionless Data ReceptionQuoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 212.077925
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 212.082916
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 34 [hci0] 212.092919
L2CAP: Configure Request (0x04) ident 4 len 26
Destination CID: 66
Flags: 0x0000
Option: Maximum Transmission Unit (0x01)
MTU: 672
Option: Flush Timeout (0x02)
Flush timeout: 65535
Option: Retransmission and Flow Control (0x04)
Mode: Enhanced retransmission (0x03)
TX window size: 5
Max transmit: 10
Retransmission timeout: 0
Monitor timeout: 0
Maximum PDU size: 3958
Option: Frame Check Sequence (0x05)
FCS: 16-bit FCS (0x01)< ACL Data TX: Handle 71 flags 0x00 dlen 14 [hci0] 212.093021
L2CAP: Command Reject (0x01) ident 4 len 6
Reason: Invalid CID in request (0x0002)
Destination CID: 66
Source CID: 0
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 212.098911
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 12 [hci0] 212.436921
L2CAP: Disconnection Response (0x07) ident 7 len 4
Destination CID: 192
Source CID: 64
< ACL Data TX: Handle 71 flags 0x00 dlen 12 [hci0] 213.563007
L2CAP: Disconnection Request (0x06) ident 8 len 4
Destination CID: 257
Source CID: 65
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5 [hci0] 213.565915
Num handles: 1
Handle: 71
Count: 1
Quoted 1 line
ACL Data RX: Handle 71 flags
0x02dlen 12 [hci0] 213.588917
L2CAP: Disconnection Response (0x07) ident 8 len 4
Destination CID: 257
Source CID: 65
< HCI Command: Read Clock Offset (0x01|0x001f) plen 2 [hci0] 215.580791
Handle: 71
Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 215.581944
Read Clock Offset (0x01|0x001f) ncmd 1
Status: Success (0x00)
< HCI Command: Disconnect (0x01|0x0006) plen 3 [hci0] 215.582054
Handle: 71
Reason: Remote User Terminated Connection (0x13)Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 215.586927
Disconnect (0x01|0x0006) ncmd 0
Status: Success (0x00)Quoted 1 line
HCI Event: Read Clock Offset Complete (
0x1c) plen 5 [hci0] 215.592917
Status: Success (0x00)
Handle: 71
Clock offset: 0x6f5aQuoted 1 line
HCI Event: Command Status (
0x0f) plen 4 [hci0] 215.595918
NOP (0x00|0x0000) ncmd 1
Status: Success (0x00)acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTED
Quoted 1 line
Quoted 1 line
HCI Event: Disconnect Complete (
0x05) plen 4 [hci0] 215.673914
Status: Success (0x00)
Handle: 71
Reason: Connection Terminated By Local Host (0x16)@ Device Disconnected: 24:FD:52:B6:A0:99 (0) reason 2
D/BlueZ ( 1789): external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1
Quoted 1 line
Hi Tony,
Quoted 47 lines · On Thu, Feb 12, 2015 at 3:22 AM, Zheng Tao-B46827 <[email protected]> wrote:
Hi, Lukasz
Quoted 32 lines · Lukasz Rymanowski
Hi,
Quoted 27 lines · On Wed, Feb 11, 2015 at 10:37 AM, Zheng Tao-B46827 <[email protected]> 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?Quoted 1 line
av connect 24:fd:52:b6:a0:99
connection_state: connection_state=BTAV_CONNECTION_STATE_CONNECTING remote_bd_addr=24:fd:52:b6:a0:99if_av->connect:BT_STATUS_SUCCESSQuoted 3 lines
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_CONNECTEDQuoted 5 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 0
Quoted 8 lines
Quoted 4 lines
connection_state: connection_state=BTAV_CONNECTION_STATE_DISCONNECTED remote_bd_addr=24:fd:52:b6:a0:99Quoted 2 lines
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
Quoted 8 lines
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
Quoted 93 lines
Quoted 92 lines
Quoted 10 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTEDQuoted 5 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1
\Łukasz
Quoted 80 lines · Lukasz Rymanowski
Quoted 77 lines
Hi Tony,
Quoted 16 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxxHere you should setup A2DP using "av connect <bdaddr>." (don't forget to do av init before.) Once you are connected you can open stream.
Quoted 22 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/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 ...Quoted 6 lines
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
Quoted 12 lines
----------------------------------------------
*Best Regards!*
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 51 lines · Lukasz Rymanowski
Hi Tony,
Quoted 34 lines · On Thu, Feb 12, 2015 at 3:22 AM, Zheng Tao-B46827 <[email protected]> wrote:
Hi, Lukasz
Quoted 30 lines · Lukasz Rymanowski
Hi,
Quoted 15 lines · On Wed, Feb 11, 2015 at 10:37 AM, Zheng Tao-B46827 <[email protected]> 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?Quoted 1 line
av connect 24:fd:52:b6:a0:99
connection_state: connection_state=BTAV_CONNECTION_STATE_CONNECTING remote_bd_addr=24:fd:52:b6:a0:99if_av->connect:BT_STATUS_SUCCESSQuoted 2 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-a2dp.c:a2dp_connect()Quoted 9 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_CONNECTEDQuoted 4 lines
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:99Quoted 1 line
I/bluetoothd( 1061): bluetoothd[1062]: Unable to find matching endpoint
Here is the clue.
Quoted 9 lines
Quoted 1 line
Can you provide btmon logs?
I found this log when execute av connect command:
< HCI Command: Disconnect (0x01|0x0006) plen 3 [hci0] 215.582054Handle: 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.
Quoted 8 lines
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".
Quoted 85 lines
Quoted 85 lines
Quoted 85 lines
Quoted 7 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESS remote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTEDQuoted 4 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1
\Łukasz
Quoted 76 lines · Lukasz Rymanowski
Quoted 74 lines
Hi Tony,
Quoted 15 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxxHere you should setup A2DP using "av connect <bdaddr>." (don't forget to do av init before.) Once you are connected you can open stream.
Quoted 22 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/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 ...Quoted 6 lines
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
Quoted 12 lines
----------------------------------------------
*Best Regards!*
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Tony,
Quoted 85 lines · On Mon, Mar 2, 2015 at 7:54 AM, Zheng Tao-B46827 <[email protected]> wrote:
Quoted 71 lines · Lukasz Rymanowski
Hi Tony,
Quoted 52 lines · On Thu, Feb 12, 2015 at 3:22 AM, Zheng Tao-B46827 <[email protected]> wrote:
Hi, Lukasz
Quoted 40 lines · Lukasz Rymanowski
Hi,
Quoted 34 lines · On Wed, Feb 11, 2015 at 10:37 AM, Zheng Tao-B46827 <[email protected]> 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?Quoted 1 line
av connect 24:fd:52:b6:a0:99
connection_state: connection_state=BTAV_CONNECTION_STATE_CONNECTING remote_bd_addr=24:fd:52:b6:a0:99if_av->connect:BT_STATUS_SUCCESSQuoted 3 lines
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_CONNECTEDQuoted 6 lines
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:99Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
I/bluetoothd( 1061): bluetoothd[1062]: Unable to find matching endpoint
Here is the clue.
Can you provide btmon logs?
Quoted 9 lines
I found this log when execute av connect command:
< HCI Command: Disconnect (0x01|0x0006) plen 3 [hci0] 215.582054Handle: 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.Quoted 8 lines
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
LukaszSorry to reply to you so late for Chinese New Year. Do you mean to follow steps like this:
Quoted 9 lines
1. bluetooth init
2. bluetooth enable
3. bluetoothget_profile_interfacea2dp
4. bluetoothstart_discovery
5. bluetoothcreate_bondxxxxxxxx
6. audio init
7. av connect xxxxxxxx
8. audioopen_output_stream
You got BT_STATUS_NOT_READY because a2dp was not initialized
Actually you should have smth like this:
1. bluetooth init
2. bluetooth enable
3. bluetooth get_profile_interface a2dp
4. bluetooth start_discovery
5. bluetooth create_bond xxxxxxxx
6. av init <--- this will initiate a2dp profile
7. audio init <--- this will setup endpoinds
8. av connect xxxxxxxx
9. audio open_output_stream
After that you can try:
10. audio play
If still there is some issue please send full logs
\Lukasz
Quoted 106 lines
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".Quoted 98 lines
Quoted 98 lines
Quoted 98 lines
Quoted 12 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESSremote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTED
Quoted 6 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1
\Łukasz
Quoted 84 lines · Lukasz Rymanowski
Quoted 81 lines
Hi Tony,
Quoted 18 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxxHere you should setup A2DP using "av connect <bdaddr>." (don't forget to do av init before.) Once you are connected you can open stream.
Quoted 23 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/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 ...Quoted 6 lines
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
Quoted 12 lines
----------------------------------------------
*Best Regards!*
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Tony,
Quoted 145 lines · On Mon, Mar 9, 2015 at 8:26 AM, Zheng Tao-B46827 <[email protected]> wrote:
Quoted 120 lines · Lukasz Rymanowski
Hi Tony,
Quoted 90 lines · On Mon, Mar 2, 2015 at 7:54 AM, Zheng Tao-B46827 <[email protected]> wrote:
Quoted 76 lines · Lukasz Rymanowski
Hi Tony,
Quoted 58 lines · On Thu, Feb 12, 2015 at 3:22 AM, Zheng Tao-B46827 <[email protected]> wrote:
Hi, Lukasz
Quoted 44 lines · Lukasz Rymanowski
Hi,
Quoted 38 lines · On Wed, Feb 11, 2015 at 10:37 AM, Zheng Tao-B46827 <[email protected]> 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?Quoted 1 line
av connect 24:fd:52:b6:a0:99
connection_state: connection_state=BTAV_CONNECTION_STATE_CONNECTING remote_bd_addr=24:fd:52:b6:a0:99if_av->connect:BT_STATUS_SUCCESSQuoted 3 lines
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_CONNECTEDQuoted 7 lines
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:99Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
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.582054Quoted 8 lines
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.Quoted 8 lines
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
LukaszSorry to reply to you so late for Chinese New Year. Do you mean to follow steps like this:
Quoted 9 lines
1. bluetooth init
2. bluetooth enable
3. bluetoothget_profile_interfacea2dp
4. bluetoothstart_discovery
5. bluetoothcreate_bondxxxxxxxx
6. audio init
7. av connect xxxxxxxx
8. audioopen_output_streamYou got
BT_STATUS_NOT_READYbecause a2dp was not initializedActually you should have smth like this:
1. bluetooth init
2. bluetooth enable
3. bluetoothget_profile_interfacea2dp
4. bluetoothstart_discovery
5. bluetoothcreate_bondxxxxxxxx6. av init <--- this will initiate a2dp profile
7. audio init <--- this will setup endpoinds
8. av connect xxxxxxxx
9. audioopen_output_streamQuoted 7 lines
After that you can try:
10. audio play
If still there is some issue please send full logs
\Lukasz
Sorry. I find that there are some wrong with my email client and you don't receive this email. So, resend this email. Thanks for your detailed steps. Through some tuning, I can connect to Jabra device, but it
open_output_streamfailed.
1. bluetooth init
2. bluetooth enable
3. bluetoothget_profile_interfacea2dp
4. bluetoothstart_discovery
5. bluetoothcreate_bondxxxxxxxx
6. audio init
7. av init
8. av connect xxxxxxxx
9. audioopen_output_stream
Quoted 6 lines
After executing "av connect", I can ensure that the connected state is stable(NO disconnected automatically), but it will prompt "/bluetoothd( 1109): bluetoothd[1110]:
SET_CONFIGURATIONrequest rejected: Configuration not supported (41)". When executing "audioopen_output_stream", it will prompt "I/bluetoothd( 1086): bluetoothd[1087]: Unable to find stream for endpoint 0". Is this a blueZ bug for Android?
This is actually interesting.
The only idea I have now is that there is something wrong with byte order
When you look into SET_CONFIGURATION package:
< ACL Data TX: Handle 71 flags 0x00 dlen 18 [hci0] 378.410443
Channel: 192 len 14 [PSM 25 mode 0] {chan 0}
20 03 04 04 01 00 07 06 00 00 12 51 02 35it seems like SBC codec information is switched. there is "12 51" probably should be "21 15".
With "12 51" block length, subband and allocation method are corrupted if I decode it correctly. That would explain why remote device reject those settings.
For what machine you are building? Could you check what endianness you are using (a2dp-codecs.h)?
\Łukasz
Quoted 118 lines
The attachment #1 is logcat information. #2 is btmon information.
Quoted 116 lines
Quoted 116 lines
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".Quoted 106 lines
Quoted 106 lines
Quoted 106 lines
Quoted 13 lines
acl_state_changed_cb: status=BT_STATUS_SUCCESSremote_bd_addr=24:fd:52:b6:a0:99 state=BT_ACL_STATE_DISCONNECTED
Quoted 7 lines
D/BlueZ ( 1060):
external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 1
\Łukasz
Quoted 91 lines · Lukasz Rymanowski
Quoted 88 lines
Hi Tony,
Quoted 20 lines · On Tue, Feb 10, 2015 at 2:51 AM, Zheng Tao-B46827 <[email protected]> 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
Quoted 8 lines
2.bluetooth enable
3.bluetooth
get_profile_interfacea2dp4.bluetooth
start_discovery5.bluetooth
create_bondxxxxxxxxHere you should setup A2DP using "av connect <bdaddr>." (don't forget
to do av init before.) Once you are connected you can open stream.Quoted 25 lines
6.audio init
7.audio
open_output_streamThen 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_cmdE/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 ...Quoted 8 lines
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
Quoted 12 lines
----------------------------------------------
*Best Regards!*
Tony Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html