Chapter 4
Software framework
4.1 Bluetooth LE & Bluetooth
4.1.1 When porting example gatt_server, an error occurred indicating head file does not
exist. What could be the reasons?
When porting example gatt_server, an error occurred as fatal error: esp_gap_ble_api.h:
No such file or directory, but this file is already included in the head file.
• Check sdkconfig to see whether sdkconfig.defaults is ported from the example or not. By default,
Bluetooth® is disabled in SDK and needs to be enabled manually.
• If you are using cmake, the link configurations in the CMakeLists.txt file should be copied from
the example too.
4.1.2 Does ESP32 support Bluetooth 5.0?
No, the ESP32 hardware only supports Bluetooth LE 4.2.
The ESP32 has passed the Bluetooth LE 5.0 certification, but some of its functions are still not supported
on ESP32 (there will be a future chip which supports all functions in Bluetooth LE 5.0).
4.1.3 After the Bluetooth® LE starts advertising, why some mobile phones cannot suc-
cessfully scan them?
• Please check whether your mobile phone supports Bluetooth LE function. Some mobile phones, such as
iPhones, display Classic Bluetooth only in "Settings"-> "Bluetooth"(by default), and the Bluetooth LE
advertisement will be filtered out.
• It is recommended to use a dedicated Bluetooth LE application to debug the Bluetooth LE function. For
example, LightBlue application can be used on iPhone.
• Please check whether the advertising packet conforms to the specified format. Mobile phones tend to filter out
packets that do not conform to the specified format and display only the correct ones.
43
Need help?
Do you have a question about the ESP and is the answer not in the manual?