ESP32 ESP32C3 board newer than 2.0.0 has BLE bug, but 2.0.0 is OK.

vk3drb
Posts: 13
Joined: Wed Oct 20, 2021 9:42 am

Re: ESP32 ESP32C3 board newer than 2.0.0 has BLE bug, but 2.0.0 is OK.

Postby vk3drb » Tue Sep 13, 2022 5:43 am

Hi Chegewara,

THANK YOU!!!!! :D

It fixed the problem. Effectively I just removed the deinit and init; and added the esp_ble_gap_set_device_name and it works fine.

Obviously between 2.0.0 and 2.0.4 something had changed. It now runs 2.0.4 nicely.

Whilst doing this fix earlier, your code did not initially work. I had changed the ESP board driver from 2.0.0. to 2.0.4 during the IDE session. The bizarre issue was the serial port if (inChar == '\n') was being evaluated as false when the inChar was in fact line feed, despite the serial port working fine. I even scoped the serial feed and did an echo using Serial.print() to prove the program was receiving a linefeed character. The cause can only be a compiler issue. Maybe I should have thought of restarting the IDE when I changed the ESP32 driver. I did that and it all works fine now.

I don't know who you are, who your work for, or what country you live in, but your help has been really appreciated. I owe you a beer. I also notice your expertise has helped many other folks in this forum.

warm regards,
David

Who is online

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