Configuring the Firmware using Bluetooth for ESP32
We are currently in the process of reshaping and making the Firmware configuration easier. The Android app is now oficially the default way to set up your display. But we will always keep the possibility to have also a version that uses a hardcoded C configuration since there are many use cases where the user does not have Android, or just wants to have a configuration like this per se, keeping in mind that ESP8266 has no bluetooth.
Configuring a Screen and WiFiIn 3 steps make a demo Screen
- Logged in CALE Admin section "WiFi"
Add 2 access points where the display can get online (ex. home WiFi, mobile hotspot)
- Add an API
Just add your Google Calendar or to start a HTML API with an image or title as content
- On the Screen config, select what WiFis you are going to use
This will generate a JSON configuration string.
In Screen Content partials add the API that you created in point 2
Send this configuration with Bluetooth to your ESP32 displayConfiguring the firmware boils down to 2 steps:
- Install the Android app
As a first step connect it with CALE scanning the QR code.
In the Backend: User Api QR code
- Select the Screen and the ESP32 Bluetooth target to configure in the app
Check that the JSON config is there and Send it to your device
CALE Android application
Please download the APK with your mobile browser and give it permissions:
CALE Android in Play store
CALE Android APK Releases Please use this version to get the latest APK if your version is < 1.1.3 and it does not come automatically from the Play store
Repository with the Bluetooth version of the Firmware
https://github.com/martinberlin/eink-calendar - master branchReady to be be configured using CALE ANDROID APP
- Receives 2 WiFi APS, screen_url and bearer token
- Saves this on preferences for next restart
Once WiFi is connected, Bluetooth is disconnected, since the ESP32 uses the same Antenna for both.
So if we want a reset method, you have two options, either get out of your WiFi area with your Epaper display.
Or if you want to reset it because you are compiling the Firmware for someone else, you can do a preferences.clear()
How to reset preferences
// Uncomment to force delete preferences // preferences.clear();But don't forget to leave it commented on the final compilation. Otherwise it will never save the WiFi credentials.
Sending the Config using Bluetooth
To connect the Android up just scan the QR Code provided in the Backend (Top menu User Api QR)
The App will take care of listing your Screens and prepare the JSON configuration to send to the ESP32.
As a preamble, to make sure you have the essential things set up, you can log in the CALE BACKEND and check that:
- Use the WiFi section you need at least one WiFi access point so your Epaper can get online (Ex. home/office)
- Go to Screen and on the list click on Config.
- The Bluetooth tab is the default and in a mobile request will come at the top.
- First two WiFi access points will be preselected, this is already send by the Android App automatically, no need to copy and paste
- Start the Eink Display, in the CALE ANDROID APP select the Bluetooth starting with CALE_*
- Accept Android pair request
- Click Send Config in the last step
That's it! The Epaper display should restart, connect to WiFi, and render your Screen.
Config optional settings
If you want to use an ESP32 Tinypico as the Epaper display controller,
we used unexpected maker library to get the minimal consumption. Please uncomment this define in Config.h to lower the deepsleep consumption
to 0.08 mA/hour: