38 Commits

Author SHA1 Message Date
Piyush Shah
23123e3a2d esp32c5: Added default config for binary size optimisation
And also make esp32c5 part of standard esp-idf release/v5.5 CI builds
2025-12-19 23:52:32 +05:30
Piyush Shah
da838cbf13 rmaker_common: Remove the submodule and its references 2025-11-13 09:42:38 +05:30
Piyush Shah
8a816fc6c3 examples: Update the names for the common example components 2025-11-13 09:42:38 +05:30
Piyush Shah
a640b220de examples: Remove dependency on ws2812 and ledc components
- Use led_indicator component from component manager for ws2812 and RGB
  LEDs
- Add other components from examples/common via idf_component.yml
  instead of adding as EXTRA_COMPONENT_DIRS in CMakeLists.txt
2025-11-11 19:56:43 +05:30
Piyush Shah
efcb15b137 cleanup: Remove Makefile related files as it is not supported any more
ESP IDF has moved to CMake since long back and these files were anyways
unused
2025-08-29 19:52:06 +05:30
Piyush Shah
f6e07b593e examples: Configure ESP32-C5 GPIO defaults for examples
- Set button GPIO to 28 for ESP32-C5 devkit (vs GPIO 9 for other C-series)
- Set WS2812 LED GPIO to 27 for ESP32-C5 devkit (vs GPIO 8 for other C-series)
- Updated examples: gpio, switch, multi_device, temperature_sensor, fan, led_light
2025-06-09 17:44:47 +05:30
Piyush Shah
b5e1a46591 examples: Changes for component manager based builds 2025-03-25 17:54:31 +05:30
Vikram Dattu
54554b6c8a Provide correct default BOOT pin config for ESP32-H2 2024-10-17 14:30:16 +05:30
Vikram Dattu
66160cdaf7 Changed default partion csv file to partions_4mb_optimised.csv
- With newest IDF releases with recent feature additions, the app partitions were getting overflown.
 - This optimised partions file make fullest use of flash. Hence we get more room for app partitions.
2024-10-15 18:06:42 +05:30
Vikram Dattu
3e375f43f6 Enable Insights command response module
- Updated esp_insights submodule and the component version dependency
 - Selected `ESP_INSIGHTS_TRANSPORT_MQTT` in examples sdkconfig.defaults
 - Called esp_insights_cmd_resp_enable

 - Also updated `cli` submodule to the latest
2024-08-22 10:32:54 +05:30
WanqQixiang
aa6dcdf559 example: Update examples to use app_network for Thread provisioning 2024-08-06 16:29:35 +08:00
Vikram Dattu
5dccee9eac examples: Add support for esp32c2
- Added entry for esp32c2 build in CI
- RAM optimized sdkconfig.defaults.esp32c2
- Disable ws2812 led drivers from non-rmt supported devices
- Use GPIO9 as BOOT button for C2
2024-05-09 20:38:11 +05:30
Piyush Shah
798825b07d bugfix: ci failures were seen for esp32s2
- Due to some changes in esp-idf after v5.1.3, CONFIG_BT_ENABLED gets set
even for esp32s2, causing issues in compilation.
 - In earlier esp-idf versions, since this was not applicable for esp32-s2,
it was getting skipped even when it was present in sdkconfig.defaults.
 - Added sdkconfig.defaults.esp32s2 and disabled BT explicitly
2024-03-08 20:30:19 +05:30
Vikram Dattu
f1d16cf736 examples: Added support for ESP32C6
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
2023-10-26 17:38:53 +05:30
Vikram Dattu
c43cd071fa IRAM optimization fix for ESP32 to all examples
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>
2023-09-15 16:18:47 +05:30
sanket.wadekar
ed52355881 feature: Add APIs to enable/disable local control.
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
2023-09-08 23:46:21 +05:30
Dhaval Gujar
741b2c64a1 Adds support for using esp_secure_cert_mgr for TLS credentials
- 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.
2023-03-30 22:23:17 +05:30
Vikram
3dc25a47c5 Revert "examples: Disable mbedTLS server config to reduce firmware size"
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.
2023-01-17 17:31:50 +05:30
yuanjianmin
7c1e894fe0 examples: Disable mbedTLS server config to reduce firmware size 2022-11-08 19:00:54 +08:00
Piyush Shah
cd173972a7 examples: Enable CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE in all examples
.. 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.
2022-07-13 21:56:04 +05:30
Piyush Shah
ef410e14b0 ota: Make "OTA using Topics" as default and provide a simplified API for that
- 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
2022-06-06 20:37:17 +05:30
Piyush Shah
93a2b36160 ssl_server_cert: Use mbedtls certificate bundle for server authentication
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.
2022-05-05 19:06:28 +05:30
Piyush Shah
229713488c examples: Enable some security features and change order of component dirs
Features now enabled by default are:

