From c445fe49fddb0045560a027c65e804d8d7baebbf Mon Sep 17 00:00:00 2001 From: Piyush Shah Date: Wed, 16 Mar 2022 14:43:52 +0530 Subject: [PATCH] claim_configs: Allow choosing between self/assisted claiming for esp32c3 and esp32s3 --- components/esp_rainmaker/Kconfig.projbuild | 58 +++++++++++++++------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/components/esp_rainmaker/Kconfig.projbuild b/components/esp_rainmaker/Kconfig.projbuild index 848e3b6..5db4a7f 100644 --- a/components/esp_rainmaker/Kconfig.projbuild +++ b/components/esp_rainmaker/Kconfig.projbuild @@ -1,12 +1,42 @@ menu "ESP RainMaker Config" - config ESP_RMAKER_SELF_CLAIM - bool "Use Self Claiming" - depends on IDF_TARGET_ESP32S2 - default y + choice ESP_RMAKER_CLAIM_TYPE + bool "Claiming Type" + default ESP_RMAKER_SELF_CLAIM if IDF_TARGET_ESP32S2 + default ESP_RMAKER_ASSISTED_CLAIM if !IDF_TARGET_ESP32S2 help - Use Self Claiming i.e. get the MQTT credentials - directly from the claiming service. + Claiming type to be used. + + config ESP_RMAKER_NO_CLAIM + bool "Do not use Claiming" + help + Do not use any claiming. The MQTT credentials need to + be pre-programmed for this to work. This should be used + for all private RainMaker deployments. + + config ESP_RMAKER_SELF_CLAIM + bool "Use Self Claiming" + depends on !IDF_TARGET_ESP32 + help + Use Self Claiming i.e. get the MQTT credentials + directly from the claiming service. + + config ESP_RMAKER_ASSISTED_CLAIM + bool "Use Assisted Claiming" + depends on BT_ENABLED && !IDF_TARGET_ESP32S2 + help + Use Assisted Claiming i.e. get the MQTT credentials + from the claiming service via assistance from clients, + like the phone apps. + + endchoice + + + config ESP_RMAKER_CLAIM_TYPE + int + default 0 if ESP_RMAKER_NO_CLAIM + default 1 if ESP_RMAKER_SELF_CLAIM + default 2 if ESP_RMAKER_ASSISTED_CLAIM config ESP_RMAKER_CLAIM_SERVICE_BASE_URL string "ESP RainMaker Claiming Service Base URL" @@ -15,16 +45,6 @@ menu "ESP RainMaker Config" help ESP RainMaker Claiming Service Base URL. - config ESP_RMAKER_ASSISTED_CLAIM - bool "Use Assisted Claiming" - depends on BT_ENABLED - select MBEDTLS_HARDWARE_MPI - default y - help - Use Assisted Claiming i.e. get the MQTT credentials - from the claiming service via assistance from clients, - like the phone apps. - config ESP_RMAKER_MQTT_HOST string "ESP RainMaker MQTT Host" depends on ESP_RMAKER_SELF_CLAIM || ESP_RMAKER_ASSISTED_CLAIM @@ -158,10 +178,10 @@ menu "ESP RainMaker Config" default 1024 range 512 LWIP_TCP_WND_DEFAULT help - Increasing this value beyond the default would speed up the OTA download process. - However, please ensure that your application has enough memory headroom to allow this, + Increasing this value beyond the default would speed up the OTA download process. + However, please ensure that your application has enough memory headroom to allow this, else, the OTA may fail. - + endmenu menu "ESP RainMaker Scheduling"