What can cause Nimble BLE read/writes to fail on ESP32?

kh13824
Posts: 10
Joined: Tue Oct 18, 2022 6:01 pm

What can cause Nimble BLE read/writes to fail on ESP32?

Postby kh13824 » Fri May 12, 2023 1:18 pm

I encountered an issue where my central device could connect to my peripheral but was unable to read any of my characteristics on my peripheral. I was initially able to connect and read my characteristics with no issues but eventually ended up with this issue. I was able to resolve this by completely erasing the flash on my esp32 and re-flashing the same firmware. My initial thoughts is that it could be memory related but I am not entirely sure. Could anyone who has worked with Nimble BLE have any input on what could cause this on an esp32? For more context I have my BLE operations running in a FreeRTOS task.

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: What can cause Nimble BLE read/writes to fail on ESP32?

Postby bidrohini » Fri May 12, 2023 2:44 pm

Memory issues could be one of the potential reasons. It's possible that your application is leaking memory or not freeing up memory properly, which can lead to memory fragmentation and eventually cause the BLE stack to behave unexpectedly. You can use heap memory profiling tools like ESP-IDF's heap_caps_get_free_size() function to check the available heap memory and identify any memory leaks or fragmentation issues.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 80 guests