Chapter 4
Software framework
4.1 Bluetooth LE & Bluetooth
4.1.1 When porting example gatt_server, an error occurred indicating head le 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 le is already included in the head le.
• Check sdkcong to see whether sdkcong.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 congurations in the CMakeLists.txt le 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 certication, 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 ltered 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 specied format. Mobile phones tend to lter out
packets that do not conform to the specied format and display only the correct ones.
43