- User id check in user-node association for better handling of reset to
factory from security perspective.
- Secure local control

Order of component dirs has been changed so that the rmaker_common from
esp-rainmker gets used, rather than the one from esp-insights
2022-01-25 13:59:28 +05:30
Shubham Patil
e69372a2fe examples: Fixed typos in comment 2021-09-09 10:53:31 +05:30
Piyush Shah
0c84527cfb esp_insights: Add facility to enable esp_insights in the examples
Please check out CHANGES.md as this commit may break your existing
projects' compilation.
2021-07-06 00:39:07 +05:30
Piyush Shah
332c6e7d58 examples: Increase FreeRTOS timer stack size
Button event callbacks are executed in the context of FreeRTOS Timer task.
Reporting param updates from that causes stack overflow, specifically on ESP32-C3.
As a temporary workaround, the stack size for FreeRTOS Timer task has been increased.
2021-03-23 01:25:02 +05:30
Piyush Shah
8854443e4e examples: Use FreeRTOS timer instead of esp_timer for periodic tasks
esp_timer is generally recommended when high precision is required.
However, since that is not the case for periodic reporting of temperature
values, replaced it with freeRTOS Timer.
2021-03-23 01:24:39 +05:30
Piyush Shah
86b4dbbd68 examples: Changes for the ESP32-C3, primarily for Boot button
And some other minor changes
- Corrected comments in example READMEs and sdkconfig.defaults
- Duplicate macro in homekit_switch removed
2021-02-09 22:32:03 +05:30
Piyush Shah
fd094fb045 Miscellaneous minor fixes 2020-11-12 17:19:46 +05:30
Piyush Shah
f4767018f9 ws2812_led: Simplify WS2812 RGB LED handling logic and also allow disabling it
The common code for WS2812 RGB LED has been moved to a component ws2812_led.

The WS2812 LED is available only on ESP32-S2-Saola-1 boards and hence
it will be enabled only if IDF target is set to ESP32S2. It can
be disabled by disabling the CONFIG_WS2812_LED_ENABLE config option.

led_strip component files have also been moved to ws2812_led
2020-09-01 16:07:57 +05:30
Piyush Shah
196bcb2d41 examples: Use the new wifi-reset and factory-reset APIs 2020-08-21 23:21:53 +05:30
Shubham Patil
e19abab592 wifi_provisioning: Use a random pop instead of creating it from MAC address
MAC address is a public information and can also be sniffed easily. Creating the proof of
possession pin from that is not secure enough. Instead, a random stream of bytes is now generated
and stored in the fctry partition during claiming and that is used for the PoP.
2020-08-05 23:12:08 +05:30
Piyush Shah
a3a1d05531 esp_rainmaker_core: Code restructure and API changes
- APIs and data structures changed to a more object oriented approach.
- Some internal files split into multiple files to separate out functionality
  of node, device and parameter.
- A new doc file CHANGES.md added to help understand the changes.
- Modified all the examples as per these changes in the RainMaker APIs.
2020-07-31 16:16:21 +05:30
Chirag Atal
227a705430 app_wifi: Add support for BLE based provisioning. 2020-06-22 18:51:08 +05:30
Chirag Atal
34da10fde3 sdkconfig: Enabling dynamic allocation and freeing of mbedtls buffers. 2020-05-27 17:40:36 +05:30
Chirag Atal
2ee8c6f21f cmakelists: Minor: Removing the comment that it has been created from makefile. 2020-05-14 15:26:07 +05:30
Piyush Shah
cdb696649b app_wifi: Move the code to a common folder as it is same across all examples 2020-04-22 22:08:34 +08:00
Piyush Shah
72242952a2 esp_rainmaker: Add various required components, examples and CLI 2020-04-16 04:13:35 +05:30