A2DP Source Example - SDP connection error
Posted: Sun Dec 30, 2018 5:26 pm
Hi all - first off, apologies if I was unable to find an existing post on this subject, but I did spend a few minutes searching. I am trying to stream audio to a Bluetooth speaker using an ESP-WROOM-32 dev board.
I have tested the speaker using a Windows 10 laptop and an Android phone - both are able to use the speaker to play audio with no PIN or special pairing setup outside of selecting the device from a list.
I am using the example here: https://github.com/espressif/esp-idf/tr ... 2dp_source
I have modified the hardcoded device name "ESP_SPEAKER" to the name of my speaker. The following is the serial monitor output with speaker MAC masked.
I found this issue on GitHub: https://github.com/espressif/esp-idf/issues/2116 - unfortunately it doesn't seem to apply, as according to: http://bluetooth-pentest.narod.ru/softw ... rator.html the Class of Device value 0x240404 indicates "Audio" and "Rendering."
The "connecting to peer" through "SDP - Rcvd conn cnf" lines then repeat for at least 20 loops.
I found this issue on GitHub: https://github.com/espressif/esp-idf/issues/2116 - unfortunately it doesn't seem to apply, as according to: http://bluetooth-pentest.narod.ru/softw ... rator.html the Class of Device value 0x240404 indicates "Audio" and "Rendering."
Where I got stuck is:
My understanding of SDP is hazy at best, and the only place I could find that specific log message is https://github.com/mozilla-b2g/platform ... sdp_main.c.
Is there anything apparent to you that I am doing wrong, or anything I should try in terms of diagnostics or different code approaches?
Thanks for your time.
I have tested the speaker using a Windows 10 laptop and an Android phone - both are able to use the speaker to play audio with no PIN or special pairing setup outside of selecting the device from a list.
I am using the example here: https://github.com/espressif/esp-idf/tr ... 2dp_source
I have modified the hardcoded device name "ESP_SPEAKER" to the name of my speaker. The following is the serial monitor output with speaker MAC masked.
Code: Select all
I (196) BTDM_INIT: BT controller compile version [7b0770a]
I (196) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (256) phy: phy_version: 4000, b6198fa, Sep 3 2018, 15:11:06, 0, 0
I (736) BT_AV: Starting device discovery...
I (746) BT_AV: Discovery started.
I (3606) BT_AV: Scanned device: c0:0e:aa:aa:aa:aa
I (3606) BT_AV: --Class of Device: 0x240404
I (3606) BT_AV: --RSSI: -41
I (3616) BT_AV: Found a target device, address c0:0e:aa:aa:aa:aa, name Speaker
I (3626) BT_AV: Cancel device discovery ...
I (3626) BT_AV: Device discovery stopped.
I (3636) BT_AV: a2dp connecting to peer: Speaker
E (3636) BT_APPL: reset flags
I (3646) BT_AV: bt_app_av_sm_hdlr state 4, evt 0x0
I (10736) BT_AV: bt_app_av_sm_hdlr state 4, evt 0xff00
I (20736) BT_AV: bt_app_av_sm_hdlr state 4, evt 0xff00
I (30736) BT_AV: bt_app_av_sm_hdlr state 3, evt 0xff00
I (30736) BT_AV: a2dp connecting to peer: c0:0e:aa:aa:aa:aa
I (40736) BT_AV: bt_app_av_sm_hdlr state 4, evt 0xff00
W (41166) BT_SDP: SDP - Rcvd conn cnf with error: 0x8 CID 0x40
W (41176) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2
I (41176) BT_AV: bt_app_av_sm_hdlr state 4, evt 0x0
I (50736) BT_AV: bt_app_av_sm_hdlr state 3, evt 0xff00
I (50736) BT_AV: a2dp connecting to peer: c0:0e:aa:aa:aa:aa
I (50736) BT_AV: bt_app_av_sm_hdlr state 4, evt 0x0
I (60736) BT_AV: bt_app_av_sm_hdlr state 4, evt 0xff00
I (70736) BT_AV: bt_app_av_sm_hdlr state 4, evt 0xff00
I (80736) BT_AV: bt_app_av_sm_hdlr state 3, evt 0xff00
I (80736) BT_AV: a2dp connecting to peer: c0:0e:aa:aa:aa:aa
W (88026) BT_SDP: SDP - Rcvd conn cnf with error: 0x8 CID 0x41
The "connecting to peer" through "SDP - Rcvd conn cnf" lines then repeat for at least 20 loops.
I found this issue on GitHub: https://github.com/espressif/esp-idf/issues/2116 - unfortunately it doesn't seem to apply, as according to: http://bluetooth-pentest.narod.ru/softw ... rator.html the Class of Device value 0x240404 indicates "Audio" and "Rendering."
Where I got stuck is:
Code: Select all
W (41166) BT_SDP: SDP - Rcvd conn cnf with error: 0x8 CID 0x40
Is there anything apparent to you that I am doing wrong, or anything I should try in terms of diagnostics or different code approaches?
Thanks for your time.