After a few days of trial & error, I could program my WeAct ESP32 C3 & C6 boards with the Rainmaker Framework.
Here are some tips that might be helpful for building this type of project.
Two nice tutorials (Getting Started):
- On/Off Switch
- On/Off Switch
- Temperature Device
- Humidity Device
I) ESP32 Core Version Matters
At first I didn't realize that my Arduino IDE had ESP32 Core 3.1.3 installed. Each Core version contains libraries for specific ESP32 boards, for example:
Core 3.0.1 to 3.1.3 support WeAct ESP32 C3 (the product name is listed for selection)
Core 2.0.17 only generic board names are listed e.g. ESP32C3 Dev Module
Even the "Rainmaker" sketch can be compiled and uploaded successfully, but it may not run. Errors could range from nothing appears, looping, and Claiming failure:
esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00
RainMaker esp-tls: create_ssl_handle failed
This happens because each ESP32 device requires a RIGHT ESP32 Core version !! There was a thread here.
Pick a right ESP32 Core version (for correct flash memory generation):
ESP32 C3 - v 2.0.17
ESP32 C6 - v 3.x
However, the board name profile may not support the Rainmaker Framework. For example, when you choose the Board Name WeAct ESP32 C3 (Core 3.x), there will be no Rainmaker entry in the Partition Scheme.
The ESP32 C3 Dev Module should be used instead. And the flash works.
Nonetheless, the WeAct ESP32 C6 is not listed in any Core version, choose the ESP32 C6 Dev Module instead. BTW, the ESP32 C6 Dev is not listed in the low 3.x versions.
II) ESP32 Wi-Fi Provisioning Trick
All Rainmaker ESP32 devices utilize wi-fi provisioning method. A QR code will be generated once the device runs. Once the wi-fi is setup, credential stored on the device, the QR code will not show again.
My WeAct ESP32 C3 runs after pressing the reset button, while my C6 requires power toggle. This is weird !
In order to start wi-fi provisioning again, the credential must be removed from the device by Erase All Flash Before Sketch Upload
There is also the procedure "Holding the Boot Button for 3s" when powering the device, for resetting the wi-fi credential.
The generated text-based QR code must be copied from the Serial Monitor to any text editor for easy scanning. However, coding update may not need to do reprovisioning, just uploading the new sketch and reset the device.
These are the very first basic steps to make your Rainmaker project dance.