BLE: cannot convert std::string to String
- ESP32 core 3.x
You may see
Why it happens
- In ESP32 core 3.x, BLE functions use Arduino
Stringinstead ofstd::string.
How to fix it
- Change
std::string value = p->getValue();toString value = p->getValue();. - Or install ESP32 core 2.0.17.
It worked if: Verify passes.
Tutorials where it can happen
Seen in a real run (some lines are close variants of it). Produced with Arduino CLI 1.5.1 and ESP32 core 3.1.3. Sources: Arduino ESP32: moving from 2.x to 3.0.
Didn't help? Search another error or ask us.

