-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Bluetooth SPP connection possible with IDF 4.3.2 (IDFGH-6766) #8394
Comments
I tried to disable SSP in the IDF Config (unset CONFIG_BT_SSP_ENABLED) - this seem to solve (work around) the issue. (Sorry, I also noticed that I already posted the config with disabled SSP in my initial issue description. The log is from a configuration with SSP enabled. The config is the one that works now for me) So, the problem is with SSP and some (old) bluetooth chip (that I don't know - and I can't access it (mix of epoxy, shrink tube, hot glue..), but I guess it is similar or the same chip as used in HC-05 or HC-06 modules. |
@euphi I tried between two ESP32 modules and found nothing wrong about |
With SSP disabled in sdkconfig, pairing works fine. However, with SSP enabled in config, pairing (or connecting to already paired device) does NOT work - even if I don't set SSP related configuration/parameters. (When using the Initiator example) - or no call to So, I think SSP has a negative impact on pairing/connecting on some BT device, even when SSP is not used. |
I want to establish a SPP connection from an ESP32 to a linux-pc with usb bt-dongle or raspberry pi zero w (both bluez). I'm having the same troubles as described by @euphi: I can reproduce the error in bt_spp_initiator when Secure Simple Pairing is enabled. Changing the spp_sec mode to NONE didn't change anything.
Logs:
Looks ais if it's from here, however the code didn't change recently. The program running on linux is the spp_echo_server: https://gist.github.com/ukBaz/217875c83c2535d22a16ba38fc8f2a91 bt_spp_initiator was additionaly modified to connect directly to a mac and not send too much data. Update: BT_BTM: btm_sec_l2cap_access_req: (initiator) remote features unknown!!sec_flags:0x88 persists for the bluetooth 2.0 USB dongles (Cambridge Silicon Radio, 0x0a12:0x0001) @BetterJincheng: it would be great if "btm_sec_l2cap_access_req: (initiator) remote features unknown!!" would trgger a callback function thanks! |
Environment
Development Kit: [ESP32-Devkit-V1]
Module or chip used: ESP32-WROOM-32|
IDF version: 4.3.2 (version.txt)
Build System: platformio
Compiler version xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2) 8.4.0
Operating System: Linux
Using an IDE?: not relevant
Power Supply: USB
platformio
Platformio Configuration (
platformio.ini
):Platformio Environment:
Problem Description
The "initiator" example can't connect to classic Bluetooth device.
There is already an issue for Arduino ESP32: espressif/arduino-esp32#6061
To investigate for that issue and exclude the IDF as root cause, I installed the IDF and tried the Initiator example.
It seems that the IDF has the same issue, as I can't connect to the device with the SPP Initiator example.
To rule out name resolving issue, I changed the code that it connect to a pre-configured adress, and then it is still not possible to complete connection.
I also asked a question at https://esp32.com/viewtopic.php?f=19&t=26042 - but there is no answer yet.
The log shows that a connection is initiated but then no serial connection is possible;
W (36287) BT_RFCOMM: port_rfc_closed RFCOMM connection in state 1 closed: Peer connection failed (res: 16)
Detailed Log:
SDK Config (bluetooth part only):
Code to reproduce this issue
https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator with modified name and adress.
For the log file I also changed the code so that no name resolving is used, but esp_spp_start_discovery is called with the adress directly.
(As a quick solution I start SPP discovery with first GAP discovery result and cancel discovery - so just some lines needed to be commented out:
Changed adresses/names in main.c:
adapted function for the try without GAP name resolving in main.c:
The text was updated successfully, but these errors were encountered: