ESP32 WiFi setup over BLE (ESP32 code)

Most small applications that we write have the WiFi credentials integrated in the code. But sometimes you do not want to have your WiFi credentials in the source code, specially if it is open source and maybe accessible as a repository on Github or Bitbucket. Having the WiFi credentials in the code is as well not practical if you sell your devices to others that need to setup the WiFi credentials according to their local network. There are several solutions

Read more

Initialize Bluetooth Serial and BLE server

If both BLE and Bluetooth are required to operate in the code, the initialization sequence seems to be critical. Complete initialization of a BLE server and then separate initialization of Bluetooth Serial didn’t work. The correct sequence seems to be

Here is a code extract that worked for me

Full code example for the initialization can be found in this Github repo.

Read more

ESP32 Bluetooth Serial and BLE server running together

There is a new kid coming into the arduino-esp32 world. A Bluetooth Serial library that allows you to use Bluetooth (not BLE) like a serial port. This way you can connect the ESP32 over Bluetooth to an Android app like the Serial Bluetooth Terminal and use it as a serial in/out interface. The library is not yet in the arduino-esp32 repository, but I grabbed a preview from copercini’s repo. It is working fine, I could connect my Android tablet to my

Read more

Deep-Sleep needs WiFi and Bluetooth switched OFF for low current consumption

rudi48 made some investigations regarding power saving during deep sleep here. Summary: To achieve maximum power saving during deep sleep it is necessary to switch off Bluetooth and WiFi before calling esp_deep_sleep_start(); Example:

 

Read more

ESP32 BLE server

I wanted to try out the BLE capabilities of the ESP32. I will not go into deep explanations how BLE works. Adafruit has a nice tutorial that explains details. To learn about BLE, check out the Introduction to Bluetooth Low Energy. As I have temperature and humidity sensors attached the logical step would be to set it up as an environment sensor. I checked  the Bluetooth GATT services to find out if there is something matching defined. And there is

Read more
Free Link Directory