When device is already provisioned, `wifi_prov_mgr_configure_sta` API call fails.
This happens because, provisioning manager is in uninitialized state.
We set Wi-Fi credetials directly using `esp_wifi_set_config` in that case.
Also removed error check on `wifi_prov_mgr_is_provisioned` API call, as for
IDF 4.x APIs return `ESP_ERR_INVALID_STATE`
1. ESP32C6 button configs for RGB LED and Boot GPIO
2. CI: Added entry for C6 in `.gitlab.yaml`
3. Added `partitions_4mb_optimised.csv` which uses flash to the full extent
- Created sdkconfig.defaults for esp32c6 and used partitions_4mb_optimised.csv as default
- This is made default for esp32c6 because, for esp32c6, image sizes exceed config from partitions.csv
4. Fixed matter examples CMakeLits.txt files for c6 support
- qrcode, ws2812_led and gpio_button moved to examples/common
- esp-insights and rmaker_common submodules updated
- json_generator and json_parser components copied from component
manager so that they can be used for component overrides
From IDF 5.1 and above, we are out of IRAM for ESP32.
Enabled FreeRTOS functions to flash option to save IRAM. This is same existing fix in other examples
Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
If local control is enabled via config option (CONFIG_ESP_RMAKER_LOCAL_CTRL_AUTO_ENABLE),
the enabling/disabling will happen internally and the behaviour will be
unchanged. However, if the config option is disabled, applications can
still call esp_rmaker_local_ctrl_enable/disable at runtime as and when
required, if CONFIG_ESP_RMAKER_LOCAL_CTRL_FEATURE_ENABLE option is enabled.
Note that the older config option CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE
has been renamed to CONFIG_ESP_RMAKER_LOCAL_CTRL_AUTO_ENABLE. However,
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE will also continue to work and
ensure backward compatibility
For BLE provisioning, adding some metadata in BLE advertisement can help
apps in filtering the scanned device list better, instead of relying
just on the prefix. It can also help show the device type even before
provisioning.
Metadata has been added in led_light and switch examples only, but can be
added in any other project too, as per the apps' requirement.
- Updated partitions.csv in all examples to use final
esp_secure_cert partition format.
- This option can only be enabled if claiming is disabled.
- The Rainmaker app will fall back to using NVS if it
fails to fetch from the `esp_secure_cert` partition.
This has been done to allow a common firmware to be built that
can run on both kinds of devices, i.e. ones that use NVS
and ones that use the `esp_secure_cert` partition.
Cause: A vicious cycle:
MQTT budget exceed error print getting logged into ESP-Insights.
When the RTC memory is full, this causes it to drop the message and
raise memory full event, which then taken action as reporting Insights
data immediately. This again causes MQTT budget exceed error!
The fix: Do not try to send message when budget is not available
Signed-off-by: Vikram <vikram.dattu@espressif.com>
This reverts commit 7c1e894fe0.
The commit needs to be reverted as IDF5.0 does not allow selecting
ESP_HTTPS_SERVER when MBEDTLS is in client only mode.
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y set to prevent IRAM overflow
on ESP32 with switch example using idf v5.0
Can be used in other projects too, if similar IRAM overflows are seen.
.. Since this is the recommended setting and well supported by the
RainMaker SDK, to ensure that OTA upgrades do not break the device
and ensure that the MQTT connection works fine with the new firmware.
- OTA using topics is now enabled in all examples
- esp_rmaker_ota_enable_default() is the simplified API that enables
OTA using Topics with the default server certificates
Instead of using 1 or 2 certificates for server authentication, use a
bundle of commonly used server certificates, so that even if the server
moves to a different signing authority, the device connection is not
affected.
This change has been done for claiming, OTA and MQTT certificates.
Earlier example used a local certificate just for demo purposes.
However, since the RainMaker OTA server is the default server anyways,
it's better to use that same default certificate.
Earlier, a reset and reboot were required if wrong Wi-Fi credentials
were given during provisioning. With this change, based on some
configured number of reconnection attempts, the firmware will go back into
provisioning mode.
- Provide an option of provisioning without PoP pin (use with caution).
- Config option for provisioning timeout (set to 30 min by default).
Useful especially when there is no PoP, and so you want to keep the device
in provisioning mode only for a few minutes after boot up.