Nimble BLE Not Working In ESP-IDF V4.2

jcolebaker
Posts: 65
Joined: Thu Mar 18, 2021 12:23 am

Nimble BLE Not Working In ESP-IDF V4.2

Postby jcolebaker » Fri May 21, 2021 1:32 am

Hi,

I am having problems establishing a BLE connection, using the Nimble BLE library under ESP-IDF release 4.2. I discovered this problem in our own project but I have been able to reproduce with the Nimble "blehr" demo app as well.

* Copy the "blehr" project from esp-idf\examples\bluetooth\nimble
* Build with Docker and ESP-IDF release 4.2:

Code: Select all

docker run --rm -v $PWD:/project -w /project espressif/idf:release-v4.2 idf.py build
* Flash the binaries to ESP32 board and reboot
* Scan using a BLE scanner app on an Android device
* See "blehr_sensor_1.0" (expected)
* Attempt to connect
* ESP32 log shows: "connection established; status=0"
* Scan app shows "Discovering services..."
* After approx 10s, scan app shows "Disconnected"
* ESP32 log shows: "disconnect; reason=520"
* Connect FAILS.

When I delete the "build" directory and repeat the above with espressif/idf:release-v4.1, it works correctly - i.e.

* Scan app shows "Discovering services..." for 1 - 2 seconds
* Scan app shows "Connected"
* Can see services, read, notify, etc.

I also tested by cloning esp-idf from github and checking out release/v4.x, and then builing and deploying the project from VSCode.

I encountered the same problem, i.e. connect fails when built with v4.2, but works with v4.1

ESP_Hrishi
Posts: 16
Joined: Fri Sep 28, 2018 3:06 am

Re: Nimble BLE Not Working In ESP-IDF V4.2

Postby ESP_Hrishi » Fri May 21, 2021 1:35 pm

Hey @jcolebaker

Thanks for reporting the issue. We have added a fix for the BLE connection issue in the `release/v4.2` branch of ESP-IDF. Can you please pull the latest code on that branch, update the submodules (git submodule update --init --recursive) and give it a try. It should work fine.

gnarly7
Posts: 1
Joined: Mon Feb 21, 2022 4:12 pm

Re: Nimble BLE Not Working In ESP-IDF V4.2

Postby gnarly7 » Mon Feb 21, 2022 4:19 pm

I'm seeing this issue on release/v4.4, but only on our latest batch of ESP32-WROOM-32D boards (our batch from our PCB manufacturer last Fall is not experiencing the same issue when connecting to the same BLE device). Do you know of any potential hardware changes that could influence this issue as well?

jcolebaker
Posts: 65
Joined: Thu Mar 18, 2021 12:23 am

Re: Nimble BLE Not Working In ESP-IDF V4.2

Postby jcolebaker » Thu Jun 02, 2022 11:31 pm

@gnarly7 No sorry, we have had no problem with BLE connections in ESP-IFD 4.3 or 4.4.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 95 guests