From 167fb6c43c3a9c1c5a51af57d3e28e9e3729f392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Fri, 7 Nov 2025 10:45:47 +0100 Subject: [PATCH 01/38] feat(zibgee): Add IASZone enroll request and restore + error check fixes (#11990) * feat(zibgee): Add requestIASZoneEnroll + error check fixes * fix: Spelling Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(zigbee): Remove transaction sequence logging * feat(zigbee): Add restoreIASZone from flash method * docs(zigbee): Add docs for new methods * feat(zigbee): Update checking logic * fix: Fix memcpy and update docs * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- docs/en/zigbee/ep_contact_switch.rst | 43 ++++++++++-- docs/en/zigbee/ep_door_window_handle.rst | 43 ++++++++++-- docs/en/zigbee/ep_vibration_sensor.rst | 37 +++++++++- .../Zigbee_Contact_Switch.ino | 40 ++++++++++- .../Zigbee_Vibration_Sensor.ino | 40 ++++++++++- libraries/Zigbee/keywords.txt | 3 + .../Zigbee/src/ep/ZigbeeContactSwitch.cpp | 70 +++++++++++++++---- libraries/Zigbee/src/ep/ZigbeeContactSwitch.h | 12 ++++ .../Zigbee/src/ep/ZigbeeDoorWindowHandle.cpp | 53 +++++++++++++- .../Zigbee/src/ep/ZigbeeDoorWindowHandle.h | 12 ++++ .../Zigbee/src/ep/ZigbeeVibrationSensor.cpp | 58 +++++++++++++-- .../Zigbee/src/ep/ZigbeeVibrationSensor.h | 14 +++- 12 files changed, 390 insertions(+), 35 deletions(-) diff --git a/docs/en/zigbee/ep_contact_switch.rst b/docs/en/zigbee/ep_contact_switch.rst index f7f6dc15c66..50844cdd180 100644 --- a/docs/en/zigbee/ep_contact_switch.rst +++ b/docs/en/zigbee/ep_contact_switch.rst @@ -63,6 +63,17 @@ Sets the contact switch to open state. This function will return ``true`` if successful, ``false`` otherwise. +report +^^^^^^ + +Manually reports the current contact state. + +.. code-block:: arduino + + bool report(); + +This function will return ``true`` if successful, ``false`` otherwise. + setIASClientEndpoint ^^^^^^^^^^^^^^^^^^^^ @@ -74,16 +85,38 @@ Sets the IAS Client endpoint number (default is 1). * ``ep_number`` - IAS Client endpoint number -report -^^^^^^ +requestIASZoneEnroll +^^^^^^^^^^^^^^^^^^^^ -Manually reports the current contact state. +Requests a new IAS Zone enrollment. Can be called to enroll a new device or to re-enroll an already enrolled device. .. code-block:: arduino - bool report(); + bool requestIASZoneEnroll(); -This function will return ``true`` if successful, ``false`` otherwise. +This function will return ``true`` if the enrollment request was sent successfully, ``false`` otherwise. The actual enrollment status should be checked using the ``enrolled()`` method after waiting for the enrollment response. + +restoreIASZoneEnroll +^^^^^^^^^^^^^^^^^^^^ + +Restores IAS Zone enrollment from stored attributes. This method should be called after rebooting an already enrolled device. It restores the enrollment information from flash memory, which is faster for sleepy devices compared to requesting a new enrollment. + +.. code-block:: arduino + + bool restoreIASZoneEnroll(); + +This function will return ``true`` if the enrollment was successfully restored, ``false`` otherwise. The enrollment information (zone ID and IAS CIE address) must be available in the device's stored attributes for this to succeed. + +enrolled +^^^^^^^^ + +Checks if the device is currently enrolled in the IAS Zone. + +.. code-block:: arduino + + bool enrolled(); + +This function returns ``true`` if the device is enrolled, ``false`` otherwise. Use this method to check the enrollment status after calling ``requestIASZoneEnroll()`` or ``restoreIASZoneEnroll()``. Example ------- diff --git a/docs/en/zigbee/ep_door_window_handle.rst b/docs/en/zigbee/ep_door_window_handle.rst index 53203f463dd..b2339d681a5 100644 --- a/docs/en/zigbee/ep_door_window_handle.rst +++ b/docs/en/zigbee/ep_door_window_handle.rst @@ -67,6 +67,17 @@ Sets the door/window handle to tilted position. This function will return ``true`` if successful, ``false`` otherwise. +report +^^^^^^ + +Manually reports the current handle position. + +.. code-block:: arduino + + bool report(); + +This function will return ``true`` if successful, ``false`` otherwise. + setIASClientEndpoint ^^^^^^^^^^^^^^^^^^^^ @@ -78,16 +89,38 @@ Sets the IAS Client endpoint number (default is 1). * ``ep_number`` - IAS Client endpoint number -report -^^^^^^ +requestIASZoneEnroll +^^^^^^^^^^^^^^^^^^^^ -Manually reports the current handle position. +Requests a new IAS Zone enrollment. Can be called to enroll a new device or to re-enroll an already enrolled device. .. code-block:: arduino - bool report(); + bool requestIASZoneEnroll(); -This function will return ``true`` if successful, ``false`` otherwise. +This function will return ``true`` if the enrollment request was sent successfully, ``false`` otherwise. The actual enrollment status should be checked using the ``enrolled()`` method after waiting for the enrollment response. + +restoreIASZoneEnroll +^^^^^^^^^^^^^^^^^^^^ + +Restores IAS Zone enrollment from stored attributes. This method should be called after rebooting an already enrolled device. It restores the enrollment information from flash memory, which is faster for sleepy devices compared to requesting a new enrollment. + +.. code-block:: arduino + + bool restoreIASZoneEnroll(); + +This function will return ``true`` if the enrollment was successfully restored, ``false`` otherwise. The enrollment information (zone ID and IAS CIE address) must be available in the device's stored attributes for this to succeed. + +enrolled +^^^^^^^^ + +Checks if the device is currently enrolled in the IAS Zone. + +.. code-block:: arduino + + bool enrolled(); + +This function returns ``true`` if the device is enrolled, ``false`` otherwise. Use this method to check the enrollment status after calling ``requestIASZoneEnroll()`` or ``restoreIASZoneEnroll()``. Example ------- diff --git a/docs/en/zigbee/ep_vibration_sensor.rst b/docs/en/zigbee/ep_vibration_sensor.rst index 896c4672c6d..d8ca3fdd5f4 100644 --- a/docs/en/zigbee/ep_vibration_sensor.rst +++ b/docs/en/zigbee/ep_vibration_sensor.rst @@ -73,9 +73,42 @@ Manually reports the current vibration state. .. code-block:: arduino - void report(); + bool report(); -This function does not return a value. +This function will return ``true`` if successful, ``false`` otherwise. + +requestIASZoneEnroll +^^^^^^^^^^^^^^^^^^^^ + +Requests a new IAS Zone enrollment. Can be called to enroll a new device or to re-enroll an already enrolled device. + +.. code-block:: arduino + + bool requestIASZoneEnroll(); + +This function will return ``true`` if the enrollment request was sent successfully, ``false`` otherwise. The actual enrollment status should be checked using the ``enrolled()`` method after waiting for the enrollment response. + +restoreIASZoneEnroll +^^^^^^^^^^^^^^^^^^^^ + +Restores IAS Zone enrollment from stored attributes. This method should be called after rebooting an already enrolled device. It restores the enrollment information from flash memory, which is faster for sleepy devices compared to requesting a new enrollment. + +.. code-block:: arduino + + bool restoreIASZoneEnroll(); + +This function will return ``true`` if the enrollment was successfully restored, ``false`` otherwise. The enrollment information (zone ID and IAS CIE address) must be available in the device's stored attributes for this to succeed. + +enrolled +^^^^^^^^ + +Checks if the device is currently enrolled in the IAS Zone. + +.. code-block:: arduino + + bool enrolled(); + +This function returns ``true`` if the device is enrolled, ``false`` otherwise. Use this method to check the enrollment status after calling ``requestIASZoneEnroll()`` or ``restoreIASZoneEnroll()``. Example ------- diff --git a/libraries/Zigbee/examples/Zigbee_Contact_Switch/Zigbee_Contact_Switch.ino b/libraries/Zigbee/examples/Zigbee_Contact_Switch/Zigbee_Contact_Switch.ino index ce9eedb683d..1a84c4d7471 100644 --- a/libraries/Zigbee/examples/Zigbee_Contact_Switch/Zigbee_Contact_Switch.ino +++ b/libraries/Zigbee/examples/Zigbee_Contact_Switch/Zigbee_Contact_Switch.ino @@ -31,17 +31,25 @@ #endif #include "Zigbee.h" +#include /* Zigbee contact sensor configuration */ -#define CONTACT_SWITCH_ENDPOINT_NUMBER 10 +#define CONTACT_SWITCH_ENDPOINT_NUMBER 1 uint8_t button = BOOT_PIN; uint8_t sensor_pin = 4; ZigbeeContactSwitch zbContactSwitch = ZigbeeContactSwitch(CONTACT_SWITCH_ENDPOINT_NUMBER); +/* Preferences for storing ENROLLED flag to persist across reboots */ +Preferences preferences; + void setup() { Serial.begin(115200); + preferences.begin("Zigbee", false); // Save ENROLLED flag in flash so it persists across reboots + bool enrolled = preferences.getBool("ENROLLED"); // Get ENROLLED flag from preferences + preferences.end(); + // Init button + switch pinMode(button, INPUT_PULLUP); pinMode(sensor_pin, INPUT_PULLUP); @@ -67,6 +75,31 @@ void setup() { delay(100); } Serial.println(); + + // Check if device has been enrolled before restarting - if so, restore IAS Zone enroll, otherwise request new IAS Zone enroll + if (enrolled) { + Serial.println("Device has been enrolled before - restoring IAS Zone enrollment"); + zbContactSwitch.restoreIASZoneEnroll(); + } else { + Serial.println("Device is factory new - first time joining network - requesting new IAS Zone enrollment"); + zbContactSwitch.requestIASZoneEnroll(); + } + + while (!zbContactSwitch.enrolled()) { + Serial.print("."); + delay(100); + } + Serial.println(); + Serial.println("Zigbee enrolled successfully!"); + + // Store ENROLLED flag only if this was a new enrollment (previous flag was false) + // Skip writing if we just restored enrollment (flag was already true) + if (!enrolled) { + preferences.begin("Zigbee", false); + preferences.putBool("ENROLLED", true); // set ENROLLED flag to true + preferences.end(); + Serial.println("ENROLLED flag saved to preferences"); + } } void loop() { @@ -91,6 +124,11 @@ void loop() { if ((millis() - startTime) > 3000) { // If key pressed for more than 3secs, factory reset Zigbee and reboot Serial.println("Resetting Zigbee to factory and rebooting in 1s."); + // Clear the ENROLLED flag from preferences + preferences.begin("Zigbee", false); + preferences.putBool("ENROLLED", false); // set ENROLLED flag to false + preferences.end(); + Serial.println("ENROLLED flag cleared from preferences"); delay(1000); Zigbee.factoryReset(); } diff --git a/libraries/Zigbee/examples/Zigbee_Vibration_Sensor/Zigbee_Vibration_Sensor.ino b/libraries/Zigbee/examples/Zigbee_Vibration_Sensor/Zigbee_Vibration_Sensor.ino index d9ac7b6e241..b3fc6b9d18b 100644 --- a/libraries/Zigbee/examples/Zigbee_Vibration_Sensor/Zigbee_Vibration_Sensor.ino +++ b/libraries/Zigbee/examples/Zigbee_Vibration_Sensor/Zigbee_Vibration_Sensor.ino @@ -31,17 +31,25 @@ #endif #include "Zigbee.h" +#include /* Zigbee vibration sensor configuration */ -#define VIBRATION_SENSOR_ENDPOINT_NUMBER 10 +#define VIBRATION_SENSOR_ENDPOINT_NUMBER 1 uint8_t button = BOOT_PIN; uint8_t sensor_pin = 4; ZigbeeVibrationSensor zbVibrationSensor = ZigbeeVibrationSensor(VIBRATION_SENSOR_ENDPOINT_NUMBER); +/* Preferences for storing ENROLLED flag to persist across reboots */ +Preferences preferences; + void setup() { Serial.begin(115200); + preferences.begin("Zigbee", false); // Save ENROLLED flag in flash so it persists across reboots + bool enrolled = preferences.getBool("ENROLLED"); // Get ENROLLED flag from preferences + preferences.end(); + // Init button + sensor pinMode(button, INPUT_PULLUP); pinMode(sensor_pin, INPUT); @@ -67,6 +75,31 @@ void setup() { delay(100); } Serial.println(); + + // Check if device has been enrolled before restarting - if so, restore IAS Zone enroll, otherwise request new IAS Zone enroll + if (enrolled) { + Serial.println("Device has been enrolled before - restoring IAS Zone enrollment"); + zbVibrationSensor.restoreIASZoneEnroll(); + } else { + Serial.println("Device is factory new - first time joining network - requesting new IAS Zone enrollment"); + zbVibrationSensor.requestIASZoneEnroll(); + } + + while (!zbVibrationSensor.enrolled()) { + Serial.print("."); + delay(100); + } + Serial.println(); + Serial.println("Zigbee enrolled successfully!"); + + // Store ENROLLED flag only if this was a new enrollment (previous flag was false) + // Skip writing if we just restored enrollment (flag was already true) + if (!enrolled) { + preferences.begin("Zigbee", false); + preferences.putBool("ENROLLED", true); // set ENROLLED flag to true + preferences.end(); + Serial.println("ENROLLED flag saved to preferences"); + } } void loop() { @@ -95,6 +128,11 @@ void loop() { if ((millis() - startTime) > 3000) { // If key pressed for more than 3secs, factory reset Zigbee and reboot Serial.println("Resetting Zigbee to factory and rebooting in 1s."); + // Clear the ENROLLED flag from preferences + preferences.begin("Zigbee", false); + preferences.putBool("ENROLLED", false); // set ENROLLED flag to false + preferences.end(); + Serial.println("ENROLLED flag cleared from preferences"); delay(1000); Zigbee.factoryReset(); } diff --git a/libraries/Zigbee/keywords.txt b/libraries/Zigbee/keywords.txt index 44067fc4886..c940d85d4d1 100644 --- a/libraries/Zigbee/keywords.txt +++ b/libraries/Zigbee/keywords.txt @@ -209,6 +209,9 @@ setIASClientEndpoint KEYWORD2 setClosed KEYWORD2 setOpen KEYWORD2 setTilted KEYWORD2 +requestIASZoneEnroll KEYWORD2 +restoreIASZoneEnroll KEYWORD2 +enrolled KEYWORD2 # ZigbeeVibrationSensor setVibration KEYWORD2 diff --git a/libraries/Zigbee/src/ep/ZigbeeContactSwitch.cpp b/libraries/Zigbee/src/ep/ZigbeeContactSwitch.cpp index 4142f87fe16..35e05afb290 100644 --- a/libraries/Zigbee/src/ep/ZigbeeContactSwitch.cpp +++ b/libraries/Zigbee/src/ep/ZigbeeContactSwitch.cpp @@ -31,6 +31,7 @@ ZigbeeContactSwitch::ZigbeeContactSwitch(uint8_t endpoint) : ZigbeeEP(endpoint) _zone_status = 0; _zone_id = 0xff; _ias_cie_endpoint = 1; + _enrolled = false; //Create custom contact switch configuration zigbee_contact_switch_cfg_t contact_switch_cfg = ZIGBEE_DEFAULT_CONTACT_SWITCH_CONFIG(); @@ -44,15 +45,16 @@ void ZigbeeContactSwitch::setIASClientEndpoint(uint8_t ep_number) { } bool ZigbeeContactSwitch::setClosed() { + esp_zb_zcl_status_t ret = ESP_ZB_ZCL_STATUS_SUCCESS; log_v("Setting Contact switch to closed"); uint8_t closed = 0; // ALARM1 = 0, ALARM2 = 0 esp_zb_lock_acquire(portMAX_DELAY); - esp_err_t ret = esp_zb_zcl_set_attribute_val( + ret = esp_zb_zcl_set_attribute_val( _endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONESTATUS_ID, &closed, false ); esp_zb_lock_release(); - if (ret != ESP_OK) { - log_e("Failed to set contact switch to closed: 0x%x: %s", ret, esp_err_to_name(ret)); + if (ret != ESP_ZB_ZCL_STATUS_SUCCESS) { + log_e("Failed to set contact switch to closed: 0x%x: %s", ret, esp_zb_zcl_status_to_name(ret)); return false; } _zone_status = closed; @@ -60,15 +62,16 @@ bool ZigbeeContactSwitch::setClosed() { } bool ZigbeeContactSwitch::setOpen() { + esp_zb_zcl_status_t ret = ESP_ZB_ZCL_STATUS_SUCCESS; log_v("Setting Contact switch to open"); uint8_t open = ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_ALARM1 | ESP_ZB_ZCL_IAS_ZONE_ZONE_STATUS_ALARM2; // ALARM1 = 1, ALARM2 = 1 esp_zb_lock_acquire(portMAX_DELAY); - esp_err_t ret = esp_zb_zcl_set_attribute_val( + ret = esp_zb_zcl_set_attribute_val( _endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONESTATUS_ID, &open, false ); esp_zb_lock_release(); - if (ret != ESP_OK) { - log_e("Failed to set contact switch to open: 0x%x: %s", ret, esp_err_to_name(ret)); + if (ret != ESP_ZB_ZCL_STATUS_SUCCESS) { + log_e("Failed to set contact switch to open: 0x%x: %s", ret, esp_zb_zcl_status_to_name(ret)); return false; } _zone_status = open; @@ -90,12 +93,8 @@ bool ZigbeeContactSwitch::report() { status_change_notif_cmd.delay = 0; esp_zb_lock_acquire(portMAX_DELAY); - esp_err_t ret = esp_zb_zcl_ias_zone_status_change_notif_cmd_req(&status_change_notif_cmd); + esp_zb_zcl_ias_zone_status_change_notif_cmd_req(&status_change_notif_cmd); //return transaction sequence number, ignore it esp_zb_lock_release(); - if (ret != ESP_OK) { - log_e("Failed to send IAS Zone status changed notification: 0x%x: %s", ret, esp_err_to_name(ret)); - return false; - } log_v("IAS Zone status changed notification sent"); return true; } @@ -115,11 +114,58 @@ void ZigbeeContactSwitch::zbIASZoneEnrollResponse(const esp_zb_zcl_ias_zone_enro ); esp_zb_lock_release(); _zone_id = message->zone_id; + _enrolled = true; } - } else { log_w("Received message ignored. Cluster ID: %d not supported for On/Off Light", message->info.cluster); } } +bool ZigbeeContactSwitch::requestIASZoneEnroll() { + esp_zb_zcl_ias_zone_enroll_request_cmd_t enroll_request; + enroll_request.zcl_basic_cmd.src_endpoint = _endpoint; + enroll_request.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT; + enroll_request.zone_type = ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_CONTACT_SWITCH; + enroll_request.manuf_code = 0; + + esp_zb_lock_acquire(portMAX_DELAY); + esp_zb_zcl_ias_zone_enroll_cmd_req(&enroll_request); //return transaction sequence number, ignore it + esp_zb_lock_release(); + log_v("IAS Zone enroll request sent"); + return true; +} + +bool ZigbeeContactSwitch::restoreIASZoneEnroll() { + esp_zb_lock_acquire(portMAX_DELAY); + esp_zb_zcl_attr_t *ias_cie_attr = + esp_zb_zcl_get_attribute(_endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_IAS_CIE_ADDRESS_ID); + esp_zb_zcl_attr_t *zone_id_attr = + esp_zb_zcl_get_attribute(_endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONEID_ID); + esp_zb_lock_release(); + + if (ias_cie_attr == NULL || ias_cie_attr->data_p == NULL) { + log_e("Failed to restore IAS Zone enroll: ias cie address attribute not found"); + return false; + } + if (zone_id_attr == NULL || zone_id_attr->data_p == NULL) { + log_e("Failed to restore IAS Zone enroll: zone id attribute not found"); + return false; + } + + memcpy(_ias_cie_addr, (esp_zb_ieee_addr_t *)ias_cie_attr->data_p, sizeof(esp_zb_ieee_addr_t)); + _zone_id = (*(uint8_t *)zone_id_attr->data_p); + + log_d( + "Restored IAS Zone enroll: zone id(%d), ias cie address(%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X)", _zone_id, _ias_cie_addr[0], _ias_cie_addr[1], + _ias_cie_addr[2], _ias_cie_addr[3], _ias_cie_addr[4], _ias_cie_addr[5], _ias_cie_addr[6], _ias_cie_addr[7] + ); + + if (_zone_id == 0xFF) { + log_e("Failed to restore IAS Zone enroll: zone id not valid"); + return false; + } + _enrolled = true; + return true; +} + #endif // CONFIG_ZB_ENABLED diff --git a/libraries/Zigbee/src/ep/ZigbeeContactSwitch.h b/libraries/Zigbee/src/ep/ZigbeeContactSwitch.h index b3be38c3eb4..002ed722d78 100644 --- a/libraries/Zigbee/src/ep/ZigbeeContactSwitch.h +++ b/libraries/Zigbee/src/ep/ZigbeeContactSwitch.h @@ -70,12 +70,24 @@ class ZigbeeContactSwitch : public ZigbeeEP { // Report the contact switch value, done automatically after setting the position bool report(); + // Request a new IAS zone enroll, can be called to enroll a new device or to re-enroll an already enrolled device + bool requestIASZoneEnroll(); + + // Restore IAS Zone enroll, needed to be called after rebooting already enrolled device - restored from flash memory (faster for sleepy devices) + bool restoreIASZoneEnroll(); + + // Check if the device is enrolled in the IAS Zone + bool enrolled() { + return _enrolled; + } + private: void zbIASZoneEnrollResponse(const esp_zb_zcl_ias_zone_enroll_response_message_t *message) override; uint8_t _zone_status; uint8_t _zone_id; esp_zb_ieee_addr_t _ias_cie_addr; uint8_t _ias_cie_endpoint; + bool _enrolled; }; #endif // CONFIG_ZB_ENABLED diff --git a/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.cpp b/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.cpp index 2ca032b01e5..2a3a5c80498 100644 --- a/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.cpp +++ b/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.cpp @@ -31,6 +31,7 @@ ZigbeeDoorWindowHandle::ZigbeeDoorWindowHandle(uint8_t endpoint) : ZigbeeEP(endp _zone_status = 0; _zone_id = 0xff; _ias_cie_endpoint = 1; + _enrolled = false; //Create custom door window handle configuration zigbee_door_window_handle_cfg_t door_window_handle_cfg = ZIGBEE_DEFAULT_DOOR_WINDOW_HANDLE_CONFIG(); @@ -108,9 +109,8 @@ bool ZigbeeDoorWindowHandle::report() { status_change_notif_cmd.zone_id = _zone_id; status_change_notif_cmd.delay = 0; - //NOTE: Check result of esp_zb_zcl_ias_zone_status_change_notif_cmd_req() and return true if success, false if failure esp_zb_lock_acquire(portMAX_DELAY); - esp_zb_zcl_ias_zone_status_change_notif_cmd_req(&status_change_notif_cmd); + esp_zb_zcl_ias_zone_status_change_notif_cmd_req(&status_change_notif_cmd); //return transaction sequence number, ignore it esp_zb_lock_release(); log_v("IAS Zone status changed notification sent"); return true; @@ -131,11 +131,58 @@ void ZigbeeDoorWindowHandle::zbIASZoneEnrollResponse(const esp_zb_zcl_ias_zone_e ); esp_zb_lock_release(); _zone_id = message->zone_id; + _enrolled = true; } - } else { log_w("Received message ignored. Cluster ID: %d not supported for On/Off Light", message->info.cluster); } } +bool ZigbeeDoorWindowHandle::requestIASZoneEnroll() { + esp_zb_zcl_ias_zone_enroll_request_cmd_t enroll_request; + enroll_request.zcl_basic_cmd.src_endpoint = _endpoint; + enroll_request.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT; + enroll_request.zone_type = ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_DOOR_WINDOW_HANDLE; + enroll_request.manuf_code = 0; + + esp_zb_lock_acquire(portMAX_DELAY); + esp_zb_zcl_ias_zone_enroll_cmd_req(&enroll_request); //return transaction sequence number, ignore it + esp_zb_lock_release(); + log_v("IAS Zone enroll request sent"); + return true; +} + +bool ZigbeeDoorWindowHandle::restoreIASZoneEnroll() { + esp_zb_lock_acquire(portMAX_DELAY); + esp_zb_zcl_attr_t *ias_cie_attr = + esp_zb_zcl_get_attribute(_endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_IAS_CIE_ADDRESS_ID); + esp_zb_zcl_attr_t *zone_id_attr = + esp_zb_zcl_get_attribute(_endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONEID_ID); + esp_zb_lock_release(); + + if (ias_cie_attr == NULL || ias_cie_attr->data_p == NULL) { + log_e("Failed to restore IAS Zone enroll: ias cie address attribute not found"); + return false; + } + if (zone_id_attr == NULL || zone_id_attr->data_p == NULL) { + log_e("Failed to restore IAS Zone enroll: zone id attribute not found"); + return false; + } + + memcpy(_ias_cie_addr, (esp_zb_ieee_addr_t *)ias_cie_attr->data_p, sizeof(esp_zb_ieee_addr_t)); + _zone_id = (*(uint8_t *)zone_id_attr->data_p); + + log_d( + "Restored IAS Zone enroll: zone id(%d), ias cie address(%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X)", _zone_id, _ias_cie_addr[0], _ias_cie_addr[1], + _ias_cie_addr[2], _ias_cie_addr[3], _ias_cie_addr[4], _ias_cie_addr[5], _ias_cie_addr[6], _ias_cie_addr[7] + ); + + if (_zone_id == 0xFF) { + log_e("Failed to restore IAS Zone enroll: zone id not valid"); + return false; + } + _enrolled = true; + return true; +} + #endif // CONFIG_ZB_ENABLED diff --git a/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.h b/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.h index d4a2d81eb39..cfaf7e772a0 100644 --- a/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.h +++ b/libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.h @@ -74,12 +74,24 @@ class ZigbeeDoorWindowHandle : public ZigbeeEP { // Report the door/window handle value, done automatically after setting the position bool report(); + // Request a new IAS zone enroll, can be called to enroll a new device or to re-enroll an already enrolled device + bool requestIASZoneEnroll(); + + // Restore IAS Zone enroll, needed to be called after rebooting already enrolled device - restored from flash memory (faster for sleepy devices) + bool restoreIASZoneEnroll(); + + // Check if the device is enrolled in the IAS Zone + bool enrolled() { + return _enrolled; + } + private: void zbIASZoneEnrollResponse(const esp_zb_zcl_ias_zone_enroll_response_message_t *message) override; uint8_t _zone_status; uint8_t _zone_id; esp_zb_ieee_addr_t _ias_cie_addr; uint8_t _ias_cie_endpoint; + bool _enrolled; }; #endif // CONFIG_ZB_ENABLED diff --git a/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.cpp b/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.cpp index 218638ed3cb..a9fd437a2c6 100644 --- a/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.cpp +++ b/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.cpp @@ -31,6 +31,7 @@ ZigbeeVibrationSensor::ZigbeeVibrationSensor(uint8_t endpoint) : ZigbeeEP(endpoi _zone_status = 0; _zone_id = 0xff; _ias_cie_endpoint = 1; + _enrolled = false; //Create custom vibration sensor configuration zigbee_vibration_sensor_cfg_t vibration_sensor_cfg = ZIGBEE_DEFAULT_VIBRATION_SENSOR_CONFIG(); @@ -57,11 +58,10 @@ bool ZigbeeVibrationSensor::setVibration(bool sensed) { return false; } _zone_status = vibration; - report(); - return true; + return report(); } -void ZigbeeVibrationSensor::report() { +bool ZigbeeVibrationSensor::report() { /* Send IAS Zone status changed notification command */ esp_zb_zcl_ias_zone_status_change_notif_cmd_t status_change_notif_cmd; @@ -75,9 +75,10 @@ void ZigbeeVibrationSensor::report() { status_change_notif_cmd.delay = 0; esp_zb_lock_acquire(portMAX_DELAY); - esp_zb_zcl_ias_zone_status_change_notif_cmd_req(&status_change_notif_cmd); + esp_zb_zcl_ias_zone_status_change_notif_cmd_req(&status_change_notif_cmd); //return transaction sequence number, ignore it esp_zb_lock_release(); log_v("IAS Zone status changed notification sent"); + return true; } void ZigbeeVibrationSensor::zbIASZoneEnrollResponse(const esp_zb_zcl_ias_zone_enroll_response_message_t *message) { @@ -95,11 +96,58 @@ void ZigbeeVibrationSensor::zbIASZoneEnrollResponse(const esp_zb_zcl_ias_zone_en ); esp_zb_lock_release(); _zone_id = message->zone_id; + _enrolled = true; } - } else { log_w("Received message ignored. Cluster ID: %d not supported for On/Off Light", message->info.cluster); } } +bool ZigbeeVibrationSensor::requestIASZoneEnroll() { + esp_zb_zcl_ias_zone_enroll_request_cmd_t enroll_request; + enroll_request.zcl_basic_cmd.src_endpoint = _endpoint; + enroll_request.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT; + enroll_request.zone_type = ESP_ZB_ZCL_IAS_ZONE_ZONETYPE_VIBRATION_MOVEMENT; + enroll_request.manuf_code = 0; + + esp_zb_lock_acquire(portMAX_DELAY); + esp_zb_zcl_ias_zone_enroll_cmd_req(&enroll_request); //return transaction sequence number, ignore it + esp_zb_lock_release(); + log_v("IAS Zone enroll request sent"); + return true; +} + +bool ZigbeeVibrationSensor::restoreIASZoneEnroll() { + esp_zb_lock_acquire(portMAX_DELAY); + esp_zb_zcl_attr_t *ias_cie_attr = + esp_zb_zcl_get_attribute(_endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_IAS_CIE_ADDRESS_ID); + esp_zb_zcl_attr_t *zone_id_attr = + esp_zb_zcl_get_attribute(_endpoint, ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE, ESP_ZB_ZCL_CLUSTER_SERVER_ROLE, ESP_ZB_ZCL_ATTR_IAS_ZONE_ZONEID_ID); + esp_zb_lock_release(); + + if (ias_cie_attr == NULL || ias_cie_attr->data_p == NULL) { + log_e("Failed to restore IAS Zone enroll: ias cie address attribute not found"); + return false; + } + if (zone_id_attr == NULL || zone_id_attr->data_p == NULL) { + log_e("Failed to restore IAS Zone enroll: zone id attribute not found"); + return false; + } + + memcpy(_ias_cie_addr, (esp_zb_ieee_addr_t *)ias_cie_attr->data_p, sizeof(esp_zb_ieee_addr_t)); + _zone_id = (*(uint8_t *)zone_id_attr->data_p); + + log_d( + "Restored IAS Zone enroll: zone id(%d), ias cie address(%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X)", _zone_id, _ias_cie_addr[0], _ias_cie_addr[1], + _ias_cie_addr[2], _ias_cie_addr[3], _ias_cie_addr[4], _ias_cie_addr[5], _ias_cie_addr[6], _ias_cie_addr[7] + ); + + if (_zone_id == 0xFF) { + log_e("Failed to restore IAS Zone enroll: zone id not valid"); + return false; + } + _enrolled = true; + return true; +} + #endif // CONFIG_ZB_ENABLED diff --git a/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.h b/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.h index 9757257b5c1..a819be0ba8f 100644 --- a/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.h +++ b/libraries/Zigbee/src/ep/ZigbeeVibrationSensor.h @@ -65,7 +65,18 @@ class ZigbeeVibrationSensor : public ZigbeeEP { bool setVibration(bool sensed); // Report the vibration sensor value, done automatically after setting the sensed value - void report(); + bool report(); + + // Request a new IAS zone enroll, can be called to enroll a new device or to re-enroll an already enrolled device + bool requestIASZoneEnroll(); + + // Restore IAS Zone enroll, needed to be called after rebooting already enrolled device - restored from flash memory (faster for sleepy devices) + bool restoreIASZoneEnroll(); + + // Check if the device is enrolled in the IAS Zone + bool enrolled() { + return _enrolled; + } private: void zbIASZoneEnrollResponse(const esp_zb_zcl_ias_zone_enroll_response_message_t *message) override; @@ -73,6 +84,7 @@ class ZigbeeVibrationSensor : public ZigbeeEP { uint8_t _zone_id; esp_zb_ieee_addr_t _ias_cie_addr; uint8_t _ias_cie_endpoint; + bool _enrolled; }; #endif // CONFIG_ZB_ENABLED From 420adcec15824be02b610b9f5eb0643852496efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Fri, 7 Nov 2025 10:48:00 +0100 Subject: [PATCH 02/38] fix(sdmmc): Fix iomux pin initialization (#11998) --- libraries/SD_MMC/src/SD_MMC.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/libraries/SD_MMC/src/SD_MMC.cpp b/libraries/SD_MMC/src/SD_MMC.cpp index 2d840556c3e..12ab2b565eb 100644 --- a/libraries/SD_MMC/src/SD_MMC.cpp +++ b/libraries/SD_MMC/src/SD_MMC.cpp @@ -228,17 +228,19 @@ bool SDMMCFS::begin(const char *mountpoint, bool mode1bit, bool format_if_mount_ #if defined(CONFIG_IDF_TARGET_ESP32P4) && defined(BOARD_SDMMC_SLOT) && (BOARD_SDMMC_SLOT == 0) host.slot = SDMMC_HOST_SLOT_0; // reconfigure slot_config to remove all pins in order to use IO_MUX + // Use 0 instead of GPIO_NUM_NC (-1) because ESP-IDF's s_check_pin_not_set() + // function uses !pin which doesn't work correctly with -1 (GPIO_NUM_NC) slot_config = sdmmc_slot_config_t{ - .clk = GPIO_NUM_NC, - .cmd = GPIO_NUM_NC, - .d0 = GPIO_NUM_NC, - .d1 = GPIO_NUM_NC, - .d2 = GPIO_NUM_NC, - .d3 = GPIO_NUM_NC, - .d4 = GPIO_NUM_NC, - .d5 = GPIO_NUM_NC, - .d6 = GPIO_NUM_NC, - .d7 = GPIO_NUM_NC, + .clk = GPIO_NUM_0, + .cmd = GPIO_NUM_0, + .d0 = GPIO_NUM_0, + .d1 = GPIO_NUM_0, + .d2 = GPIO_NUM_0, + .d3 = GPIO_NUM_0, + .d4 = GPIO_NUM_0, + .d5 = GPIO_NUM_0, + .d6 = GPIO_NUM_0, + .d7 = GPIO_NUM_0, .cd = SDMMC_SLOT_NO_CD, .wp = SDMMC_SLOT_NO_WP, .width = 4, From 0ae08381ecc72aab3df07b0426fa0cb9f5b5132b Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Fri, 7 Nov 2025 11:53:20 -0300 Subject: [PATCH 03/38] fix(ci): Fix IDF examples compilation when changing source files --- .github/scripts/get_affected.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/scripts/get_affected.py b/.github/scripts/get_affected.py index a7d993c4be3..136b4dc044b 100755 --- a/.github/scripts/get_affected.py +++ b/.github/scripts/get_affected.py @@ -790,6 +790,19 @@ def find_affected_sketches(changed_files: list[str]) -> None: print(f"Total affected sketches: {len(affected_sketches)}", file=sys.stderr) return + # For component mode: if any *source code* file (not example or documentation) changed, recompile all examples + if component_mode: + for file in changed_files: + if (is_source_file(file) or is_header_file(file)) and not file.endswith(".ino"): + if file.startswith("cores/") or file.startswith("libraries/"): + print("Component mode: file changed in cores/ or libraries/ - recompiling all IDF component examples", file=sys.stderr) + all_examples = list_idf_component_examples() + for example in all_examples: + if example not in affected_sketches: + affected_sketches.append(example) + print(f"Total affected IDF component examples: {len(affected_sketches)}", file=sys.stderr) + return + preprocess_changed_files(changed_files) # Normal dependency-based analysis for non-critical changes From 5521e02627fa6909818d7d12657b59814a506198 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Sun, 9 Nov 2025 16:56:25 +0200 Subject: [PATCH 04/38] feat(net): Add method Network.isOnline() (#12000) * feat(net): Add method Network.isOnline() * fix(net): Fix typo * feat(net): Check connection status in isOnline method --- libraries/Network/src/NetworkManager.cpp | 12 ++++++++++++ libraries/Network/src/NetworkManager.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/libraries/Network/src/NetworkManager.cpp b/libraries/Network/src/NetworkManager.cpp index 12276b2e242..a19cf52dd87 100644 --- a/libraries/Network/src/NetworkManager.cpp +++ b/libraries/Network/src/NetworkManager.cpp @@ -185,6 +185,18 @@ NetworkInterface *NetworkManager::getDefaultInterface() { return NULL; } +bool NetworkManager::isOnline() { + for (int i = 0; i < ESP_NETIF_ID_MAX; ++i) { + if (i != ESP_NETIF_ID_AP) { + NetworkInterface *iface = getNetifByID((Network_Interface_ID)i); + if (iface != NULL && iface->connected() && (iface->hasIP() || iface->hasGlobalIPv6())) { + return true; + } + } + } + return false; +} + size_t NetworkManager::printTo(Print &out) const { size_t bytes = 0; diff --git a/libraries/Network/src/NetworkManager.h b/libraries/Network/src/NetworkManager.h index 6b9d5e16cfc..063de721792 100644 --- a/libraries/Network/src/NetworkManager.h +++ b/libraries/Network/src/NetworkManager.h @@ -22,6 +22,9 @@ class NetworkManager : public NetworkEvents, public Printable { bool setDefaultInterface(NetworkInterface &ifc); NetworkInterface *getDefaultInterface(); + // Returns true if any interface (except AP) has assigned IPv4 or global IPv6 + bool isOnline(); + size_t printTo(Print &out) const; static const char *getHostname(); From 46302559b2bf09297850aa0e7e2364bf9e49ef47 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Mon, 10 Nov 2025 07:25:31 -0300 Subject: [PATCH 05/38] feat(matter): Adds doc URL ref to examples README.md files (#11997) --- .../examples/MatterColorLight/README.md | 6 + .../examples/MatterCommissionTest/README.md | 4 + .../examples/MatterComposedLights/README.md | 8 + .../examples/MatterContactSensor/README.md | 6 + .../examples/MatterDimmableLight/README.md | 6 + .../MatterEnhancedColorLight/README.md | 6 + .../Matter/examples/MatterEvents/README.md | 4 + libraries/Matter/examples/MatterFan/README.md | 6 + .../examples/MatterHumiditySensor/README.md | 6 + .../README.md | 5 + .../Matter/examples/MatterMinimum/README.md | 5 + .../examples/MatterOccupancySensor/README.md | 6 + .../examples/MatterOnIdentify/README.md | 6 + .../examples/MatterOnOffLight/README.md | 6 + .../examples/MatterOnOffPlugin/README.md | 6 + .../examples/MatterPressureSensor/README.md | 6 + .../examples/MatterSmartButton/README.md | 6 + .../examples/MatterTemperatureLight/README.md | 6 + .../MatterTemperatureSensor/README.md | 6 + .../examples/MatterThermostat/README.md | 6 + .../examples/MatterThreadLight/README.md | 242 ------------------ 21 files changed, 116 insertions(+), 242 deletions(-) delete mode 100644 libraries/Matter/examples/MatterThreadLight/README.md diff --git a/libraries/Matter/examples/MatterColorLight/README.md b/libraries/Matter/examples/MatterColorLight/README.md index 03a5928cd27..4d9e39e4f75 100644 --- a/libraries/Matter/examples/MatterColorLight/README.md +++ b/libraries/Matter/examples/MatterColorLight/README.md @@ -159,6 +159,12 @@ The MatterColorLight example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Color Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_color_light.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterCommissionTest/README.md b/libraries/Matter/examples/MatterCommissionTest/README.md index 52b2b1eb8e6..db5d0e158ea 100644 --- a/libraries/Matter/examples/MatterCommissionTest/README.md +++ b/libraries/Matter/examples/MatterCommissionTest/README.md @@ -146,6 +146,10 @@ The MatterCommissionTest example consists of the following main components: - **No serial output**: Check baudrate (115200) and USB connection - **Device keeps decommissioning**: This is expected behavior - the device automatically decommissions after 30 seconds to allow continuous testing +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterComposedLights/README.md b/libraries/Matter/examples/MatterComposedLights/README.md index cea56d0151a..96446810f9f 100644 --- a/libraries/Matter/examples/MatterComposedLights/README.md +++ b/libraries/Matter/examples/MatterComposedLights/README.md @@ -170,6 +170,14 @@ The MatterComposedLights example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter On/Off Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_on_off_light.html) +- [Matter Dimmable Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_dimmable_light.html) +- [Matter Color Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_color_light.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterContactSensor/README.md b/libraries/Matter/examples/MatterContactSensor/README.md index 3f7e73b4788..0f54a8f0010 100644 --- a/libraries/Matter/examples/MatterContactSensor/README.md +++ b/libraries/Matter/examples/MatterContactSensor/README.md @@ -167,6 +167,12 @@ The MatterContactSensor example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Contact Sensor Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_contact_sensor.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterDimmableLight/README.md b/libraries/Matter/examples/MatterDimmableLight/README.md index 0879ae2171d..f1381b2641c 100644 --- a/libraries/Matter/examples/MatterDimmableLight/README.md +++ b/libraries/Matter/examples/MatterDimmableLight/README.md @@ -165,6 +165,12 @@ The MatterDimmableLight example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Dimmable Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_dimmable_light.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterEnhancedColorLight/README.md b/libraries/Matter/examples/MatterEnhancedColorLight/README.md index 59ddc3a2166..100c216cedf 100644 --- a/libraries/Matter/examples/MatterEnhancedColorLight/README.md +++ b/libraries/Matter/examples/MatterEnhancedColorLight/README.md @@ -172,6 +172,12 @@ The MatterEnhancedColorLight example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Enhanced Color Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_enhanced_color_light.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterEvents/README.md b/libraries/Matter/examples/MatterEvents/README.md index 724e3e73cdb..985fb8748e5 100644 --- a/libraries/Matter/examples/MatterEvents/README.md +++ b/libraries/Matter/examples/MatterEvents/README.md @@ -176,6 +176,10 @@ The MatterEvents example consists of the following main components: - **No serial output**: Check baudrate (115200) and USB connection - **Device keeps decommissioning**: This is expected behavior - the device automatically decommissions after 60 seconds to allow continuous testing and event monitoring +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterFan/README.md b/libraries/Matter/examples/MatterFan/README.md index 89889ace3d6..cae9e15ba5f 100644 --- a/libraries/Matter/examples/MatterFan/README.md +++ b/libraries/Matter/examples/MatterFan/README.md @@ -189,6 +189,12 @@ The MatterFan example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Fan Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_fan.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterHumiditySensor/README.md b/libraries/Matter/examples/MatterHumiditySensor/README.md index 940516a2194..838073093cf 100644 --- a/libraries/Matter/examples/MatterHumiditySensor/README.md +++ b/libraries/Matter/examples/MatterHumiditySensor/README.md @@ -186,6 +186,12 @@ The MatterHumiditySensor example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Humidity Sensor Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_humidity_sensor.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterLambdaSingleCallbackManyEPs/README.md b/libraries/Matter/examples/MatterLambdaSingleCallbackManyEPs/README.md index f31732d66d6..62c923e3655 100644 --- a/libraries/Matter/examples/MatterLambdaSingleCallbackManyEPs/README.md +++ b/libraries/Matter/examples/MatterLambdaSingleCallbackManyEPs/README.md @@ -200,6 +200,11 @@ The MatterLambdaSingleCallbackManyEPs example consists of the following main com - **No serial output**: Check baudrate (115200) and USB connection - **Compilation errors with lambda functions**: Ensure you're using a C++11 compatible compiler (ESP32 Arduino Core 2.0+ supports this) +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterMinimum/README.md b/libraries/Matter/examples/MatterMinimum/README.md index a91fa651954..b3687718543 100644 --- a/libraries/Matter/examples/MatterMinimum/README.md +++ b/libraries/Matter/examples/MatterMinimum/README.md @@ -166,6 +166,11 @@ This minimal example can be extended with additional features: - **No serial output**: Check baudrate (115200) and USB connection - **LED not turning on/off**: Ensure the device is commissioned and you're controlling it via a Matter app. The minimal example only responds to Matter controller commands, not local button presses +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterOccupancySensor/README.md b/libraries/Matter/examples/MatterOccupancySensor/README.md index f83dafc4c4f..cb38c63ac6a 100644 --- a/libraries/Matter/examples/MatterOccupancySensor/README.md +++ b/libraries/Matter/examples/MatterOccupancySensor/README.md @@ -262,6 +262,12 @@ The MatterOccupancySensor example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Occupancy Sensor Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_occupancy_sensor.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterOnIdentify/README.md b/libraries/Matter/examples/MatterOnIdentify/README.md index 06d6732466f..ce873f9397f 100644 --- a/libraries/Matter/examples/MatterOnIdentify/README.md +++ b/libraries/Matter/examples/MatterOnIdentify/README.md @@ -208,6 +208,12 @@ The MatterOnIdentify example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter On/Off Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_on_off_light.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterOnOffLight/README.md b/libraries/Matter/examples/MatterOnOffLight/README.md index 2a2138ca2c7..b973302129a 100644 --- a/libraries/Matter/examples/MatterOnOffLight/README.md +++ b/libraries/Matter/examples/MatterOnOffLight/README.md @@ -176,6 +176,12 @@ The MatterOnOffLight example consists of the following main components: - **Button not toggling light**: Ensure the button is properly connected and the debounce time is appropriate. Check Serial Monitor for "User button released" messages - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter On/Off Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_on_off_light.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterOnOffPlugin/README.md b/libraries/Matter/examples/MatterOnOffPlugin/README.md index 70db06ff0fb..2603961353c 100644 --- a/libraries/Matter/examples/MatterOnOffPlugin/README.md +++ b/libraries/Matter/examples/MatterOnOffPlugin/README.md @@ -193,6 +193,12 @@ The MatterOnOffPlugin example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter On/Off Plugin Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_on_off_plugin.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterPressureSensor/README.md b/libraries/Matter/examples/MatterPressureSensor/README.md index d18ab9d5198..2f0665067ac 100644 --- a/libraries/Matter/examples/MatterPressureSensor/README.md +++ b/libraries/Matter/examples/MatterPressureSensor/README.md @@ -186,6 +186,12 @@ The MatterPressureSensor example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Pressure Sensor Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_pressure_sensor.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterSmartButton/README.md b/libraries/Matter/examples/MatterSmartButton/README.md index 2928897503f..e7290ba40b3 100644 --- a/libraries/Matter/examples/MatterSmartButton/README.md +++ b/libraries/Matter/examples/MatterSmartButton/README.md @@ -170,6 +170,12 @@ The MatterSmartButton example consists of the following main components: - **No serial output**: Check baudrate (115200) and USB connection - **Multiple clicks registered for single press**: Increase the debounce time in the code if needed +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Generic Switch Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_generic_switch.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterTemperatureLight/README.md b/libraries/Matter/examples/MatterTemperatureLight/README.md index 68a05632192..4eb9432400b 100644 --- a/libraries/Matter/examples/MatterTemperatureLight/README.md +++ b/libraries/Matter/examples/MatterTemperatureLight/README.md @@ -202,6 +202,12 @@ The MatterTemperatureLight example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Color Temperature Light Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_color_temperature_light.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterTemperatureSensor/README.md b/libraries/Matter/examples/MatterTemperatureSensor/README.md index 017f3ee9abc..9a494aec932 100644 --- a/libraries/Matter/examples/MatterTemperatureSensor/README.md +++ b/libraries/Matter/examples/MatterTemperatureSensor/README.md @@ -201,6 +201,12 @@ The MatterTemperatureSensor example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Temperature Sensor Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_temperature_sensor.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterThermostat/README.md b/libraries/Matter/examples/MatterThermostat/README.md index 8f0a69abe08..2a87f4d93af 100644 --- a/libraries/Matter/examples/MatterThermostat/README.md +++ b/libraries/Matter/examples/MatterThermostat/README.md @@ -225,6 +225,12 @@ The MatterThermostat example consists of the following main components: - **Failed to commission**: Try factory resetting the device by long-pressing the button. Other option would be to erase the SoC Flash Memory by using `Arduino IDE Menu` -> `Tools` -> `Erase All Flash Before Sketch Upload: "Enabled"` or directly with `esptool.py --port erase_flash` - **No serial output**: Check baudrate (115200) and USB connection +## Related Documentation + +- [Matter Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter.html) +- [Matter Endpoint Base Class](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/matter_ep.html) +- [Matter Thermostat Endpoint](https://docs.espressif.com/projects/arduino-esp32/en/latest/matter/ep_thermostat.html) + ## License This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/Matter/examples/MatterThreadLight/README.md b/libraries/Matter/examples/MatterThreadLight/README.md deleted file mode 100644 index 3a971b279b5..00000000000 --- a/libraries/Matter/examples/MatterThreadLight/README.md +++ /dev/null @@ -1,242 +0,0 @@ -# Matter Thread Light Example - -This example demonstrates a Matter Light device that uses Thread network commissioning exclusively. Thread is a low-power, mesh networking protocol that's ideal for Matter smart home devices. - -## Features - -- **Thread-only commissioning**: Device can only be commissioned over Thread network -- **On/Off Light control**: Simple light that can be controlled via Matter -- **Automatic fallback**: On non-Thread capable devices, falls back to Wi-Fi -- **Status monitoring**: Displays network and commissioning status -- **Decommissioning support**: Long-press boot button to decommission - -## Hardware Requirements - -### Thread-Capable ESP32 Variants -- **ESP32-H2**: Native Thread support -- **ESP32-C6**: Native Thread support -- **ESP32-C5**: Native Thread support - -### Other ESP32 Variants -- **ESP32, ESP32-S2, ESP32-S3, ESP32-C3**: Will automatically fall back to Wi-Fi commissioning - -## Hardware Setup - -### Basic Setup -``` -ESP32-H2/C6/C5 Board -├── LED (GPIO 2 or LED_BUILTIN) - Visual feedback -└── Boot Button (GPIO 0) - Decommissioning -``` - -### Pin Configuration -- **LED Pin**: Uses `LED_BUILTIN` if available, otherwise GPIO 2 -- **Button Pin**: Uses `BOOT_PIN` (typically GPIO 0) - -## Network Requirements - -### Thread Border Router -To use Thread commissioning, you need a Thread Border Router in your network: - -**Apple HomePod/Apple TV (tvOS 15+)** -``` -- Supports Thread Border Router functionality -- Automatically discovered by Matter controllers -``` - -**Google Nest Hub Max (2nd gen)** -``` -- Built-in Thread Border Router -- Works with Google Home ecosystem -``` - -**OpenThread Border Router** -``` -- Raspberry Pi with Thread radio -- Custom Thread Border Router setup -``` - -## Usage - -### 1. Upload and Monitor -```bash -# Upload the sketch to your ESP32-H2/C6 -# Open Serial Monitor at 115200 baud -``` - -### 2. Check Thread Status -The device will display: -``` -=== Matter Thread Light Status === -Device commissioned: No -Device connected: No -Thread connected: No -Thread commissioning: Enabled -Wi-Fi commissioning: Disabled -Light state: OFF -================================ -``` - -### 3. Commission the Device -Use a Matter controller that supports Thread: - -**Apple Home** -1. Open Home app on iPhone/iPad -2. Tap "Add Accessory" -3. Scan QR code or enter manual pairing code -4. Follow commissioning steps - -**Google Home** -1. Open Google Home app -2. Tap "Add" → "Set up device" -3. Choose "Works with Google" -4. Scan QR code or enter pairing code - -### 4. Control the Light -Once commissioned, you can: -- Turn the light on/off from your Matter controller -- Monitor status in Serial Monitor -- See LED respond to commands - -### 5. Decommission (if needed) -1. Hold the boot button for 5+ seconds -2. Device will reset and become available for commissioning again - -## Serial Output - -### Successful Thread Commissioning -``` -Starting Thread-only Matter Light... -✓ Thread-only commissioning mode enabled -Matter Node is not commissioned yet. -Manual pairing code: 12345678901 -QR code URL: https://... - -This device is configured for Thread commissioning only. -Make sure your Matter controller supports Thread commissioning. - -Waiting for Matter commissioning... -Looking for Thread Border Router... -Thread connected: Yes -Device commissioned: Yes -Light ON -``` - -### Non-Thread Device Fallback -``` -Starting Thread-only Matter Light... -⚠ Thread support not compiled in, using Wi-Fi commissioning -Matter Node is not commissioned yet. -Wi-Fi commissioning: Enabled -``` - -## Troubleshooting - -### Device Not Commissioning -**Problem**: Device stuck on "Waiting for Matter commissioning..." - -**Solutions**: -1. **Check Thread Border Router**: - - Ensure Thread Border Router is online - - Verify controller supports Thread commissioning - -2. **Verify Network**: - - Check Thread network is operational - - Ensure Matter controller is on same network as Border Router - -3. **Reset and Retry**: - - Hold boot button for 5+ seconds to decommission - - Try commissioning again - -### Thread Connection Issues -**Problem**: "Thread connected: No" in status - -**Solutions**: -1. **Border Router Setup**: - - Verify Thread Border Router is functioning - - Check Border Router connectivity - -2. **Device Placement**: - - Move device closer to Thread Border Router - - Ensure no interference with Thread radio - -3. **Thread Network**: - - Verify Thread network credentials - - Check Thread network topology - -### Compilation Issues -**Problem**: Compilation errors related to Thread - -**Solutions**: -1. **ESP-IDF Version**: - ```bash - # Ensure ESP-IDF supports Thread for your board - # Update to latest ESP-IDF if needed - ``` - -2. **Board Configuration**: - ```bash - # Make sure you've selected the correct board - # ESP32-H2/C6/C5 for Thread support - ``` - -## API Reference - -### Network Commissioning Control -```cpp -// Enable Thread-only commissioning -Matter.setNetworkCommissioningMode(false, true); - -// Check Thread commissioning status -bool enabled = Matter.isThreadNetworkCommissioningEnabled(); - -// Check Thread connection -bool connected = Matter.isThreadConnected(); -``` - -### Device Status -```cpp -// Check if device is commissioned -bool commissioned = Matter.isDeviceCommissioned(); - -// Check if device has network connectivity -bool connected = Matter.isDeviceConnected(); -``` - -### Light Control -```cpp -// Set light state -OnOffLight.setOnOff(true); // Turn on -OnOffLight.setOnOff(false); // Turn off - -// Get current state -bool isOn = OnOffLight.getOnOff(); - -// Toggle light -OnOffLight.toggle(); -``` - -## Thread vs Wi-Fi Comparison - -| Feature | Thread | Wi-Fi | -|---------|--------|------| -| **Power Consumption** | Low | Higher | -| **Range** | Mesh network, self-healing | Single point to router | -| **Setup** | Requires Border Router | Direct to Wi-Fi router | -| **Reliability** | High (mesh redundancy) | Depends on Wi-Fi quality | -| **Device Limit** | 250+ devices per network | Limited by router | -| **Security** | Built-in mesh security | WPA2/WPA3 | - -## Related Examples - -- **[SimpleNetworkCommissioning](../SimpleNetworkCommissioning/)**: Basic Wi-Fi/Thread selection -- **[MatterNetworkCommissioning](../MatterNetworkCommissioning/)**: Interactive commissioning control -- **[MatterMinimum](../MatterMinimum/)**: Simplest Wi-Fi-only setup -- **[MatterOnOffLight](../MatterOnOffLight/)**: Wi-Fi-based light with persistence - -## Further Reading - -- [Thread Group Specification](https://www.threadgroup.org/) -- [OpenThread Documentation](https://openthread.io/) -- [Matter Thread Integration Guide](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/thread_primer.md) -- [ESP32 Thread Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/thread.html) From af4dbf94f46405e79816dc69d909237d016ac874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:25:57 +0100 Subject: [PATCH 06/38] feat(docs): Add AI chatbot (#12002) * feat(docs): Add chatbot * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- docs/_static/chatbot_widget.css | 9 +++++++++ docs/_static/chatbot_widget_en.js | 30 ++++++++++++++++++++++++++++++ docs/conf_common.py | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 docs/_static/chatbot_widget.css create mode 100644 docs/_static/chatbot_widget_en.js diff --git a/docs/_static/chatbot_widget.css b/docs/_static/chatbot_widget.css new file mode 100644 index 00000000000..c6585b0588d --- /dev/null +++ b/docs/_static/chatbot_widget.css @@ -0,0 +1,9 @@ +#kapa-widget-container { + z-index: 10000 !important; + position: absolute !important; + } + + .mantine-Modal-root { + z-index: 10000; + position: absolute; + } diff --git a/docs/_static/chatbot_widget_en.js b/docs/_static/chatbot_widget_en.js new file mode 100644 index 00000000000..2b083966803 --- /dev/null +++ b/docs/_static/chatbot_widget_en.js @@ -0,0 +1,30 @@ +document.addEventListener("DOMContentLoaded", function () { + var script = document.createElement("script"); + script.src = "https://widget.kapa.ai/kapa-widget.bundle.js"; + script.setAttribute("data-bot-protection-mechanism", "hcaptcha"); + script.setAttribute("data-website-id", "f67ff377-ba84-4009-aceb-5e582755abad"); + script.setAttribute("data-project-name", "ESP32 Arduino Core Documentation"); + script.setAttribute("data-project-color", "#C62817"); + script.setAttribute("data-project-logo", "https://dl.espressif.com/public/logo.png"); + script.setAttribute("data-button-image", "https://dl.espressif.com/chatbot/Chatbot.png"); + script.setAttribute("data-button-text-font-size", "0px"); + script.setAttribute("data-button-border-radius", "50%"); + script.setAttribute("data-button-bg-color", "#38393a"); + script.setAttribute("data-button-border", "#38393a"); + script.setAttribute("data-button-height", "45px"); + script.setAttribute("data-button-width", "45px"); + script.setAttribute("data-button-animation-enabled", "false"); + script.setAttribute("data-button-image-height", "100%"); + script.setAttribute("data-button-image-width", "100%"); + script.setAttribute("data-button-padding", "0"); + script.setAttribute("data-button-hover-animation-enabled", "false"); + script.setAttribute("data-button-position-top", "50px"); + script.setAttribute("data-button-position-left", "305px"); + script.setAttribute("data-button-box-shadow", "0px 6px 12px 1px rgba(0,0,0,0.16)"); + script.setAttribute("data-modal-override-open-class", "test-ai"); + script.setAttribute("data-user-analytics-fingerprint-enabled", "true"); + script.setAttribute("data-modal-disclaimer", "This custom large language model (LLM), trained on official documentation from espressif.com, is designed to provide technical support and answers related to Espressif’s products and services. Give it a try, share your thoughts, and let us know your feedback—we truly appreciate it! \n\n**Note**: AI-generated information may be incomplete or inaccurate. Always verify critical information with official sources."); + script.setAttribute("data-modal-example-questions", "What is the ESP32 Arduino Core?,How do I get started with the ESP32 Arduino Core?"); + script.async = true; + document.head.appendChild(script); + }); diff --git a/docs/conf_common.py b/docs/conf_common.py index 0fb4fb8e306..4e3a3e31f0d 100644 --- a/docs/conf_common.py +++ b/docs/conf_common.py @@ -28,6 +28,9 @@ html_static_path = ["../_static"] +html_js_files = ["../_static/chatbot_widget_en.js"] +html_css_files = ["../_static/chatbot_widget.css"] + # Conditional content extensions += [ # noqa: F405 From 2bb78a97e270a3382e8c6e91ded0994a7460a03f Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Mon, 10 Nov 2025 12:17:47 +0100 Subject: [PATCH 07/38] feat(udp): Allow to change the async_udp task stack size (#12003) Example: `-D CONFIG_ARDUINO_UDP_TASK_STACK_SIZE=2048` The default is to much conservative since a correctly developed app probably won't allocate too much on stack on the callbacks. I currently see a wast of memory: `I (1222501) MONITOR: async_udp (p=3) 3416 bytes` --- Kconfig.projbuild | 6 ++++++ libraries/AsyncUDP/src/AsyncUDP.cpp | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Kconfig.projbuild b/Kconfig.projbuild index 705d0e66d5a..a2761749e13 100644 --- a/Kconfig.projbuild +++ b/Kconfig.projbuild @@ -147,6 +147,12 @@ config ARDUINO_UDP_TASK_PRIORITY help Select at what priority you want the UDP task to run. +config ARDUINO_UDP_TASK_STACK_SIZE + int "UDP task stack size" + default 4096 + help + Amount of stack available for the UDP task. + config ARDUINO_ISR_IRAM bool "Run interrupts in IRAM" default "n" diff --git a/libraries/AsyncUDP/src/AsyncUDP.cpp b/libraries/AsyncUDP/src/AsyncUDP.cpp index 91b024999b1..ee4bcc86c30 100644 --- a/libraries/AsyncUDP/src/AsyncUDP.cpp +++ b/libraries/AsyncUDP/src/AsyncUDP.cpp @@ -15,6 +15,27 @@ extern "C" { #include "lwip/priv/tcpip_priv.h" +#ifndef CONFIG_ARDUINO_UDP_TASK_STACK_SIZE +#define CONFIG_ARDUINO_UDP_TASK_STACK_SIZE 4096 +#endif +#ifndef ARDUINO_UDP_TASK_STACK_SIZE +#define ARDUINO_UDP_TASK_STACK_SIZE CONFIG_ARDUINO_UDP_TASK_STACK_SIZE +#endif + +#ifndef CONFIG_ARDUINO_UDP_TASK_PRIORITY +#define CONFIG_ARDUINO_UDP_TASK_PRIORITY 3 +#endif +#ifndef ARDUINO_UDP_TASK_PRIORITY +#define ARDUINO_UDP_TASK_PRIORITY CONFIG_ARDUINO_UDP_TASK_PRIORITY +#endif + +#ifndef CONFIG_ARDUINO_UDP_RUNNING_CORE +#define CONFIG_ARDUINO_UDP_RUNNING_CORE -1 +#endif +#ifndef ARDUINO_UDP_RUNNING_CORE +#define ARDUINO_UDP_RUNNING_CORE CONFIG_ARDUINO_UDP_RUNNING_CORE +#endif + #ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING #define UDP_MUTEX_LOCK() \ if (!sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) { \ @@ -189,7 +210,7 @@ static bool _udp_task_start() { } if (!_udp_task_handle) { xTaskCreateUniversal( - _udp_task, "async_udp", 4096, NULL, CONFIG_ARDUINO_UDP_TASK_PRIORITY, (TaskHandle_t *)&_udp_task_handle, CONFIG_ARDUINO_UDP_RUNNING_CORE + _udp_task, "async_udp", ARDUINO_UDP_TASK_STACK_SIZE, NULL, ARDUINO_UDP_TASK_PRIORITY, (TaskHandle_t *)&_udp_task_handle, ARDUINO_UDP_RUNNING_CORE ); if (!_udp_task_handle) { return false; From a58b6c6dfcde094685acc6e625b7ccce6c961a8b Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 10 Nov 2025 08:59:45 -0300 Subject: [PATCH 08/38] fix(ble): Fix getPower return value --- libraries/BLE/src/BLEDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/BLE/src/BLEDevice.cpp b/libraries/BLE/src/BLEDevice.cpp index 8b809abdaf3..8cf8dca0e5a 100644 --- a/libraries/BLE/src/BLEDevice.cpp +++ b/libraries/BLE/src/BLEDevice.cpp @@ -464,7 +464,7 @@ int BLEDevice::getPower(esp_ble_power_type_t powerType) { case ESP_PWR_LVL_N12: return -12; case ESP_PWR_LVL_N9: return -9; case ESP_PWR_LVL_N6: return -6; - case ESP_PWR_LVL_N3: return -6; + case ESP_PWR_LVL_N3: return -3; case ESP_PWR_LVL_N0: return 0; case ESP_PWR_LVL_P3: return 3; case ESP_PWR_LVL_P6: return 6; From 9cb8e227eb301c1bebb28c53ab225f0c173f0d74 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Mon, 10 Nov 2025 09:07:23 -0300 Subject: [PATCH 09/38] feat(network): Adds Network Library documentation (#11999) * feat(network): Adds Network Library documentation * fix(network): formatting in network API documentation * fix(doc): Use proper WiFi interfaces * feat(doc): Document isOnline() function in network API Added documentation for the isOnline() function to check network status. * fix(doc): Update docs/en/api/network.rst Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(doc): Update docs/en/api/network.rst Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: Me No Dev Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- docs/en/api/network.rst | 1093 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 1093 insertions(+) create mode 100644 docs/en/api/network.rst diff --git a/docs/en/api/network.rst b/docs/en/api/network.rst new file mode 100644 index 00000000000..214a2f73da4 --- /dev/null +++ b/docs/en/api/network.rst @@ -0,0 +1,1093 @@ +########### +Network API +########### + +About +----- + +The Network API provides a unified, object-oriented interface for managing multiple network interfaces on ESP32 devices. +The Network Manager acts as a central coordinator that manages Wi-Fi (Station and Access Point modes), Ethernet, and PPP interfaces, +providing a consistent API regardless of the underlying network technology. + +**Key Features:** + +* **Unified Interface Management**: Single API for all network types (Wi-Fi, Ethernet, PPP) +* **Event-Driven Architecture**: Centralized event handling through NetworkEvents +* **Multiple Interface Support**: Simultaneous operation of multiple network interfaces +* **Default Interface Selection**: Automatic or manual selection of the default network interface +* **IPv4 and IPv6 Support**: Full support for both IP protocol versions +* **Network Communication Classes**: Unified Client, Server, and UDP classes that work with any interface + +Architecture +------------ + +The Network library follows a tree-like hierarchical structure: + +.. code-block:: text + + NetworkManager (NetworkEvents) + │ + ├── NetworkInterface (Base Class) + │ │ + │ ├── Wi-Fi + │ │ ├── STAClass WiFi.STA (Station Mode) + │ │ └── APClass WiFi.AP (Access Point Mode) + │ │ + │ ├── Ethernet + │ │ └── ETHClass ETH + │ │ + │ └── PPP + │ └── PPPClass PPP + │ + └── Network Communication + ├── NetworkClient + ├── NetworkServer + └── NetworkUdp + +**Class Hierarchy:** + +* **NetworkManager**: Extends ``NetworkEvents`` and ``Printable``. Manages all network interfaces and provides global network functions. +* **NetworkEvents**: Provides event callback registration and handling for all network events. +* **NetworkInterface**: Base class that all network interfaces extend. Provides common functionality for IP configuration, status checking, and network information. +* **Interface Implementations**: + * ``STAClass``: Wi-Fi Station (client) mode + * ``APClass``: Wi-Fi Access Point mode + * ``ETHClass``: Ethernet interface + * ``PPPClass``: Point-to-Point Protocol (modem/cellular) + +Network Manager +--------------- + +The ``NetworkManager`` class (global instance: ``Network``) is the central coordinator for all network interfaces. +It extends ``NetworkEvents`` to provide event handling capabilities and implements ``Printable`` for status output. + +Initialization +************** + +.. code-block:: arduino + + bool begin(); + +Initializes the Network Manager and the underlying ESP-IDF network interface system. +This must be called before using any network interfaces. Returns ``true`` on success, ``false`` on failure. + +**Example:** + +.. code-block:: arduino + + #include "Network.h" + + void setup() { + Serial.begin(115200); + Network.begin(); // Initialize Network Manager + } + +Check if Online +*************** + +.. code-block:: arduino + + bool isOnline(); + +Check if the device is online by verifying if any network interface (except AP) has an assigned IPv4 or global IPv6 address. +Returns ``true`` if such interface has been found, ``false`` if no interface has assigned IP. + +**Example:** + +.. code-block:: arduino + + #include "Network.h" + + void setup() { + Serial.begin(115200); + Network.begin(); // Initialize Network Manager + + // Connect to WiFi AP + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + + // Wait for WiFi to connect + while (!WiFi.STA.hasIP()) { + delay(500); + } + + if (Network.isOnline()) { + Serial.println("Network is Online"); + } + } + +Default Interface Management +**************************** + +.. code-block:: arduino + + bool setDefaultInterface(NetworkInterface &ifc); + NetworkInterface *getDefaultInterface(); + +Sets or gets the default network interface. The default interface is used for network operations when no specific interface is specified. + +**Example:** + +.. code-block:: arduino + + #include "Network.h" + #include "WiFi.h" + + void setup() { + Network.begin(); + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + + // Wait for WiFi to connect + while (!WiFi.STA.hasIP()) { + delay(500); + } + + // Set WiFi as default interface + Network.setDefaultInterface(WiFi.STA); + + // Get current default interface + NetworkInterface *defaultIf = Network.getDefaultInterface(); + Serial.print("Default interface: "); + Serial.println(defaultIf->impl_name()); + } + +Hostname Management +******************* + +.. code-block:: arduino + + static const char *getHostname(); + static bool setHostname(const char *hostname); + static bool hostname(const String &aHostname); + +Gets or sets the system hostname. The hostname is used for network identification and mDNS. + +**Example:** + +.. code-block:: arduino + + // Set hostname + Network.setHostname("my-esp32-device"); + + // Get hostname + const char *hostname = Network.getHostname(); + Serial.println(hostname); + +DNS Resolution +************** + +.. code-block:: arduino + + int hostByName(const char *aHostname, IPAddress &aResult); + +Resolves a hostname to an IP address using DNS. Returns ``1`` on success, error code on failure. + +**Example:** + +.. code-block:: arduino + + IPAddress ip; + if (Network.hostByName("www.example.com", ip) == 1) { + Serial.print("Resolved IP: "); + Serial.println(ip); + } + +MAC Address +*********** + +.. code-block:: arduino + + uint8_t *macAddress(uint8_t *mac); + String macAddress(); + +Gets the MAC address of the default network interface. + +**Example:** + +.. code-block:: arduino + + uint8_t mac[6]; + Network.macAddress(mac); + Serial.print("MAC: "); + for (int i = 0; i < 6; i++) { + if (i > 0) Serial.print(":"); + Serial.print(mac[i], HEX); + } + Serial.println(); + + // Or as String + String macStr = Network.macAddress(); + Serial.println(macStr); + +Network Events +-------------- + +The ``NetworkEvents`` class provides a centralized event handling system for all network-related events. +``NetworkManager`` extends ``NetworkEvents``, so you can register event callbacks directly on the ``Network`` object. + +Event Types +*********** + +Network events are defined in ``arduino_event_id_t`` enum: + +**Ethernet Events:** +* ``ARDUINO_EVENT_ETH_START`` +* ``ARDUINO_EVENT_ETH_STOP`` +* ``ARDUINO_EVENT_ETH_CONNECTED`` +* ``ARDUINO_EVENT_ETH_DISCONNECTED`` +* ``ARDUINO_EVENT_ETH_GOT_IP`` +* ``ARDUINO_EVENT_ETH_LOST_IP`` +* ``ARDUINO_EVENT_ETH_GOT_IP6`` + +**Wi-Fi Station Events:** +* ``ARDUINO_EVENT_WIFI_STA_START`` +* ``ARDUINO_EVENT_WIFI_STA_STOP`` +* ``ARDUINO_EVENT_WIFI_STA_CONNECTED`` +* ``ARDUINO_EVENT_WIFI_STA_DISCONNECTED`` +* ``ARDUINO_EVENT_WIFI_STA_GOT_IP`` +* ``ARDUINO_EVENT_WIFI_STA_LOST_IP`` +* ``ARDUINO_EVENT_WIFI_STA_GOT_IP6`` + +**Wi-Fi AP Events:** +* ``ARDUINO_EVENT_WIFI_AP_START`` +* ``ARDUINO_EVENT_WIFI_AP_STOP`` +* ``ARDUINO_EVENT_WIFI_AP_STACONNECTED`` +* ``ARDUINO_EVENT_WIFI_AP_STADISCONNECTED`` +* ``ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED`` +* ``ARDUINO_EVENT_WIFI_AP_GOT_IP6`` + +**PPP Events:** +* ``ARDUINO_EVENT_PPP_START`` +* ``ARDUINO_EVENT_PPP_STOP`` +* ``ARDUINO_EVENT_PPP_CONNECTED`` +* ``ARDUINO_EVENT_PPP_DISCONNECTED`` +* ``ARDUINO_EVENT_PPP_GOT_IP`` +* ``ARDUINO_EVENT_PPP_LOST_IP`` +* ``ARDUINO_EVENT_PPP_GOT_IP6`` + +Registering Event Callbacks +**************************** + +Three types of callback functions are supported: + +**1. Simple Event Callback (Event ID only):** + +.. code-block:: arduino + + typedef void (*NetworkEventCb)(arduino_event_id_t event); + network_event_handle_t onEvent(NetworkEventCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); + +**2. Functional Callback (Event ID and Info):** + +.. code-block:: arduino + + typedef std::function NetworkEventFuncCb; + network_event_handle_t onEvent(NetworkEventFuncCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); + +**3. System Callback (Event Structure):** + +.. code-block:: arduino + + typedef void (*NetworkEventSysCb)(arduino_event_t *event); + network_event_handle_t onEvent(NetworkEventSysCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); + +**Example - Simple Callback:** + +.. code-block:: arduino + + void onNetworkEvent(arduino_event_id_t event) { + Serial.print("Network event: "); + Serial.println(NetworkEvents::eventName(event)); + + if (event == ARDUINO_EVENT_WIFI_STA_GOT_IP) { + Serial.println("WiFi connected!"); + } + } + + void setup() { + Network.begin(); + Network.onEvent(onNetworkEvent); + } + +**Example - Functional Callback with Event Info:** + +.. code-block:: arduino + + void setup() { + Network.begin(); + + Network.onEvent([](arduino_event_id_t event, arduino_event_info_t info) { + if (event == ARDUINO_EVENT_WIFI_STA_GOT_IP) { + Serial.print("IP Address: "); + Serial.println(IPAddress(info.got_ip.ip_info.ip.addr)); + Serial.print("Gateway: "); + Serial.println(IPAddress(info.got_ip.ip_info.gw.addr)); + } + }); + } + +**Example - System Callback:** + +.. code-block:: arduino + + void onNetworkEventSys(arduino_event_t *event) { + Serial.print("Event: "); + Serial.println(NetworkEvents::eventName(event->event_id)); + + if (event->event_id == ARDUINO_EVENT_WIFI_STA_GOT_IP) { + IPAddress ip = IPAddress(event->event_info.got_ip.ip_info.ip.addr); + Serial.print("Got IP: "); + Serial.println(ip); + } + } + + void setup() { + Network.begin(); + Network.onEvent(onNetworkEventSys); + } + +Removing Event Callbacks +************************ + +.. code-block:: arduino + + void removeEvent(NetworkEventCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); + void removeEvent(NetworkEventFuncCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); + void removeEvent(NetworkEventSysCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); + void removeEvent(network_event_handle_t event_handle); + +Remove event callbacks by function pointer or by handle (recommended). + +**Example:** + +.. code-block:: arduino + + network_event_handle_t eventHandle; + + void setup() { + Network.begin(); + // Register and save handle + eventHandle = Network.onEvent(onNetworkEvent); + } + + void loop() { + // Later, remove by handle + Network.removeEvent(eventHandle); + } + +Event Information +***************** + +.. code-block:: arduino + + static const char *eventName(arduino_event_id_t id); + +Returns a human-readable name for an event ID. + +**Example:** + +.. code-block:: arduino + + Serial.println(NetworkEvents::eventName(ARDUINO_EVENT_WIFI_STA_GOT_IP)); + // Output: "WIFI_STA_GOT_IP" + +Network Interface Base Class +----------------------------- + +The ``NetworkInterface`` class is the base class for all network interfaces (Wi-Fi STA, Wi-Fi AP, Ethernet, PPP). +It provides common functionality for IP configuration, status checking, and network information retrieval. + +All network interfaces inherit from ``NetworkInterface`` and can be used polymorphically. + +IP Configuration +**************** + +.. code-block:: arduino + + bool config( + IPAddress local_ip = (uint32_t)0x00000000, + IPAddress gateway = (uint32_t)0x00000000, + IPAddress subnet = (uint32_t)0x00000000, + IPAddress dns1 = (uint32_t)0x00000000, + IPAddress dns2 = (uint32_t)0x00000000, + IPAddress dns3 = (uint32_t)0x00000000 + ); + bool dnsIP(uint8_t dns_no, IPAddress ip); + +Configures static IP address, gateway, subnet mask, and DNS servers. +For server interfaces (Wi-Fi AP), ``dns1`` is the DHCP lease range start and ``dns2`` is the DNS server. + +**Example:** + +.. code-block:: arduino + + #include "Network.h" + #include "WiFi.h" + + void setup() { + Network.begin(); + + // Configure static IP + IPAddress local_ip(192, 168, 1, 100); + IPAddress gateway(192, 168, 1, 1); + IPAddress subnet(255, 255, 255, 0); + IPAddress dns1(8, 8, 8, 8); + IPAddress dns2(8, 8, 4, 4); + + WiFi.STA.begin(); + WiFi.STA.config(local_ip, gateway, subnet, dns1, dns2); + WiFi.STA.connect("ssid", "password"); + } + +Hostname +******** + +.. code-block:: arduino + + const char *getHostname() const; + bool setHostname(const char *hostname) const; + +Gets or sets the hostname for the specific interface. + +**Example:** + +.. code-block:: arduino + + WiFi.STA.setHostname("my-wifi-device"); + Serial.println(WiFi.STA.getHostname()); + +Status Checking +*************** + +.. code-block:: arduino + + bool started() const; + bool connected() const; + bool hasIP() const; + bool hasLinkLocalIPv6() const; + bool hasGlobalIPv6() const; + bool linkUp() const; + +Check the status of the network interface. + +**Example:** + +.. code-block:: arduino + + if (WiFi.STA.started()) { + Serial.println("WiFi interface started"); + } + + if (WiFi.STA.connected()) { + Serial.println("WiFi connected"); + } + + if (WiFi.STA.hasIP()) { + Serial.println("WiFi has IP address"); + } + +IPv6 Support +************ + +.. code-block:: arduino + + bool enableIPv6(bool en = true); + +Enables or disables IPv6 support on the interface. + +**Example:** + +.. code-block:: arduino + + WiFi.STA.enableIPv6(true); + + if (WiFi.STA.hasGlobalIPv6()) { + IPAddress ipv6 = WiFi.STA.globalIPv6(); + Serial.print("Global IPv6: "); + Serial.println(ipv6); + } + +IP Address Information +********************** + +.. code-block:: arduino + + IPAddress localIP() const; + IPAddress subnetMask() const; + IPAddress gatewayIP() const; + IPAddress dnsIP(uint8_t dns_no = 0) const; + IPAddress broadcastIP() const; + IPAddress networkID() const; + uint8_t subnetCIDR() const; + IPAddress linkLocalIPv6() const; // IPv6 only + IPAddress globalIPv6() const; // IPv6 only + +Get IP address information from the interface. + +**Example:** + +.. code-block:: arduino + + Serial.print("Local IP: "); + Serial.println(WiFi.STA.localIP()); + + Serial.print("Subnet Mask: "); + Serial.println(WiFi.STA.subnetMask()); + + Serial.print("Gateway: "); + Serial.println(WiFi.STA.gatewayIP()); + + Serial.print("DNS: "); + Serial.println(WiFi.STA.dnsIP()); + + Serial.print("Broadcast: "); + Serial.println(WiFi.STA.broadcastIP()); + + Serial.print("Network ID: "); + Serial.println(WiFi.STA.networkID()); + + Serial.print("Subnet CIDR: /"); + Serial.println(WiFi.STA.subnetCIDR()); + +MAC Address +*********** + +.. code-block:: arduino + + uint8_t *macAddress(uint8_t *mac) const; + String macAddress() const; + +Get the MAC address of the interface. + +**Example:** + +.. code-block:: arduino + + uint8_t mac[6]; + WiFi.STA.macAddress(mac); + Serial.print("MAC: "); + for (int i = 0; i < 6; i++) { + if (i > 0) Serial.print(":"); + Serial.print(mac[i], HEX); + } + Serial.println(); + + // Or as String + Serial.println(WiFi.STA.macAddress()); + +Default Interface +***************** + +.. code-block:: arduino + + bool setDefault(); + bool isDefault() const; + +Set this interface as the default network interface, or check if it is the default. + +**Example:** + +.. code-block:: arduino + + // Set WiFi STA as default + WiFi.STA.setDefault(); + + // Check if it's default + if (WiFi.STA.isDefault()) { + Serial.println("WiFi STA is the default interface"); + } + +Route Priority +*************** + +.. code-block:: arduino + + int getRoutePrio() const; + int setRoutePrio(int prio); // ESP-IDF 5.5+ + +Gets or sets the route priority for the interface. Higher priority interfaces are preferred for routing. + +**Example:** + +.. code-block:: arduino + + #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0) + // Set higher priority for Ethernet + ETH.setRoutePrio(100); + WiFi.STA.setRoutePrio(50); + #endif + +Status Bits and Waiting +*********************** + +.. code-block:: arduino + + int getStatusBits() const; + int waitStatusBits(int bits, uint32_t timeout_ms) const; + +Get current status bits or wait for specific status bits to be set. + +**Status Bits:** +* ``ESP_NETIF_STARTED_BIT``: Interface has been started +* ``ESP_NETIF_CONNECTED_BIT``: Interface is connected +* ``ESP_NETIF_HAS_IP_BIT``: Interface has an IP address +* ``ESP_NETIF_HAS_LOCAL_IP6_BIT``: Interface has link-local IPv6 +* ``ESP_NETIF_HAS_GLOBAL_IP6_BIT``: Interface has global IPv6 +* ``ESP_NETIF_WANT_IP6_BIT``: Interface wants IPv6 +* ``ESP_NETIF_HAS_STATIC_IP_BIT``: Interface has static IP configuration + +**Example:** + +.. code-block:: arduino + + // Wait for WiFi STA to get IP address (with 10 second timeout) + if (WiFi.STA.waitStatusBits(ESP_NETIF_HAS_IP_BIT, 10000) & ESP_NETIF_HAS_IP_BIT) { + Serial.println("WiFi STA got IP address!"); + } else { + Serial.println("Timeout waiting for IP address"); + } + +Interface Information +********************* + +.. code-block:: arduino + + const char *ifkey() const; + const char *desc() const; + String impl_name() const; + int impl_index() const; + esp_netif_t *netif(); + +Get interface identification and description information. + +**Example:** + +.. code-block:: arduino + + Serial.print("Interface key: "); + Serial.println(WiFi.STA.ifkey()); + + Serial.print("Description: "); + Serial.println(WiFi.STA.desc()); + + Serial.print("Implementation name: "); + Serial.println(WiFi.STA.impl_name()); + + Serial.print("Implementation index: "); + Serial.println(WiFi.STA.impl_index()); + +Network Interface Implementations +---------------------------------- + +Wi-Fi Station (STA) +******************** + +The ``STAClass`` (accessed via ``WiFi.STA`` object) extends ``NetworkInterface`` and provides Wi-Fi Station (client) mode functionality. + +**Key Features:** +* Connect to Wi-Fi access points +* Automatic reconnection +* WPA2/WPA3 security support +* Enterprise Wi-Fi support (WPA2-Enterprise) +* Scanning for available networks + +**Example:** + +.. code-block:: arduino + + #include "WiFi.h" + + void setup() { + Network.begin(); + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + + while (WiFi.STA.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + + Serial.println(); + Serial.print("Connected! IP: "); + Serial.println(WiFi.STA.localIP()); + } + +For detailed Wi-Fi Station API documentation, see :doc:`wifi`. + +Wi-Fi Access Point (AP) +*********************** + +The ``APClass`` (accessed via ``WiFi.AP`` object) extends ``NetworkInterface`` and provides Wi-Fi Access Point mode functionality. + +**Key Features:** +* Create Wi-Fi access points +* DHCP server for connected stations +* Network Address Translation (NAT) +* Captive portal support + +**Example:** + +.. code-block:: arduino + + #include "WiFi.h" + + void setup() { + Network.begin(); + WiFi.AP.begin(); + WiFi.AP.create("MyESP32AP", "password123"); + + Serial.print("AP IP: "); + Serial.println(WiFi.AP.localIP()); + } + +For detailed Wi-Fi AP API documentation, see :doc:`wifi`. + +Ethernet +******** + +The ``ETHClass`` (accessed via ``ETH`` object) extends ``NetworkInterface`` and provides Ethernet connectivity. + +**Key Features:** +* Support for multiple Ethernet PHY types +* SPI-based and EMAC-based Ethernet controllers +* Automatic link detection +* Full-duplex operation + +**Example:** + +.. code-block:: arduino + + #include "ETH.h" + + void setup() { + Network.begin(); + ETH.begin(ETH_PHY_TYPE, ETH_PHY_ADDR, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_POWER, ETH_CLK_MODE); + + while (!ETH.hasIP()) { + delay(500); + } + + Serial.print("Ethernet IP: "); + Serial.println(ETH.localIP()); + } + +For detailed Ethernet API documentation, see :doc:`ethernet`. + +PPP (Point-to-Point Protocol) +******************************* + +The ``PPPClass`` (accessed via ``PPP`` object) extends ``NetworkInterface`` and provides PPP connectivity, typically used with cellular modems. + +**Key Features:** +* Cellular modem support (SIM7000, SIM7600, BG96, etc.) +* APN configuration +* PIN code support +* Hardware flow control + +**Example:** + +.. code-block:: arduino + + #include "PPP.h" + + void setup() { + Network.begin(); + PPP.begin(PPP_MODEM_SIM7600, 1, 115200); + PPP.setApn("your.apn.here"); + + while (!PPP.hasIP()) { + delay(500); + } + + Serial.print("PPP IP: "); + Serial.println(PPP.localIP()); + } + +For detailed PPP API documentation, see the PPP library documentation. + +Network Communication Classes +------------------------------ + +The Network library provides unified communication classes that work with any network interface: +``NetworkClient``, ``NetworkServer``, and ``NetworkUdp``. + +NetworkClient +************* + +The ``NetworkClient`` class provides TCP client functionality that works with any network interface. + +**Key Features:** +* Connect to TCP servers +* Read/write data +* Timeout configuration +* Socket options + +**Example:** + +.. code-block:: arduino + + #include "Network.h" + #include "WiFi.h" + + NetworkClient client; + + void setup() { + Network.begin(); + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + while (WiFi.STA.status() != WL_CONNECTED) delay(500); + + if (client.connect("www.example.com", 80)) { + client.println("GET / HTTP/1.1"); + client.println("Host: www.example.com"); + client.println(); + + while (client.available()) { + char c = client.read(); + Serial.print(c); + } + + client.stop(); + } + } + +NetworkServer +************* + +The ``NetworkServer`` class provides TCP server functionality that works with any network interface. + +**Key Features:** +* Accept incoming TCP connections +* Multiple client support +* Timeout configuration + +**Example:** + +.. code-block:: arduino + + #include "Network.h" + #include "WiFi.h" + + NetworkServer server(80); + + void setup() { + Network.begin(); + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + while (WiFi.STA.status() != WL_CONNECTED) delay(500); + + server.begin(); + Serial.print("Server started on: "); + Serial.println(WiFi.STA.localIP()); + } + + void loop() { + NetworkClient client = server.accept(); + if (client) { + Serial.println("New client connected"); + client.println("Hello from ESP32!"); + client.stop(); + } + } + +NetworkUdp +********** + +The ``NetworkUdp`` class provides UDP communication that works with any network interface. + +**Key Features:** +* Send/receive UDP packets +* Multicast support +* Remote IP and port information + +**Example:** + +.. code-block:: arduino + + #include "Network.h" + #include "WiFi.h" + + NetworkUDP udp; + + void setup() { + Network.begin(); + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + while (WiFi.STA.status() != WL_CONNECTED) delay(500); + + udp.begin(1234); + } + + void loop() { + int packetSize = udp.parsePacket(); + if (packetSize) { + Serial.print("Received packet from: "); + Serial.print(udp.remoteIP()); + Serial.print(":"); + Serial.println(udp.remotePort()); + + char buffer[255]; + int len = udp.read(buffer, 255); + if (len > 0) { + buffer[len] = 0; + Serial.println(buffer); + } + } + } + +Multiple Interface Management +----------------------------- + +The Network Manager allows you to manage multiple network interfaces simultaneously and switch between them as needed. + +**Example - Multiple Interfaces:** + +.. code-block:: arduino + + #include "Network.h" + #include "WiFi.h" + #include "ETH.h" + + void setup() { + Network.begin(); + + // Start Ethernet + ETH.begin(ETH_PHY_TYPE, ETH_PHY_ADDR, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_POWER, ETH_CLK_MODE); + + // Start WiFi as backup + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + + // Wait for either interface to connect + while (!ETH.connected() && WiFi.STA.status() != WL_CONNECTED) { + delay(500); + } + + // Set the connected interface as default + if (ETH.connected()) { + Network.setDefaultInterface(ETH); + Serial.println("Using Ethernet"); + } else if (WiFi.STA.status() == WL_CONNECTED) { + Network.setDefaultInterface(WiFi.STA); + Serial.println("Using WiFi"); + } + } + +**Example - Interface Priority:** + +.. code-block:: arduino + + void setup() { + Network.begin(); + + // Start both interfaces + ETH.begin(...); + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + + // Set route priorities (ESP-IDF 5.5+) + #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0) + ETH.setRoutePrio(100); // Higher priority + WiFi.STA.setRoutePrio(50); // Lower priority + #endif + + // Ethernet will be preferred for routing when both are connected + } + +Event Handling Examples +----------------------- + +**Example - Monitor All Network Events:** + +.. code-block:: arduino + + #include "Network.h" + + void onNetworkEvent(arduino_event_id_t event) { + Serial.print("[Network Event] "); + Serial.println(NetworkEvents::eventName(event)); + + switch (event) { + case ARDUINO_EVENT_WIFI_STA_GOT_IP: + Serial.println("WiFi Station got IP!"); + break; + case ARDUINO_EVENT_ETH_GOT_IP: + Serial.println("Ethernet got IP!"); + break; + case ARDUINO_EVENT_PPP_GOT_IP: + Serial.println("PPP got IP!"); + break; + default: + break; + } + } + + void setup() { + Serial.begin(115200); + Network.begin(); + Network.onEvent(onNetworkEvent); + } + +**Example - Interface-Specific Event Handling:** + +.. code-block:: arduino + + #include "Network.h" + #include "WiFi.h" + + void onWiFiEvent(arduino_event_id_t event, arduino_event_info_t info) { + if (event == ARDUINO_EVENT_WIFI_STA_GOT_IP) { + IPAddress ip = IPAddress(info.got_ip.ip_info.ip.addr); + IPAddress gateway = IPAddress(info.got_ip.ip_info.gw.addr); + IPAddress subnet = IPAddress(info.got_ip.ip_info.netmask.addr); + + Serial.println("WiFi Connected!"); + Serial.print("IP: "); + Serial.println(ip); + Serial.print("Gateway: "); + Serial.println(gateway); + Serial.print("Subnet: "); + Serial.println(subnet); + } + } + + void setup() { + Network.begin(); + Network.onEvent(onWiFiEvent, ARDUINO_EVENT_WIFI_STA_GOT_IP); + WiFi.STA.begin(); + WiFi.STA.connect("ssid", "password"); + } + +Troubleshooting +--------------- + +**Interface Not Starting:** +* Ensure ``Network.begin()`` is called before using any interface +* Check that the interface-specific initialization is correct +* Verify hardware connections (for Ethernet/PPP) + +**Default Interface Not Working:** +* Explicitly set the default interface using ``Network.setDefaultInterface()`` +* Check interface status using ``started()``, ``connected()``, and ``hasIP()`` +* Verify route priorities if using multiple interfaces + +**Events Not Firing:** +* Ensure ``Network.begin()`` is called to initialize the event system +* Check that callbacks are registered before the events occur +* Use ``NetworkEvents::eventName()`` to verify event IDs + +**IP Configuration Issues:** +* For static IP, ensure all parameters (IP, gateway, subnet) are provided +* Check that the IP address is not already in use on the network +* Verify DNS server addresses are correct + +**Multiple Interface Conflicts:** +* Set appropriate route priorities to control which interface is used +* Use ``setDefaultInterface()`` to explicitly select the default +* Monitor events to see which interface gets IP addresses first + +Related Documentation +--------------------- + +* `ESP-IDF Network Interface Documentation `_ From 3500d3e129a126cbacef511cc9487f2181dc8144 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Mon, 10 Nov 2025 14:32:48 +0200 Subject: [PATCH 10/38] fix(wifi): Fix WiFi.disconnect(true, true) not working (#12004) --- libraries/WiFi/src/STA.cpp | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/libraries/WiFi/src/STA.cpp b/libraries/WiFi/src/STA.cpp index 84258589b28..36577a38b83 100644 --- a/libraries/WiFi/src/STA.cpp +++ b/libraries/WiFi/src/STA.cpp @@ -525,25 +525,6 @@ bool STAClass::connect( #endif /* CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT */ bool STAClass::disconnect(bool eraseap, unsigned long timeout) { - if (eraseap) { - if (!started()) { - log_e("STA not started! You must call begin first."); - return false; - } - wifi_config_t conf; - memset(&conf, 0, sizeof(wifi_config_t)); - esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &conf); - if (err != ESP_OK) { - log_e("STA clear config failed! 0x%x: %s", err, esp_err_to_name(err)); - return false; - } - } - - if (!connected()) { - log_w("STA already disconnected."); - return true; - } - esp_err_t err = esp_wifi_disconnect(); if (err != ESP_OK) { log_e("STA disconnect failed! 0x%x: %s", err, esp_err_to_name(err)); @@ -560,6 +541,20 @@ bool STAClass::disconnect(bool eraseap, unsigned long timeout) { } } + if (eraseap) { + if (!started()) { + log_e("STA not started! You must call begin first."); + return false; + } + wifi_config_t conf; + memset(&conf, 0, sizeof(wifi_config_t)); + esp_err_t err = esp_wifi_set_config(WIFI_IF_STA, &conf); + if (err != ESP_OK) { + log_e("STA clear config failed! 0x%x: %s", err, esp_err_to_name(err)); + return false; + } + } + return true; } From 6cec5f867a89597c044e9656f81634df0805eadc Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Mon, 10 Nov 2025 09:33:12 -0300 Subject: [PATCH 11/38] feat(openthread): adds examples README.md files (#11996) * feat(openthread): adds examples README.md files * fix(openthread): code and readme typo * ci(pre-commit): Apply automatic fixes * fix(openthread): Fix formatting of CLI time units --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- .../examples/CLI/COAP/coap_lamp/README.md | 165 ++++++++++++++++ .../examples/CLI/COAP/coap_switch/README.md | 176 +++++++++++++++++ .../examples/CLI/SimpleCLI/README.md | 166 ++++++++++++++++ .../examples/CLI/SimpleNode/README.md | 131 +++++++++++++ .../ExtendedRouterNode/ExtendedRouterNode.ino | 6 +- .../ExtendedRouterNode/README.md | 163 ++++++++++++++++ .../LeaderNode/LeaderNode.ino | 6 +- .../SimpleThreadNetwork/LeaderNode/README.md | 150 ++++++++++++++ .../SimpleThreadNetwork/RouterNode/README.md | 162 ++++++++++++++++ .../RouterNode/RouterNode.ino | 6 +- .../examples/CLI/ThreadScan/README.md | 137 +++++++++++++ .../examples/CLI/onReceive/README.md | 130 +++++++++++++ .../SimpleThreadNetwork/LeaderNode/README.md | 183 ++++++++++++++++++ .../SimpleThreadNetwork/RouterNode/README.md | 174 +++++++++++++++++ 14 files changed, 1746 insertions(+), 9 deletions(-) create mode 100644 libraries/OpenThread/examples/CLI/COAP/coap_lamp/README.md create mode 100644 libraries/OpenThread/examples/CLI/COAP/coap_switch/README.md create mode 100644 libraries/OpenThread/examples/CLI/SimpleCLI/README.md create mode 100644 libraries/OpenThread/examples/CLI/SimpleNode/README.md create mode 100644 libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/README.md create mode 100644 libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/README.md create mode 100644 libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/README.md create mode 100644 libraries/OpenThread/examples/CLI/ThreadScan/README.md create mode 100644 libraries/OpenThread/examples/CLI/onReceive/README.md create mode 100644 libraries/OpenThread/examples/Native/SimpleThreadNetwork/LeaderNode/README.md create mode 100644 libraries/OpenThread/examples/Native/SimpleThreadNetwork/RouterNode/README.md diff --git a/libraries/OpenThread/examples/CLI/COAP/coap_lamp/README.md b/libraries/OpenThread/examples/CLI/COAP/coap_lamp/README.md new file mode 100644 index 00000000000..2efd04d30cd --- /dev/null +++ b/libraries/OpenThread/examples/CLI/COAP/coap_lamp/README.md @@ -0,0 +1,165 @@ +# OpenThread CoAP Lamp Example + +This example demonstrates how to create a CoAP (Constrained Application Protocol) server on a Thread network that controls an RGB LED lamp.\ +The application acts as a CoAP resource server that receives PUT requests to turn the lamp on or off, demonstrating Thread-based IoT device communication. + +## Supported Targets + +| SoC | Thread | RGB LED | Status | +| --- | ------ | ------- | ------ | +| ESP32-H2 | ✅ | Required | Fully supported | +| ESP32-C6 | ✅ | Required | Fully supported | +| ESP32-C5 | ✅ | Required | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example requires a companion CoAP Switch device (coap_switch example) to control the lamp. +- The lamp device acts as a Leader node and CoAP server. + +## Features + +- CoAP server implementation on Thread network +- RGB LED control with smooth fade in/out transitions +- Leader node configuration using CLI Helper Functions API +- CoAP resource creation and management +- Multicast IPv6 address for CoAP communication +- Automatic network setup with retry mechanism +- Visual status indication using RGB LED (Red = failed, Green = ready) + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- RGB LED (built-in RGB LED or external RGB LED) +- USB cable for Serial communication +- A CoAP Switch device (coap_switch example) to control the lamp + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +Before uploading the sketch, you can modify the network and CoAP configuration: + +```cpp +#define OT_CHANNEL "24" +#define OT_NETWORK_KEY "00112233445566778899aabbccddeeff" +#define OT_MCAST_ADDR "ff05::abcd" +#define OT_COAP_RESOURCE_NAME "Lamp" +``` + +**Important:** +- The network key and channel must match the Switch device configuration +- The multicast address and resource name must match the Switch device +- The network key must be a 32-character hexadecimal string (16 bytes) +- The channel must be between 11 and 26 (IEEE 802.15.4 channels) + +## Building and Flashing + +1. Open the `coap_lamp.ino` sketch in the Arduino IDE. +2. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +3. Connect your ESP32 board to your computer via USB. +4. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +Starting OpenThread. +Running as Lamp (RGB LED) - use the other C6/H2 as a Switch +OpenThread started. +Waiting for activating correct Device Role. +........ +Device is Leader. +OpenThread setup done. Node is ready. +``` + +The RGB LED will turn **green** when the device is ready to receive CoAP commands. + +## Using the Device + +### Lamp Device Setup + +The lamp device automatically: +1. Configures itself as a Thread Leader node +2. Creates a CoAP server +3. Registers a CoAP resource named "Lamp" +4. Sets up a multicast IPv6 address for CoAP communication +5. Waits for CoAP PUT requests from the Switch device + +### CoAP Resource + +The lamp exposes a CoAP resource that accepts: +- **PUT with payload "0"**: Turns the lamp OFF (fades to black) +- **PUT with payload "1"**: Turns the lamp ON (fades to white) + +### Visual Status Indication + +The RGB LED provides visual feedback: +- **Red**: Setup failed or error occurred +- **Green**: Device is ready and waiting for CoAP commands +- **White/Black**: Lamp state (controlled by CoAP commands) + +### Working with Switch Device + +1. Start the Lamp device first (this example) +2. Start the Switch device (coap_switch example) with matching network key and channel +3. Press the button on the Switch device to toggle the lamp +4. The lamp will fade in/out smoothly when toggled + +## Code Structure + +The coap_lamp example consists of the following main components: + +1. **`otDeviceSetup()` function**: + - Configures the device as a Leader node using CLI Helper Functions + - Sets up CoAP server and resource + - Waits for device to become Leader + - Returns success/failure status + +2. **`setupNode()` function**: + - Retries setup until successful + - Calls `otDeviceSetup()` with Leader role configuration + +3. **`otCOAPListen()` function**: + - Listens for CoAP requests from the Switch device + - Parses CoAP PUT requests + - Controls RGB LED based on payload (0 = OFF, 1 = ON) + - Implements smooth fade transitions + +4. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` + - Initializes OpenThread CLI + - Sets CLI timeout + - Calls `setupNode()` to configure the device + +5. **`loop()`**: + - Continuously calls `otCOAPListen()` to process incoming CoAP requests + - Small delay for responsiveness + +## Troubleshooting + +- **LED stays red**: Setup failed. Check Serial Monitor for error messages. Verify network configuration. +- **Lamp not responding to switch**: Ensure both devices use the same network key, channel, multicast address, and resource name. Check that Switch device is running. +- **Device not becoming Leader**: Clear NVS or ensure this is the first device started. Check network configuration. +- **CoAP requests not received**: Verify multicast address matches between Lamp and Switch devices. Check Thread network connectivity. +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) +- [CoAP Protocol](https://coap.technology/) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/COAP/coap_switch/README.md b/libraries/OpenThread/examples/CLI/COAP/coap_switch/README.md new file mode 100644 index 00000000000..9f8aae20539 --- /dev/null +++ b/libraries/OpenThread/examples/CLI/COAP/coap_switch/README.md @@ -0,0 +1,176 @@ +# OpenThread CoAP Switch Example + +This example demonstrates how to create a CoAP (Constrained Application Protocol) client on a Thread network that controls a remote CoAP server (lamp).\ +The application acts as a CoAP client that sends PUT requests to a lamp device, demonstrating Thread-based IoT device control. + +## Supported Targets + +| SoC | Thread | Button | Status | +| --- | ------ | ------ | ------ | +| ESP32-H2 | ✅ | Required | Fully supported | +| ESP32-C6 | ✅ | Required | Fully supported | +| ESP32-C5 | ✅ | Required | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example requires a companion CoAP Lamp device (coap_lamp example) to control. +- The switch device joins the network as a Router or Child node and acts as a CoAP client. + +## Features + +- CoAP client implementation on Thread network +- Button-based control of remote lamp device +- Router/Child node configuration using CLI Helper Functions API +- CoAP PUT request sending with confirmation +- Automatic network join with retry mechanism +- Visual status indication using RGB LED (Red = failed, Blue = ready) +- Button debouncing for reliable input + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- User button (BOOT button or external button) +- RGB LED for status indication (optional, but recommended) +- USB cable for Serial communication +- A CoAP Lamp device (coap_lamp example) must be running first + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +Before uploading the sketch, you can modify the network and CoAP configuration: + +```cpp +#define USER_BUTTON 9 // C6/H2 Boot button (change if needed) +#define OT_CHANNEL "24" +#define OT_NETWORK_KEY "00112233445566778899aabbccddeeff" +#define OT_MCAST_ADDR "ff05::abcd" +#define OT_COAP_RESOURCE_NAME "Lamp" +``` + +**Important:** +- The network key and channel **must match** the Lamp device configuration +- The multicast address and resource name **must match** the Lamp device +- The network key must be a 32-character hexadecimal string (16 bytes) +- The channel must be between 11 and 26 (IEEE 802.15.4 channels) +- **Start the Lamp device first** before starting this Switch device + +## Building and Flashing + +1. **First, start the Lamp device** using the coap_lamp example +2. Open the `coap_switch.ino` sketch in the Arduino IDE. +3. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +4. Connect your ESP32 board to your computer via USB. +5. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +Starting OpenThread. +Running as Switch - use the BOOT button to toggle the other C6/H2 as a Lamp +OpenThread started. +Waiting for activating correct Device Role. +........ +Device is Router. +OpenThread setup done. Node is ready. +``` + +The RGB LED will turn **blue** when the device is ready to send CoAP commands. + +## Using the Device + +### Switch Device Setup + +The switch device automatically: +1. Joins the existing Thread network (created by the Lamp Leader) +2. Configures itself as a Router or Child node +3. Creates a CoAP client +4. Waits for button presses to send CoAP commands + +### Button Control + +- **Press the button**: Toggles the lamp state (ON/OFF) +- The switch sends CoAP PUT requests to the lamp: + - Payload "1" = Turn lamp ON + - Payload "0" = Turn lamp OFF + +### Visual Status Indication + +The RGB LED provides visual feedback: +- **Red**: Setup failed or CoAP request failed +- **Blue**: Device is ready and can send CoAP commands +- **Red (after button press)**: CoAP request failed, device will restart setup + +### Working with Lamp Device + +1. Start the Lamp device first (coap_lamp example) +2. Start this Switch device with matching network key and channel +3. Wait for Switch device to join the network (LED turns blue) +4. Press the button on the Switch device +5. The lamp on the other device should toggle ON/OFF + +## Code Structure + +The coap_switch example consists of the following main components: + +1. **`otDeviceSetup()` function**: + - Configures the device to join an existing network using CLI Helper Functions + - Sets up CoAP client + - Waits for device to become Router or Child + - Returns success/failure status + +2. **`setupNode()` function**: + - Retries setup until successful + - Calls `otDeviceSetup()` with Router/Child role configuration + +3. **`otCoapPUT()` function**: + - Sends CoAP PUT request to the lamp device + - Waits for CoAP confirmation response + - Returns success/failure status + - Uses CLI Helper Functions to send commands and read responses + +4. **`checkUserButton()` function**: + - Monitors button state with debouncing + - Toggles lamp state on button press + - Calls `otCoapPUT()` to send commands + - Restarts setup if CoAP request fails + +5. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` + - Initializes OpenThread CLI + - Sets CLI timeout + - Calls `setupNode()` to configure the device + +6. **`loop()`**: + - Continuously calls `checkUserButton()` to monitor button input + - Small delay for responsiveness + +## Troubleshooting + +- **LED stays red**: Setup failed. Check Serial Monitor for error messages. Verify network configuration matches Lamp device. +- **Button press doesn't toggle lamp**: Ensure Lamp device is running and both devices are on the same Thread network. Check that network key, channel, multicast address, and resource name match. +- **Device not joining network**: Ensure Lamp device (Leader) is running first. Verify network key and channel match exactly. +- **CoAP request timeout**: Check Thread network connectivity. Verify multicast address and resource name match the Lamp device. Ensure Lamp device is responding. +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) +- [CoAP Protocol](https://coap.technology/) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/SimpleCLI/README.md b/libraries/OpenThread/examples/CLI/SimpleCLI/README.md new file mode 100644 index 00000000000..463d7ed5ab2 --- /dev/null +++ b/libraries/OpenThread/examples/CLI/SimpleCLI/README.md @@ -0,0 +1,166 @@ +# OpenThread Simple CLI Example + +This example demonstrates how to use the OpenThread CLI (Command-Line Interface) for interactive control of a Thread network node using an ESP32 SoC microcontroller.\ +The application provides an interactive console where you can manually configure and control the Thread network using OpenThread CLI commands. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses `OpenThread.begin(false)` which does not automatically start a Thread network, allowing you to manually configure it using CLI commands. + +## Features + +- Interactive OpenThread CLI console via Serial Monitor +- Manual Thread network configuration using CLI commands +- Full control over Thread network parameters (network name, channel, PAN ID, network key, etc.) +- Support for all OpenThread CLI commands +- Useful for learning OpenThread CLI and debugging Thread networks + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +No configuration is required before uploading the sketch. The example starts with a fresh Thread stack that is not automatically started, allowing you to configure it manually using CLI commands. + +## Building and Flashing + +1. Open the `SimpleCLI.ino` sketch in the Arduino IDE. +2. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +3. Connect your ESP32 board to your computer via USB. +4. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +OpenThread CLI started - type 'help' for a list of commands. +ot> +``` + +The `ot> ` prompt indicates that the OpenThread CLI console is ready. You can now type OpenThread CLI commands directly. + +## Using the Device + +### Interactive CLI Commands + +Type OpenThread CLI commands in the Serial Monitor. Some useful commands to get started: + +**Get help:** +``` +help +``` + +**Initialize a new dataset:** +``` +dataset init new +``` + +**Set network parameters:** +``` +dataset networkname MyThreadNetwork +dataset channel 15 +dataset networkkey 00112233445566778899aabbccddeeff +``` + +**Commit and start the network:** +``` +dataset commit active +ifconfig up +thread start +``` + +**Check device state:** +``` +state +``` + +**View network information:** +``` +networkname +channel +panid +ipaddr +``` + +**For a complete list of OpenThread CLI commands, refer to the** [OpenThread CLI Reference](https://openthread.io/reference/cli). + +### Example Workflow + +1. **Initialize a new Thread network (Leader):** + ``` + dataset init new + dataset networkname MyNetwork + dataset channel 15 + dataset networkkey 00112233445566778899aabbccddeeff + dataset commit active + ifconfig up + thread start + ``` + +2. **Join an existing network (Router/Child):** + ``` + dataset clear + dataset networkkey 00112233445566778899aabbccddeeff + dataset channel 15 + dataset commit active + ifconfig up + thread start + ``` + +3. **Check network status:** + ``` + state + networkname + ipaddr + ``` + +## Code Structure + +The SimpleCLI example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` (no auto-start) + - Initializes OpenThread CLI + - Starts the interactive CLI console on Serial + +2. **`loop()`**: + - Empty - all interaction happens through the CLI console + +## Troubleshooting + +- **CLI not responding**: Ensure Serial Monitor is set to 115200 baud and "Both NL & CR" line ending +- **Commands not working**: Make sure OpenThread stack is initialized (check for "OpenThread CLI started" message) +- **Network not starting**: Verify that you've committed the dataset and started the interface before starting Thread +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/SimpleNode/README.md b/libraries/OpenThread/examples/CLI/SimpleNode/README.md new file mode 100644 index 00000000000..c882be09046 --- /dev/null +++ b/libraries/OpenThread/examples/CLI/SimpleNode/README.md @@ -0,0 +1,131 @@ +# OpenThread Simple Node Example + +This example demonstrates how to create a simple OpenThread node that automatically starts in a Thread network using default settings.\ +The application automatically initializes a Thread network with default parameters and displays the current device role and network information. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses `OpenThread.begin()` which automatically starts a Thread network using default settings or previously stored NVS dataset information. + +## Features + +- Automatic Thread network initialization with default settings +- Automatic device role assignment (first device becomes Leader, subsequent devices become Router or Child) +- Network information display using CLI Helper Functions API +- Periodic device role monitoring +- Support for persistent network configuration via NVS + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +No configuration is required before uploading the sketch. The example uses default Thread network parameters: + +- **Network Name**: "OpenThread-ESP" +- **Mesh Local Prefix**: "fd00:db8:a0:0::/64" +- **Channel**: 15 +- **PAN ID**: 0x1234 +- **Extended PAN ID**: "dead00beef00cafe" +- **Network Key**: "00112233445566778899aabbccddeeff" +- **PSKc**: "104810e2315100afd6bc9215a6bfac53" + +**Note:** If NVS (Non-Volatile Storage) already contains dataset information, it will be loaded from there instead of using defaults. + +## Building and Flashing + +1. Open the `SimpleNode.ino` sketch in the Arduino IDE. +2. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +3. Connect your ESP32 board to your computer via USB. +4. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +OpenThread Network Information: +Role: Leader +RLOC16: 0x0000 +Network Name: OpenThread-ESP +Channel: 15 +PAN ID: 0x1234 +Extended PAN ID: dead00beef00cafe +Network Key: 00112233445566778899aabbccddeeff +Mesh Local EID: fd00:db8:a0:0:0:ff:fe00:0 +Leader RLOC: fd00:db8:a0:0:0:ff:fe00:0 +Node RLOC: fd00:db8:a0:0:0:ff:fe00:0 + +Thread Node State: Leader +Thread Node State: Leader +... +``` + +The first device to start will become the **Leader**. Subsequent devices will automatically join as **Router** or **Child** nodes. + +## Using the Device + +### Network Behavior + +- **First device**: Automatically becomes the Leader and creates a new Thread network +- **Subsequent devices**: Automatically join the existing network as Router or Child nodes +- **Device role**: Displayed every 5 seconds in the Serial Monitor + +### Multiple Devices + +To create a multi-device Thread network: + +1. Flash the first device - it will become the Leader +2. Flash additional devices - they will automatically join the network +3. All devices must use the same network key and channel (defaults are used if NVS is empty) + +## Code Structure + +The SimpleNode example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin()` (auto-start with default settings) + - Initializes OpenThread CLI + - Prints current Thread network information using `OpenThread.otPrintNetworkInformation()` + +2. **`loop()`**: + - Periodically displays the current device role using `OpenThread.otGetStringDeviceRole()` + - Updates every 5 seconds + +## Troubleshooting + +- **Device not joining network**: Ensure all devices use the same network key and channel. Check that the Leader node is running first. +- **Role stuck as "Detached"**: Wait a few seconds for the device to join the network. Verify network key and channel match the Leader. +- **No network information displayed**: Check that OpenThread stack initialized successfully (look for network information in setup) +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/ExtendedRouterNode.ino b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/ExtendedRouterNode.ino index 40f046aeab5..0fb66a5dfb3 100644 --- a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/ExtendedRouterNode.ino +++ b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/ExtendedRouterNode.ino @@ -16,8 +16,8 @@ #include "OThreadCLI_Util.h" // Leader node shall use the same Network Key and channel -#define CLI_NETWORK_KEY "00112233445566778899aabbccddeeff" -#define CLI_NETWORK_CHANEL "24" +#define CLI_NETWORK_KEY "00112233445566778899aabbccddeeff" +#define CLI_NETWORK_CHANNEL "24" bool otStatus = true; void setup() { @@ -29,7 +29,7 @@ void setup() { otStatus &= otExecCommand("dataset", "clear"); otStatus &= otExecCommand("dataset networkkey", CLI_NETWORK_KEY); - otStatus &= otExecCommand("dataset channel", CLI_NETWORK_CHANEL); + otStatus &= otExecCommand("dataset channel", CLI_NETWORK_CHANNEL); otStatus &= otExecCommand("dataset", "commit active"); otStatus &= otExecCommand("ifconfig", "up"); otStatus &= otExecCommand("thread", "start"); diff --git a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/README.md b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/README.md new file mode 100644 index 00000000000..3091b65259a --- /dev/null +++ b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode/README.md @@ -0,0 +1,163 @@ +# OpenThread Extended Router Node Example (CLI) + +This example demonstrates how to create an OpenThread Router or Child node that joins an existing Thread network, with extended functionality showing both CLI Helper Functions API and native OpenThread API usage.\ +The example shows how to retrieve network information using both methods and demonstrates error handling. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses `OpenThread.begin(false)` which does not automatically start a Thread network, allowing manual configuration. +- **Important:** A Leader node must be running before starting this Router/Child node. + +## Features + +- Manual Router/Child node configuration using CLI Helper Functions API +- Joins an existing Thread network created by a Leader node +- Demonstrates both CLI Helper Functions API (`otGetRespCmd()`) and native OpenThread API (`otLinkGetPanId()`) usage +- Network information display using both API methods +- Error handling and timeout management +- Comprehensive network status monitoring + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication +- A Leader node must be running on the same network + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +Before uploading the sketch, configure the network parameters to match the Leader node: + +```cpp +#define CLI_NETWORK_KEY "00112233445566778899aabbccddeeff" +#define CLI_NETWORK_CHANNEL "24" +``` + +**Important:** +- The network key **must match** the Leader node's network key +- The channel **must match** the Leader node's channel +- The network key must be a 32-character hexadecimal string (16 bytes) +- The channel must be between 11 and 26 (IEEE 802.15.4 channels) + +## Building and Flashing + +1. **First, start the Leader node** using the LeaderNode example +2. Open the `ExtendedRouterNode.ino` sketch in the Arduino IDE. +3. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +4. Connect your ESP32 board to your computer via USB. +5. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +Setting up OpenThread Node as Router/Child +Make sure the Leader Node is already running + +PanID[using CLI]: 0x1234 + +PanID[using OT API]: 0x1234 + +Thread NetworkInformation: +--------------------------- +Role: Router +RLOC16: 0xfc00 +Network Name: OpenThread-ESP +Channel: 24 +PAN ID: 0x1234 +Extended PAN ID: dead00beef00cafe +Network Key: 00112233445566778899aabbccddeeff +Mesh Local EID: fd00:db8:a0:0:0:ff:fe00:fc00 +Leader RLOC: fd00:db8:a0:0:0:ff:fe00:0 +Node RLOC: fd00:db8:a0:0:0:ff:fe00:fc00 +--------------------------- +``` + +## Using the Device + +### Extended Router/Child Node Setup + +The Extended Router/Child node is automatically configured in `setup()` using the following sequence: + +1. **Clear dataset**: Clears any existing dataset +2. **Set network key**: Configures the network security key (must match Leader) +3. **Set channel**: Configures the IEEE 802.15.4 channel (must match Leader) +4. **Commit dataset**: Applies the dataset to the active configuration +5. **Start interface**: Brings up the network interface +6. **Start Thread**: Starts the Thread network and joins the existing network +7. **Wait for role**: Waits up to 90 seconds for the device to become Router or Child + +### Dual API Demonstration + +This example demonstrates two ways to access OpenThread information: + +1. **CLI Helper Functions API**: Uses `otGetRespCmd("panid", resp)` to get PAN ID via CLI +2. **Native OpenThread API**: Uses `otLinkGetPanId(esp_openthread_get_instance())` to get PAN ID directly + +Both methods should return the same value, demonstrating API equivalence. + +### Network Information + +Once the device joins the network, the `loop()` function displays comprehensive network information using `OpenThread.otPrintNetworkInformation()`, including: +- Device role +- RLOC16 +- Network name +- Channel +- PAN ID and Extended PAN ID +- Network key +- IPv6 addresses (Mesh Local EID, Leader RLOC, Node RLOC) + +## Code Structure + +The ExtendedRouterNode example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` (no auto-start) + - Initializes OpenThread CLI + - Configures the device to join an existing network using CLI Helper Functions: + - `otExecCommand()` - Executes CLI commands with error handling + - Commands: "dataset clear", "dataset networkkey", "dataset channel", "dataset commit active", "ifconfig up", "thread start" + - Waits for device to become Router or Child (with 90-second timeout) + - Demonstrates dual API usage for getting PAN ID + +2. **`loop()`**: + - Displays comprehensive network information using `OpenThread.otPrintNetworkInformation()` + - Updates every 10 seconds + - Shows error message if setup failed + +## Troubleshooting + +- **Device not joining network**: Ensure the Leader node is running first. Verify network key and channel match the Leader exactly. +- **Timeout error**: The device waits 90 seconds to join. If timeout occurs, check network key and channel match the Leader. +- **Network key/channel mismatch**: Double-check that both Leader and Router/Child nodes use identical network key and channel values. +- **Setup failed message**: Check Serial Monitor for specific error messages. Verify Leader node is running and within range. +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/LeaderNode.ino b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/LeaderNode.ino index a945a5c8f77..b2a1330b93e 100644 --- a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/LeaderNode.ino +++ b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/LeaderNode.ino @@ -28,8 +28,8 @@ #include "OThreadCLI.h" #include "OThreadCLI_Util.h" -#define CLI_NETWORK_KEY "dataset networkkey 00112233445566778899aabbccddeeff" -#define CLI_NETWORK_CHANEL "dataset channel 24" +#define CLI_NETWORK_KEY "dataset networkkey 00112233445566778899aabbccddeeff" +#define CLI_NETWORK_CHANNEL "dataset channel 24" otInstance *aInstance = NULL; @@ -43,7 +43,7 @@ void setup() { OThreadCLI.println("dataset init new"); OThreadCLI.println(CLI_NETWORK_KEY); - OThreadCLI.println(CLI_NETWORK_CHANEL); + OThreadCLI.println(CLI_NETWORK_CHANNEL); OThreadCLI.println("dataset commit active"); OThreadCLI.println("ifconfig up"); OThreadCLI.println("thread start"); diff --git a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/README.md b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/README.md new file mode 100644 index 00000000000..6874ab2fde0 --- /dev/null +++ b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode/README.md @@ -0,0 +1,150 @@ +# OpenThread Leader Node Example (CLI) + +This example demonstrates how to create an OpenThread Leader node using the CLI Helper Functions API.\ +The Leader node is the first device in a Thread network that manages the network and assigns router IDs. This example shows how to configure a Leader node manually using OpenThread CLI commands. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses `OpenThread.begin(false)` which does not automatically start a Thread network, allowing manual configuration. + +## Features + +- Manual Leader node configuration using CLI Helper Functions API +- Complete dataset initialization with network key and channel +- Network information display using native OpenThread API calls +- Demonstrates both CLI Helper Functions and native OpenThread API usage +- IPv6 address listing (unicast and multicast) + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +Before uploading the sketch, you can modify the network configuration: + +```cpp +#define CLI_NETWORK_KEY "dataset networkkey 00112233445566778899aabbccddeeff" +#define CLI_NETWORK_CHANNEL "dataset channel 24" +``` + +**Important:** +- The network key must be a 32-character hexadecimal string (16 bytes) +- The channel must be between 11 and 26 (IEEE 802.15.4 channels) +- All devices in the same network must use the same network key and channel + +## Building and Flashing + +1. Open the `LeaderNode.ino` sketch in the Arduino IDE. +2. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +3. Connect your ESP32 board to your computer via USB. +4. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +Setting up OpenThread Node as Leader +============================================= +Thread Node State: Leader +Network Name: OpenThread-ESP +Channel: 24 +PanID: 0x1234 +Extended PAN ID: dead00beef00cafe +Network Key: 00112233445566778899aabbccddeeff +IP Address: fd00:db8:a0:0:0:ff:fe00:0 +Multicast IP Address: ff02::1 +Multicast IP Address: ff03::1 +... +``` + +## Using the Device + +### Leader Node Setup + +The Leader node is automatically configured in `setup()` using the following sequence: + +1. **Initialize new dataset**: Creates a complete dataset with random values +2. **Set network key**: Configures the network security key +3. **Set channel**: Configures the IEEE 802.15.4 channel +4. **Commit dataset**: Applies the dataset to the active configuration +5. **Start interface**: Brings up the network interface +6. **Start Thread**: Starts the Thread network + +### Network Information + +Once the device becomes a Leader, the `loop()` function displays: +- Device role (Leader) +- Network name +- Channel +- PAN ID and Extended PAN ID +- Network key +- All IPv6 addresses (unicast and multicast) + +### Joining Other Devices + +To join other devices to this network: +1. Use the same network key and channel in the Router/Child node examples +2. Start the Leader node first +3. Then start the Router/Child nodes + +## Code Structure + +The LeaderNode example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` (no auto-start) + - Initializes OpenThread CLI + - Configures the device as a Leader using CLI Helper Functions: + - `OThreadCLI.println()` - Sends CLI commands + - Commands: "dataset init new", "dataset networkkey", "dataset channel", "dataset commit active", "ifconfig up", "thread start" + +2. **`loop()`**: + - Checks if device role is Leader using `OpenThread.otGetDeviceRole()` + - Displays network information using native OpenThread API calls: + - `otThreadGetNetworkName()` - Network name + - `otLinkGetChannel()` - Channel + - `otLinkGetPanId()` - PAN ID + - `otThreadGetExtendedPanId()` - Extended PAN ID + - `otThreadGetNetworkKey()` - Network key + - `otIp6GetUnicastAddresses()` - Unicast IPv6 addresses + - `otIp6GetMulticastAddresses()` - Multicast IPv6 addresses + - Updates every 5 seconds + +## Troubleshooting + +- **Device not becoming Leader**: Ensure this is the first device started, or clear NVS to start fresh +- **Network key/channel mismatch**: Verify all devices use the same network key and channel +- **No network information**: Wait for the device to become Leader (may take a few seconds) +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/README.md b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/README.md new file mode 100644 index 00000000000..c9940fb7abc --- /dev/null +++ b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/README.md @@ -0,0 +1,162 @@ +# OpenThread Router/Child Node Example (CLI) + +This example demonstrates how to create an OpenThread Router or Child node that joins an existing Thread network using the CLI Helper Functions API.\ +The Router/Child node joins a network created by a Leader node and can route messages or operate as an end device. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses `OpenThread.begin(false)` which does not automatically start a Thread network, allowing manual configuration. +- **Important:** A Leader node must be running before starting this Router/Child node. + +## Features + +- Manual Router/Child node configuration using CLI Helper Functions API +- Joins an existing Thread network created by a Leader node +- Network information display using native OpenThread API calls +- Demonstrates both CLI Helper Functions and native OpenThread API usage +- IPv6 address listing (unicast and multicast) +- Automatic role assignment (Router or Child based on network conditions) + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication +- A Leader node must be running on the same network + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +Before uploading the sketch, configure the network parameters to match the Leader node: + +```cpp +#define CLI_NETWORK_KEY "dataset networkkey 00112233445566778899aabbccddeeff" +#define CLI_NETWORK_CHANNEL "dataset channel 24" +``` + +**Important:** +- The network key **must match** the Leader node's network key +- The channel **must match** the Leader node's channel +- The network key must be a 32-character hexadecimal string (16 bytes) +- The channel must be between 11 and 26 (IEEE 802.15.4 channels) + +## Building and Flashing + +1. **First, start the Leader node** using the LeaderNode example +2. Open the `RouterNode.ino` sketch in the Arduino IDE. +3. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +4. Connect your ESP32 board to your computer via USB. +5. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +Setting up OpenThread Node as Router/Child +Make sure the Leader Node is already running +============================================= +Thread Node State: Router +Network Name: OpenThread-ESP +Channel: 24 +PanID: 0x1234 +Extended PAN ID: dead00beef00cafe +Network Key: 00112233445566778899aabbccddeeff +IP Address: fd00:db8:a0:0:0:ff:fe00:fc00 +Multicast IP Address: ff02::1 +Multicast IP Address: ff03::1 +... +``` + +The device will join as either a **Router** (if network needs more routers) or **Child** (end device). + +## Using the Device + +### Router/Child Node Setup + +The Router/Child node is automatically configured in `setup()` using the following sequence: + +1. **Clear dataset**: Clears any existing dataset +2. **Set network key**: Configures the network security key (must match Leader) +3. **Set channel**: Configures the IEEE 802.15.4 channel (must match Leader) +4. **Commit dataset**: Applies the dataset to the active configuration +5. **Start interface**: Brings up the network interface +6. **Start Thread**: Starts the Thread network and joins the existing network + +### Network Information + +Once the device joins the network (as Router or Child), the `loop()` function displays: +- Device role (Router or Child) +- Network name (from the Leader) +- Channel +- PAN ID and Extended PAN ID +- Network key +- All IPv6 addresses (unicast and multicast) + +### Multi-Device Network + +To create a multi-device Thread network: + +1. Start the Leader node first (using LeaderNode example) +2. Start Router/Child nodes (using this example) +3. All devices will form a mesh network +4. Routers extend network range and route messages +5. Children are end devices that can sleep + +## Code Structure + +The RouterNode example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` (no auto-start) + - Initializes OpenThread CLI + - Configures the device to join an existing network using CLI Helper Functions: + - `OThreadCLI.println()` - Sends CLI commands + - Commands: "dataset clear", "dataset networkkey", "dataset channel", "dataset commit active", "ifconfig up", "thread start" + +2. **`loop()`**: + - Checks if device role is Router or Child using `OpenThread.otGetDeviceRole()` + - Displays network information using native OpenThread API calls: + - `otThreadGetNetworkName()` - Network name + - `otLinkGetChannel()` - Channel + - `otLinkGetPanId()` - PAN ID + - `otThreadGetExtendedPanId()` - Extended PAN ID + - `otThreadGetNetworkKey()` - Network key + - `otIp6GetUnicastAddresses()` - Unicast IPv6 addresses + - `otIp6GetMulticastAddresses()` - Multicast IPv6 addresses + - Updates every 5 seconds + +## Troubleshooting + +- **Device not joining network**: Ensure the Leader node is running first. Verify network key and channel match the Leader exactly. +- **Role stuck as "Detached"**: Wait a few seconds for the device to join. Check that network key and channel match the Leader. +- **Network key/channel mismatch**: Double-check that both Leader and Router/Child nodes use identical network key and channel values. +- **No network information**: Wait for the device to join the network (may take 10-30 seconds) +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/RouterNode.ino b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/RouterNode.ino index f802bd7ef01..e06832a5cfc 100644 --- a/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/RouterNode.ino +++ b/libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode/RouterNode.ino @@ -27,8 +27,8 @@ #include "OThreadCLI.h" #include "OThreadCLI_Util.h" -#define CLI_NETWORK_KEY "dataset networkkey 00112233445566778899aabbccddeeff" -#define CLI_NETWORK_CHANEL "dataset channel 24" +#define CLI_NETWORK_KEY "dataset networkkey 00112233445566778899aabbccddeeff" +#define CLI_NETWORK_CHANNEL "dataset channel 24" otInstance *aInstance = NULL; @@ -43,7 +43,7 @@ void setup() { OThreadCLI.println("dataset clear"); OThreadCLI.println(CLI_NETWORK_KEY); - OThreadCLI.println(CLI_NETWORK_CHANEL); + OThreadCLI.println(CLI_NETWORK_CHANNEL); OThreadCLI.println("dataset commit active"); OThreadCLI.println("ifconfig up"); OThreadCLI.println("thread start"); diff --git a/libraries/OpenThread/examples/CLI/ThreadScan/README.md b/libraries/OpenThread/examples/CLI/ThreadScan/README.md new file mode 100644 index 00000000000..def249163bd --- /dev/null +++ b/libraries/OpenThread/examples/CLI/ThreadScan/README.md @@ -0,0 +1,137 @@ +# OpenThread Thread Scan Example + +This example demonstrates how to scan for IEEE 802.15.4 devices and Thread networks using OpenThread CLI commands.\ +The application continuously scans for nearby devices and Thread networks, showing both raw IEEE 802.15.4 scans and Thread-specific discovery scans. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses `OpenThread.begin(true)` which automatically starts a Thread network, required for Thread discovery scans. + +## Features + +- IEEE 802.15.4 device scanning (works even when Thread is not started) +- Thread network discovery scanning (requires device to be in Child, Router, or Leader state) +- Continuous scanning with configurable intervals +- Demonstrates CLI Helper Functions API for scanning +- Useful for network discovery and debugging + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +No configuration is required before uploading the sketch. The example automatically starts a Thread network for discovery scanning. + +## Building and Flashing + +1. Open the `ThreadScan.ino` sketch in the Arduino IDE. +2. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +3. Connect your ESP32 board to your computer via USB. +4. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +This sketch will continuously scan the Thread Local Network and all devices IEEE 802.15.4 compatible + +Scanning for nearby IEEE 802.15.4 devices: +| J | Network Name | Extended PAN | PAN | MAC Address | Ch | dBm | LQI | ++---+------------------+------------------+------+------------------+----+-----+-----+ +| 0 | OpenThread-ESP | dead00beef00cafe | 1234 | 1234567890abcdef | 24 | -45 | 255 | +Done + +Scanning MLE Discover: +| J | Network Name | Extended PAN | PAN | MAC Address | Ch | dBm | LQI | ++---+------------------+------------------+------+------------------+----+-----+-----+ +| 0 | OpenThread-ESP | dead00beef00cafe | 1234 | 1234567890abcdef | 24 | -45 | 255 | +Done +``` + +## Using the Device + +### Scanning Behavior + +The example performs two types of scans: + +1. **IEEE 802.15.4 Scan**: + - Scans for all IEEE 802.15.4 compatible devices in the area + - Works even when the device is not part of a Thread network + - Shows devices on all channels + +2. **Thread Discovery Scan (MLE Discover)**: + - Scans for Thread networks specifically + - Only works when the device is in Child, Router, or Leader state + - Shows Thread networks with their network names and parameters + +### Scan Results + +The scan results show: +- **J**: Joinable flag (1 = can join, 0 = cannot join) +- **Network Name**: Thread network name +- **Extended PAN**: Extended PAN ID +- **PAN**: PAN ID +- **MAC Address**: Device MAC address +- **Ch**: Channel +- **dBm**: Signal strength in dBm +- **LQI**: Link Quality Indicator + +### Continuous Scanning + +The example continuously scans: +- IEEE 802.15.4 scan every 5 seconds +- Thread discovery scan every 5 seconds (only if device is in Thread network) + +## Code Structure + +The ThreadScan example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(true)` (auto-start required for discovery) + - Initializes OpenThread CLI + - Sets CLI timeout to 100 ms using `OThreadCLI.setTimeout()` + +2. **`loop()`**: + - Performs IEEE 802.15.4 scan using `otPrintRespCLI("scan", Serial, 3000)` + - Checks if device is in Thread network (Child, Router, or Leader) + - If in network, performs Thread discovery scan using `otPrintRespCLI("discover", Serial, 3000)` + - Waits 5 seconds between scan cycles + +## Troubleshooting + +- **No scan results**: Ensure there are Thread devices nearby. Check that other devices are running and on the same channel. +- **Discovery scan not working**: Wait for the device to join a Thread network (should become Child, Router, or Leader) +- **Scan timeout**: Increase the timeout value in `otPrintRespCLI()` if scans are taking longer +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/CLI/onReceive/README.md b/libraries/OpenThread/examples/CLI/onReceive/README.md new file mode 100644 index 00000000000..c2f43729aaf --- /dev/null +++ b/libraries/OpenThread/examples/CLI/onReceive/README.md @@ -0,0 +1,130 @@ +# OpenThread CLI onReceive Callback Example + +This example demonstrates how to use the OpenThread CLI callback mechanism to capture and process CLI responses asynchronously.\ +The application shows how to set up a callback function that processes CLI responses line by line, allowing non-blocking CLI interaction. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses `OpenThread.begin()` which automatically starts a Thread network with default settings. + +## Features + +- CLI response callback using `OpenThreadCLI.onReceive()` +- Asynchronous CLI response processing +- Non-blocking CLI command execution +- Demonstrates callback-based CLI interaction pattern +- Automatic Thread network startup with default settings +- Device role monitoring via CLI + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +No configuration is required before uploading the sketch. The example automatically starts a Thread network with default settings. + +## Building and Flashing + +1. Open the `onReceive.ino` sketch in the Arduino IDE. +2. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +3. Connect your ESP32 board to your computer via USB. +4. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +OpenThread CLI RESP===> disabled +OpenThread CLI RESP===> disabled +OpenThread CLI RESP===> detached +OpenThread CLI RESP===> child +OpenThread CLI RESP===> router +OpenThread CLI RESP===> router +... +``` + +The callback function processes each line of CLI response, showing the device state transitions from "disabled" to "detached" to "child" to "router" (or "leader"). + +## Using the Device + +### Callback Mechanism + +The example demonstrates the callback-based CLI interaction pattern: + +1. **Callback Registration**: `OThreadCLI.onReceive(otReceivedLine)` registers a callback function +2. **Command Execution**: `OThreadCLI.println("state")` sends CLI commands +3. **Response Processing**: The callback function `otReceivedLine()` processes responses asynchronously +4. **Non-blocking**: The main loop continues while CLI responses are processed in the callback + +### Device State Monitoring + +The example continuously monitors the device state: +- Sends "state" command every second +- Callback processes the response +- Shows state transitions as the device joins the Thread network + +### Customizing the Callback + +You can modify the `otReceivedLine()` function to: +- Parse specific CLI responses +- Extract data from CLI output +- Trigger actions based on CLI responses +- Filter or process specific response patterns + +## Code Structure + +The onReceive example consists of the following main components: + +1. **`otReceivedLine()` callback function**: + - Reads all available data from OpenThread CLI + - Filters out empty lines (EOL sequences) + - Prints non-empty lines with a prefix + +2. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin()` (auto-start) + - Initializes OpenThread CLI + - Registers the callback function using `OThreadCLI.onReceive(otReceivedLine)` + +3. **`loop()`**: + - Sends "state" CLI command every second using `OThreadCLI.println("state")` + - The callback function processes the response asynchronously + - Non-blocking operation allows other tasks to run + +## Troubleshooting + +- **No callback responses**: Ensure the callback is registered in setup. Check that OpenThread CLI is initialized. +- **Empty lines in output**: The callback filters empty lines, which is normal behavior +- **State not changing**: Wait for the device to join the Thread network. First device becomes Leader, subsequent devices become Router or Child. +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread CLI Helper Functions API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_cli.html) +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/Native/SimpleThreadNetwork/LeaderNode/README.md b/libraries/OpenThread/examples/Native/SimpleThreadNetwork/LeaderNode/README.md new file mode 100644 index 00000000000..37fbe871033 --- /dev/null +++ b/libraries/OpenThread/examples/Native/SimpleThreadNetwork/LeaderNode/README.md @@ -0,0 +1,183 @@ +# OpenThread Leader Node Example (Native API) + +This example demonstrates how to create an OpenThread Leader node using the Classes API (native OpenThread API).\ +The Leader node is the first device in a Thread network that manages the network and assigns router IDs. This example shows how to configure a Leader node using the `OpenThread` and `DataSet` classes. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses the Classes API (`OpenThread` and `DataSet` classes) instead of CLI Helper Functions. +- This example uses `OpenThread.begin(false)` which does not use NVS dataset information, allowing fresh configuration. + +## Features + +- Leader node configuration using Classes API +- Dataset creation and configuration using `DataSet` class +- Network information display using `OpenThread` class methods +- IPv6 address management (unicast and multicast) +- Address cache management on role changes +- Comprehensive network status monitoring + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +Before uploading the sketch, you can modify the network configuration: + +```cpp +dataset.setNetworkName("ESP_OpenThread"); +dataset.setChannel(15); +dataset.setPanId(0x1234); +uint8_t networkKey[OT_NETWORK_KEY_SIZE] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; +dataset.setNetworkKey(networkKey); +``` + +**Important:** +- The network key must be a 16-byte array +- The channel must be between 11 and 26 (IEEE 802.15.4 channels) +- All devices in the same network must use the same network key and channel +- Extended PAN ID should be unique for your network + +## Building and Flashing + +1. Open the `LeaderNode.ino` sketch in the Arduino IDE. +2. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +3. Connect your ESP32 board to your computer via USB. +4. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +============================================== +OpenThread Network Information: +Role: Leader +RLOC16: 0x0000 +Network Name: ESP_OpenThread +Channel: 15 +PAN ID: 0x1234 +Extended PAN ID: dead00beef00cafe +Network Key: 00112233445566778899aabbccddeeff +Mesh Local EID: fd00:db8:a0:0:0:ff:fe00:0 +Leader RLOC: fd00:db8:a0:0:0:ff:fe00:0 +Node RLOC: fd00:db8:a0:0:0:ff:fe00:0 + +--- Unicast Addresses (Using Count + Index API) --- + [0]: fd00:db8:a0:0:0:ff:fe00:0 + [1]: fe80:0:0:0:0:ff:fe00:0 + +--- Multicast Addresses (Using std::vector API) --- + [0]: ff02::1 + [1]: ff03::1 + [2]: ff03::fc +... +``` + +## Using the Device + +### Leader Node Setup + +The Leader node is automatically configured in `setup()` using the Classes API: + +1. **Initialize OpenThread**: `threadLeaderNode.begin(false)` - Starts OpenThread stack without using NVS +2. **Create dataset**: `dataset.initNew()` - Creates a new complete dataset +3. **Configure dataset**: Sets network name, extended PAN ID, network key, channel, and PAN ID +4. **Apply dataset**: `threadLeaderNode.commitDataSet(dataset)` - Applies the dataset +5. **Start network**: `threadLeaderNode.networkInterfaceUp()` and `threadLeaderNode.start()` - Starts the Thread network + +### Network Information + +The `loop()` function displays comprehensive network information using Classes API methods: +- Device role and RLOC16 +- Network name, channel, PAN ID +- Extended PAN ID and network key +- IPv6 addresses (Mesh Local EID, Leader RLOC, Node RLOC) +- Unicast addresses (using count + index API) +- Multicast addresses (using std::vector API) + +### Address Cache Management + +The example demonstrates address cache management: +- Clears address cache when device role changes +- Tracks role changes to optimize address resolution + +### Joining Other Devices + +To join other devices to this network: +1. Use the same network key and channel in the Router/Child node examples +2. Start the Leader node first +3. Then start the Router/Child nodes + +## Code Structure + +The LeaderNode example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` + - Creates and configures a `DataSet` object: + - `dataset.initNew()` - Initialize new dataset + - `dataset.setNetworkName()` - Set network name + - `dataset.setExtendedPanId()` - Set extended PAN ID + - `dataset.setNetworkKey()` - Set network key + - `dataset.setChannel()` - Set channel + - `dataset.setPanId()` - Set PAN ID + - Applies dataset: `threadLeaderNode.commitDataSet(dataset)` + - Starts network: `threadLeaderNode.networkInterfaceUp()` and `threadLeaderNode.start()` + +2. **`loop()`**: + - Gets current device role using `threadLeaderNode.otGetDeviceRole()` + - Displays network information using Classes API methods: + - `threadLeaderNode.otGetStringDeviceRole()` - Device role as string + - `threadLeaderNode.getRloc16()` - RLOC16 + - `threadLeaderNode.getNetworkName()` - Network name + - `threadLeaderNode.getChannel()` - Channel + - `threadLeaderNode.getPanId()` - PAN ID + - `threadLeaderNode.getExtendedPanId()` - Extended PAN ID + - `threadLeaderNode.getNetworkKey()` - Network key + - `threadLeaderNode.getMeshLocalEid()` - Mesh Local EID + - `threadLeaderNode.getLeaderRloc()` - Leader RLOC + - `threadLeaderNode.getRloc()` - Node RLOC + - `threadLeaderNode.getUnicastAddressCount()` and `threadLeaderNode.getUnicastAddress(i)` - Unicast addresses + - `threadLeaderNode.getAllMulticastAddresses()` - Multicast addresses + - Manages address cache on role changes + - Updates every 5 seconds + +## Troubleshooting + +- **Device not becoming Leader**: Ensure this is the first device started, or clear NVS to start fresh +- **Network key/channel mismatch**: Verify all devices use the same network key and channel +- **No network information**: Wait for the device to become Leader (may take a few seconds) +- **Address cache issues**: The example automatically clears cache on role changes +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Dataset API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_dataset.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. diff --git a/libraries/OpenThread/examples/Native/SimpleThreadNetwork/RouterNode/README.md b/libraries/OpenThread/examples/Native/SimpleThreadNetwork/RouterNode/README.md new file mode 100644 index 00000000000..90a56db2e69 --- /dev/null +++ b/libraries/OpenThread/examples/Native/SimpleThreadNetwork/RouterNode/README.md @@ -0,0 +1,174 @@ +# OpenThread Router/Child Node Example (Native API) + +This example demonstrates how to create an OpenThread Router or Child node that joins an existing Thread network using the Classes API (native OpenThread API).\ +The Router/Child node joins a network created by a Leader node and can route messages or operate as an end device. This example shows how to configure a Router/Child node using the `OpenThread` and `DataSet` classes. + +## Supported Targets + +| SoC | Thread | Status | +| --- | ------ | ------ | +| ESP32-H2 | ✅ | Fully supported | +| ESP32-C6 | ✅ | Fully supported | +| ESP32-C5 | ✅ | Fully supported | + +### Note on Thread Support: + +- Thread support must be enabled in the ESP-IDF configuration (`CONFIG_OPENTHREAD_ENABLED`). This is done automatically when using the ESP32 Arduino OpenThread library. +- This example uses the Classes API (`OpenThread` and `DataSet` classes) instead of CLI Helper Functions. +- This example uses `OpenThread.begin(false)` which does not use NVS dataset information, allowing fresh configuration. +- **Important:** A Leader node must be running before starting this Router/Child node. + +## Features + +- Router/Child node configuration using Classes API +- Dataset configuration using `DataSet` class +- Joins an existing Thread network created by a Leader node +- Network information display using `OpenThread` class methods +- Active dataset retrieval and display +- Comprehensive network status monitoring + +## Hardware Requirements + +- ESP32 compatible development board with Thread support (ESP32-H2, ESP32-C6, or ESP32-C5) +- USB cable for Serial communication +- A Leader node must be running on the same network + +## Software Setup + +### Prerequisites + +1. Install the Arduino IDE (2.0 or newer recommended) +2. Install ESP32 Arduino Core with OpenThread support +3. ESP32 Arduino libraries: + - `OpenThread` + +### Configuration + +Before uploading the sketch, configure the network parameters to match the Leader node: + +```cpp +uint8_t networkKey[OT_NETWORK_KEY_SIZE] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; +dataset.setNetworkKey(networkKey); +``` + +**Important:** +- The network key **must match** the Leader node's network key exactly +- The network key must be a 16-byte array +- Only the network key is required to join (other parameters are learned from the Leader) +- **Start the Leader node first** before starting this Router/Child node + +## Building and Flashing + +1. **First, start the Leader node** using the LeaderNode example (Native API) +2. Open the `RouterNode.ino` sketch in the Arduino IDE. +3. Select your ESP32 board from the **Tools > Board** menu (ESP32-H2, ESP32-C6, or ESP32-C5). +4. Connect your ESP32 board to your computer via USB. +5. Click the **Upload** button to compile and flash the sketch. + +## Expected Output + +Once the sketch is running, open the Serial Monitor at a baud rate of **115200**. You should see output similar to the following: + +``` +============================================== +OpenThread Network Information (Active Dataset): +Role: Router +RLOC16: 0xfc00 +Network Name: ESP_OpenThread +Channel: 15 +PAN ID: 0x1234 +Extended PAN ID: dead00beef00cafe +Network Key: 00112233445566778899aabbccddeeff +Mesh Local EID: fd00:db8:a0:0:0:ff:fe00:fc00 +Node RLOC: fd00:db8:a0:0:0:ff:fe00:fc00 +Leader RLOC: fd00:db8:a0:0:0:ff:fe00:0 +``` + +The device will join as either a **Router** (if network needs more routers) or **Child** (end device). + +## Using the Device + +### Router/Child Node Setup + +The Router/Child node is automatically configured in `setup()` using the Classes API: + +1. **Initialize OpenThread**: `threadChildNode.begin(false)` - Starts OpenThread stack without using NVS +2. **Clear dataset**: `dataset.clear()` - Clears any existing dataset +3. **Configure dataset**: Sets only the network key (must match Leader) +4. **Apply dataset**: `threadChildNode.commitDataSet(dataset)` - Applies the dataset +5. **Start network**: `threadChildNode.networkInterfaceUp()` and `threadChildNode.start()` - Starts the Thread network and joins existing network + +### Network Information + +The `loop()` function displays network information using Classes API methods: +- Device role and RLOC16 +- Active dataset information (retrieved using `threadChildNode.getCurrentDataSet()`): + - Network name, channel, PAN ID + - Extended PAN ID and network key +- Runtime information: + - Mesh Local EID, Node RLOC, Leader RLOC + +### Active Dataset Retrieval + +This example demonstrates how to retrieve the active dataset: +- Uses `threadChildNode.getCurrentDataSet()` to get the current active dataset +- Displays dataset parameters that were learned from the Leader node +- Shows that only the network key needs to be configured to join + +### Multi-Device Network + +To create a multi-device Thread network: + +1. Start the Leader node first (using Native API LeaderNode example) +2. Start Router/Child nodes (using this example) +3. All devices will form a mesh network +4. Routers extend network range and route messages +5. Children are end devices that can sleep + +## Code Structure + +The RouterNode example consists of the following main components: + +1. **`setup()`**: + - Initializes Serial communication + - Starts OpenThread stack with `OpenThread.begin(false)` + - Creates and configures a `DataSet` object: + - `dataset.clear()` - Clear existing dataset + - `dataset.setNetworkKey()` - Set network key (must match Leader) + - Applies dataset: `threadChildNode.commitDataSet(dataset)` + - Starts network: `threadChildNode.networkInterfaceUp()` and `threadChildNode.start()` + +2. **`loop()`**: + - Gets current device role using `threadChildNode.otGetDeviceRole()` + - Retrieves active dataset using `threadChildNode.getCurrentDataSet()` + - Displays network information using Classes API methods: + - `threadChildNode.otGetStringDeviceRole()` - Device role as string + - `threadChildNode.getRloc16()` - RLOC16 + - `activeDataset.getNetworkName()` - Network name from dataset + - `activeDataset.getChannel()` - Channel from dataset + - `activeDataset.getPanId()` - PAN ID from dataset + - `activeDataset.getExtendedPanId()` - Extended PAN ID from dataset + - `activeDataset.getNetworkKey()` - Network key from dataset + - `threadChildNode.getMeshLocalEid()` - Mesh Local EID + - `threadChildNode.getRloc()` - Node RLOC + - `threadChildNode.getLeaderRloc()` - Leader RLOC + - Updates every 5 seconds + +## Troubleshooting + +- **Device not joining network**: Ensure the Leader node is running first. Verify network key matches the Leader exactly. +- **Role stuck as "Detached"**: Wait a few seconds for the device to join. Check that network key matches the Leader. +- **Network key mismatch**: Double-check that both Leader and Router/Child nodes use identical network key values. +- **No network information**: Wait for the device to join the network (may take 10-30 seconds) +- **Active dataset empty**: Ensure device has successfully joined the network before checking dataset +- **No serial output**: Check baudrate (115200) and USB connection + +## Related Documentation + +- [OpenThread Core API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_core.html) +- [OpenThread Dataset API](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread_dataset.html) +- [OpenThread Overview](https://docs.espressif.com/projects/arduino-esp32/en/latest/openthread/openthread.html) + +## License + +This example is licensed under the Apache License, Version 2.0. From 6a1bec63d92fda8f0ea44123986f7901bec92bf3 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Mon, 10 Nov 2025 09:33:38 -0300 Subject: [PATCH 12/38] feat(serial_uart): adds Serial (UART) documentation (#11993) * feat(serial_uart): adds main Serial documentation * feat(serial_uart): improves Serial documentation * fix(serial): fixes example session headers Removed redundant section headers for example applications. * fix(serial): docs refer to ESP-IDF instead of IDF * fix(serial): restores necessary example reference * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- docs/en/api/serial.rst | 667 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 667 insertions(+) create mode 100644 docs/en/api/serial.rst diff --git a/docs/en/api/serial.rst b/docs/en/api/serial.rst new file mode 100644 index 00000000000..69f9969196d --- /dev/null +++ b/docs/en/api/serial.rst @@ -0,0 +1,667 @@ +############# +Serial (UART) +############# + +About +----- +The Serial (UART - Universal Asynchronous Receiver-Transmitter) peripheral provides asynchronous serial communication, +allowing the ESP32 to communicate with other devices such as computers, sensors, displays, and other microcontrollers. + +UART is a simple, two-wire communication protocol that uses a TX (transmit) and RX (receive) line for full-duplex communication. +The ESP32 Arduino implementation provides a HardwareSerial class that is compatible with the standard Arduino Serial API, +with additional features for advanced use cases. + +**Key Features:** + +* **Full-duplex communication**: Simultaneous transmission and reception +* **Configurable baud rates**: From 300 to 5,000,000+ baud +* **Multiple data formats**: Configurable data bits, parity, and stop bits +* **Hardware flow control**: Support for RTS/CTS signals +* **RS485 support**: Half-duplex RS485 communication mode +* **Low-power UART**: Some SoCs support LP (Low-Power) UART for ultra-low power applications +* **Baud rate detection**: Automatic baud rate detection (ESP32, ESP32-S2 only) +* **Event callbacks**: Receive and error event callbacks +* **Configurable buffers**: Adjustable RX and TX buffer sizes + +UART Availability +----------------- + +The number of UART peripherals available varies by ESP32 SoC: + +========= ======== ======== +ESP32 SoC HP UARTs LP UARTs +========= ======== ======== +ESP32 3 0 +ESP32-S2 2 0 +ESP32-S3 3 0 +ESP32-C3 2 0 +ESP32-C5 2 1 +ESP32-C6 2 1 +ESP32-H2 2 0 +ESP32-P4 5 1 +========= ======== ======== + +**Note:** +* HP (High-Performance) UARTs are the standard UART peripherals +* LP (Low-Power) UARTs are available on some SoCs for ultra-low power applications +* UART0 is typically used for programming and debug output (Serial Monitor) +* Additional UARTs (Serial1, Serial2, etc.) are available for general-purpose communication, including LP UARTs when available. The ESP32 Arduino Core automatically creates HardwareSerial objects for all available UARTs: + + * ``Serial0`` (or ``Serial``) - UART0 (HP UART, typically used for programming and debug output) + * ``Serial1``, ``Serial2``, etc. - Additional HP UARTs (numbered sequentially) + * Additional Serial objects - LP UARTs, when available (numbered after HP UARTs) + + **Example:** The ESP32-C6 has 2 HP UARTs and 1 LP UART. The Arduino Core creates ``Serial0`` and ``Serial1`` (HP UARTs) plus ``Serial2`` (LP UART) HardwareSerial objects. + + **Important:** LP UARTs can be used as regular UART ports, but they have fixed GPIO pins for RX, TX, CTS, and RTS. It is not possible to change the pins for LP UARTs using ``setPins()``. + +Arduino-ESP32 Serial API +------------------------ + +begin +***** + +Initializes the Serial port with the specified baud rate and configuration. + +.. code-block:: arduino + + void begin(unsigned long baud, uint32_t config = SERIAL_8N1, int8_t rxPin = -1, int8_t txPin = -1, bool invert = false, unsigned long timeout_ms = 20000UL, uint8_t rxfifo_full_thrhd = 120); + +* ``baud`` - Baud rate (bits per second). Common values: 9600, 115200, 230400, etc. + + **Special value:** ``0`` enables baud rate detection (ESP32, ESP32-S2 only). The function will attempt to detect the baud rate for up to ``timeout_ms`` milliseconds. See the :ref:`Baud Rate Detection Example ` for usage details. +* ``config`` - Serial configuration (data bits, parity, stop bits): + + * ``SERIAL_8N1`` - 8 data bits, no parity, 1 stop bit (default) + * ``SERIAL_8N2`` - 8 data bits, no parity, 2 stop bits + * ``SERIAL_8E1`` - 8 data bits, even parity, 1 stop bit + * ``SERIAL_8E2`` - 8 data bits, even parity, 2 stop bits + * ``SERIAL_8O1`` - 8 data bits, odd parity, 1 stop bit + * ``SERIAL_8O2`` - 8 data bits, odd parity, 2 stop bits + * ``SERIAL_7N1``, ``SERIAL_7N2``, ``SERIAL_7E1``, ``SERIAL_7E2``, ``SERIAL_7O1``, ``SERIAL_7O2`` - 7 data bits variants + * ``SERIAL_6N1``, ``SERIAL_6N2``, ``SERIAL_6E1``, ``SERIAL_6E2``, ``SERIAL_6O1``, ``SERIAL_6O2`` - 6 data bits variants + * ``SERIAL_5N1``, ``SERIAL_5N2``, ``SERIAL_5E1``, ``SERIAL_5E2``, ``SERIAL_5O1``, ``SERIAL_5O2`` - 5 data bits variants + +* ``rxPin`` - RX pin number. Use ``-1`` to keep the default pin or current pin assignment. + +* ``txPin`` - TX pin number. Use ``-1`` to keep the default pin or current pin assignment. + +* ``invert`` - If ``true``, inverts the RX and TX signal polarity. + +* ``timeout_ms`` - Timeout in milliseconds for baud rate detection (when ``baud = 0``). Default: 20000 ms (20 seconds). + +* ``rxfifo_full_thrhd`` - RX FIFO full threshold (1-127 bytes). When the FIFO reaches this threshold, data is copied to the RX buffer. Default: 120 bytes. + +**Example:** + +.. code-block:: arduino + + // Basic initialization with default pins + Serial.begin(115200); + + // Initialize with custom pins + Serial1.begin(9600, SERIAL_8N1, 4, 5); + + // Initialize with baud rate detection (ESP32, ESP32-S2 only) + Serial.begin(0, SERIAL_8N1, -1, -1, false, 20000); + +end +*** + +Stops the Serial port and releases all resources. + +.. code-block:: arduino + + void end(void); + +This function disables the UART peripheral and frees all associated resources. + +available +********* + +Returns the number of bytes available for reading from the Serial port. + +.. code-block:: arduino + + int available(void); + +**Returns:** The number of bytes available in the RX buffer, or ``0`` if no data is available. + +**Example:** + +.. code-block:: arduino + + if (Serial.available() > 0) { + char data = Serial.read(); + } + +availableForWrite +***************** + +Returns the number of bytes that can be written to the Serial port without blocking. + +.. code-block:: arduino + + int availableForWrite(void); + +**Returns:** The number of bytes that can be written to the TX buffer without blocking. + +read +**** + +Reads a single byte from the Serial port. + +.. code-block:: arduino + + int read(void); + +**Returns:** The byte read (0-255), or ``-1`` if no data is available. + +**Example:** + +.. code-block:: arduino + + int data = Serial.read(); + if (data != -1) { + Serial.printf("Received: %c\n", data); + } + +read (buffer) +************* + +Reads multiple bytes from the Serial port into a buffer. + +.. code-block:: arduino + + size_t read(uint8_t *buffer, size_t size); + size_t read(char *buffer, size_t size); + +* ``buffer`` - Pointer to the buffer where data will be stored +* ``size`` - Maximum number of bytes to read + +**Returns:** The number of bytes actually read. + +**Example:** + +.. code-block:: arduino + + uint8_t buffer[64]; + size_t bytesRead = Serial.read(buffer, sizeof(buffer)); + Serial.printf("Read %d bytes\n", bytesRead); + +readBytes +********* + +Reads multiple bytes from the Serial port, blocking until the specified number of bytes is received or timeout occurs. + +.. code-block:: arduino + + size_t readBytes(uint8_t *buffer, size_t length); + size_t readBytes(char *buffer, size_t length); + +* ``buffer`` - Pointer to the buffer where data will be stored +* ``length`` - Number of bytes to read + +**Returns:** The number of bytes actually read (may be less than ``length`` if timeout occurs). + +**Note:** This function overrides ``Stream::readBytes()`` for better performance using ESP-IDF functions. + +write +***** + +Writes data to the Serial port. + +.. code-block:: arduino + + size_t write(uint8_t); + size_t write(const uint8_t *buffer, size_t size); + size_t write(const char *buffer, size_t size); + size_t write(const char *s); + size_t write(unsigned long n); + size_t write(long n); + size_t write(unsigned int n); + size_t write(int n); + +* Single byte: ``write(uint8_t)`` - Writes a single byte +* Buffer: ``write(buffer, size)`` - Writes multiple bytes from a buffer +* String: ``write(const char *s)`` - Writes a null-terminated string +* Number: ``write(n)`` - Writes a number as a single byte + +**Returns:** The number of bytes written. + +**Example:** + +.. code-block:: arduino + + Serial.write('A'); + Serial.write("Hello"); + Serial.write(buffer, 10); + Serial.write(65); // Writes byte value 65 + +peek +**** + +Returns the next byte in the RX buffer without removing it. + +.. code-block:: arduino + + int peek(void); + +**Returns:** The next byte (0-255), or ``-1`` if no data is available. + +**Note:** Unlike ``read()``, ``peek()`` does not remove the byte from the buffer. + +flush +***** + +Waits for all data in the TX buffer to be transmitted. + +.. code-block:: arduino + + void flush(void); + void flush(bool txOnly); + +* ``txOnly`` - If ``true``, only flushes the TX buffer. If ``false`` (default), also clears the RX buffer. + +**Note:** This function blocks until all data in the TX buffer has been sent. + +baudRate +******** + +Returns the current baud rate of the Serial port. + +.. code-block:: arduino + + uint32_t baudRate(void); + +**Returns:** The configured baud rate in bits per second. + +**Note:** When using baud rate detection (``begin(0)``), this function returns the detected baud rate, which may be slightly rounded (e.g., 115200 may return 115201). + +updateBaudRate +************** + +Updates the baud rate of an already initialized Serial port. + +.. code-block:: arduino + + void updateBaudRate(unsigned long baud); + +* ``baud`` - New baud rate + +**Note:** This function can be called after ``begin()`` to change the baud rate without reinitializing the port. + +setPins +******* + +Sets or changes the RX, TX, CTS, and RTS pins for the Serial port. + +.. code-block:: arduino + + bool setPins(int8_t rxPin, int8_t txPin, int8_t ctsPin = -1, int8_t rtsPin = -1); + +* ``rxPin`` - RX pin number. Use ``-1`` to keep current pin. +* ``txPin`` - TX pin number. Use ``-1`` to keep current pin. +* ``ctsPin`` - CTS (Clear To Send) pin for hardware flow control. Use ``-1`` to keep current pin or disable. +* ``rtsPin`` - RTS (Request To Send) pin for hardware flow control. Use ``-1`` to keep current pin or disable. + +**Returns:** ``true`` if pins are set successfully, ``false`` otherwise. + +**Note:** This function can be called before or after ``begin()``. When pins are changed, the previous pins are automatically detached. + +setRxBufferSize +*************** + +Sets the size of the RX buffer. + +.. code-block:: arduino + + size_t setRxBufferSize(size_t new_size); + +* ``new_size`` - New RX buffer size in bytes + +**Returns:** The actual buffer size set, or ``0`` on error. + +**Note:** This function must be called **before** ``begin()`` to take effect. Default RX buffer size is 256 bytes. + +setTxBufferSize +*************** + +Sets the size of the TX buffer. + +.. code-block:: arduino + + size_t setTxBufferSize(size_t new_size); + +* ``new_size`` - New TX buffer size in bytes + +**Returns:** The actual buffer size set, or ``0`` on error. + +**Note:** This function must be called **before** ``begin()`` to take effect. Default TX buffer size is 0 (no buffering). + +setRxTimeout +************ + +Sets the RX timeout threshold in UART symbol periods. + +.. code-block:: arduino + + bool setRxTimeout(uint8_t symbols_timeout); + +* ``symbols_timeout`` - Timeout threshold in UART symbol periods. Setting ``0`` disables timeout-based callbacks. + + The timeout is calculated based on the current baud rate and serial configuration. For example: + + * For ``SERIAL_8N1`` (10 bits per symbol), a timeout of 3 symbols at 9600 baud = 3 / (9600 / 10) = 3.125 ms + * Maximum timeout is calculated automatically by ESP-IDF based on the serial configuration + +**Returns:** ``true`` if timeout is set successfully, ``false`` otherwise. + +**Note:** +* When RX timeout occurs, the ``onReceive()`` callback is triggered +* For ESP32 and ESP32-S2, when using REF_TICK clock source (baud rates ≤ 250000), RX timeout is limited to 1 symbol +* To use higher RX timeout values on ESP32/ESP32-S2, set the clock source to APB using ``setClockSource(UART_CLK_SRC_APB)`` before ``begin()`` + +setRxFIFOFull +************* + +Sets the RX FIFO full threshold that triggers data transfer from FIFO to RX buffer. + +.. code-block:: arduino + + bool setRxFIFOFull(uint8_t fifoBytes); + +* ``fifoBytes`` - Number of bytes (1-127) that will trigger the FIFO full interrupt + + When the UART FIFO reaches this threshold, data is copied to the RX buffer and the ``onReceive()`` callback is triggered. + +**Returns:** ``true`` if threshold is set successfully, ``false`` otherwise. + +**Note:** +* Lower values (e.g., 1) provide byte-by-byte reception but consume more CPU time +* Higher values (e.g., 120) provide better performance but introduce latency +* Default value depends on baud rate: 1 byte for ≤ 115200 baud, 120 bytes for > 115200 baud + +onReceive +********* + +Sets a callback function that is called when data is received. + +.. code-block:: arduino + + void onReceive(OnReceiveCb function, bool onlyOnTimeout = false); + +* ``function`` - Callback function to call when data is received. Use ``NULL`` to disable the callback. +* ``onlyOnTimeout`` - If ``true``, callback is only called on RX timeout. If ``false`` (default), callback is called on both FIFO full and RX timeout events. + +**Callback Signature:** + +.. code-block:: arduino + + typedef std::function OnReceiveCb; + +**Note:** +* When ``onlyOnTimeout = false``, the callback is triggered when FIFO reaches the threshold (set by ``setRxFIFOFull()``) or on RX timeout +* When ``onlyOnTimeout = true``, the callback is only triggered on RX timeout, ensuring all data in a stream is available at once +* Using ``onlyOnTimeout = true`` may cause RX overflow if the RX buffer size is too small for the incoming data stream +* The callback is executed in a separate task, allowing non-blocking data processing + +**Example:** + +.. code-block:: arduino + + void onReceiveCallback() { + while (Serial1.available()) { + char c = Serial1.read(); + Serial.print(c); + } + } + + void setup() { + Serial1.begin(115200); + Serial1.onReceive(onReceiveCallback); + } + +onReceiveError +************** + +Sets a callback function that is called when a UART error occurs. + +.. code-block:: arduino + + void onReceiveError(OnReceiveErrorCb function); + +* ``function`` - Callback function to call when an error occurs. Use ``NULL`` to disable the callback. + +**Callback Signature:** + +.. code-block:: arduino + + typedef std::function OnReceiveErrorCb; + +**Error Types:** + +* ``UART_NO_ERROR`` - No error +* ``UART_BREAK_ERROR`` - Break condition detected +* ``UART_BUFFER_FULL_ERROR`` - RX buffer is full +* ``UART_FIFO_OVF_ERROR`` - UART FIFO overflow +* ``UART_FRAME_ERROR`` - Frame error (invalid stop bit) +* ``UART_PARITY_ERROR`` - Parity error + +**Example:** + +.. code-block:: arduino + + void onErrorCallback(hardwareSerial_error_t error) { + Serial.printf("UART Error: %d\n", error); + } + + void setup() { + Serial1.begin(115200); + Serial1.onReceiveError(onErrorCallback); + } + +eventQueueReset +*************** + +Clears all events in the event queue (events that trigger ``onReceive()`` and ``onReceiveError()``). + +.. code-block:: arduino + + void eventQueueReset(void); + +This function can be useful in some use cases where you want to clear pending events. + +setHwFlowCtrlMode +***************** + +Enables or disables hardware flow control using RTS and/or CTS pins. + +.. code-block:: arduino + + bool setHwFlowCtrlMode(SerialHwFlowCtrl mode = UART_HW_FLOWCTRL_CTS_RTS, uint8_t threshold = 64); + +* ``mode`` - Hardware flow control mode: + + * ``UART_HW_FLOWCTRL_DISABLE`` (0x0) - Disable hardware flow control + * ``UART_HW_FLOWCTRL_RTS`` (0x1) - Enable RX hardware flow control (RTS) + * ``UART_HW_FLOWCTRL_CTS`` (0x2) - Enable TX hardware flow control (CTS) + * ``UART_HW_FLOWCTRL_CTS_RTS`` (0x3) - Enable full hardware flow control (default) + +* ``threshold`` - Flow control threshold (default: 64, which is half of the FIFO length) + +**Returns:** ``true`` if flow control mode is set successfully, ``false`` otherwise. + +**Note:** CTS and RTS pins must be set using ``setPins()`` before enabling hardware flow control. + +setMode +******* + +Sets the UART operating mode. + +.. code-block:: arduino + + bool setMode(SerialMode mode); + +* ``mode`` - UART mode: + + * ``UART_MODE_UART`` (0x00) - Regular UART mode (default) + * ``UART_MODE_RS485_HALF_DUPLEX`` (0x01) - Half-duplex RS485 mode (RTS pin controls transceiver) + * ``UART_MODE_IRDA`` (0x02) - IRDA UART mode + * ``UART_MODE_RS485_COLLISION_DETECT`` (0x03) - RS485 collision detection mode (for testing) + * ``UART_MODE_RS485_APP_CTRL`` (0x04) - Application-controlled RS485 mode (for testing) + +**Returns:** ``true`` if mode is set successfully, ``false`` otherwise. + +**Note:** For RS485 half-duplex mode, the RTS pin must be configured using ``setPins()`` to control the transceiver. + +setClockSource +************** + +Sets the UART clock source. Must be called **before** ``begin()`` to take effect. + +.. code-block:: arduino + + bool setClockSource(SerialClkSrc clkSrc); + +* ``clkSrc`` - Clock source: + + * ``UART_CLK_SRC_DEFAULT`` - Default clock source (varies by SoC) + * ``UART_CLK_SRC_APB`` - APB clock (ESP32, ESP32-S2, ESP32-C3, ESP32-S3) + * ``UART_CLK_SRC_PLL`` - PLL clock (ESP32-C2, ESP32-C5, ESP32-C6, ESP32-C61, ESP32-H2, ESP32-P4) + * ``UART_CLK_SRC_XTAL`` - XTAL clock (ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-C61, ESP32-H2, ESP32-S3, ESP32-P4) + * ``UART_CLK_SRC_RTC`` - RTC clock (ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-C61, ESP32-H2, ESP32-S3, ESP32-P4) + * ``UART_CLK_SRC_REF_TICK`` - REF_TICK clock (ESP32, ESP32-S2) + +**Note:** +* Clock source availability varies by SoC. +* PLL frequency varies by SoC: ESP32-C2 (40 MHz), ESP32-H2 (48 MHz), ESP32-C5/C6/C61/P4 (80 MHz). +* ESP32-C5, ESP32-C6, ESP32-C61, and ESP32-P4 have LP UART that uses only RTC_FAST or XTAL/2 as clock source. +* For ESP32 and ESP32-S2, REF_TICK is used by default for baud rates ≤ 250000 to avoid baud rate changes when CPU frequency changes, but this limits RX timeout to 1 symbol. + +**Returns:** ``true`` if clock source is set successfully, ``false`` otherwise. + +setRxInvert +*********** + +Enables or disables RX signal inversion. + +.. code-block:: arduino + + bool setRxInvert(bool invert); + +* ``invert`` - If ``true``, inverts the RX signal polarity + +**Returns:** ``true`` if inversion is set successfully, ``false`` otherwise. + +setTxInvert +*********** + +Enables or disables TX signal inversion. + +.. code-block:: arduino + + bool setTxInvert(bool invert); + +* ``invert`` - If ``true``, inverts the TX signal polarity + +**Returns:** ``true`` if inversion is set successfully, ``false`` otherwise. + +setCtsInvert +************ + +Enables or disables CTS signal inversion. + +.. code-block:: arduino + + bool setCtsInvert(bool invert); + +* ``invert`` - If ``true``, inverts the CTS signal polarity + +**Returns:** ``true`` if inversion is set successfully, ``false`` otherwise. + +setRtsInvert +************ + +Enables or disables RTS signal inversion. + +.. code-block:: arduino + + bool setRtsInvert(bool invert); + +* ``invert`` - If ``true``, inverts the RTS signal polarity + +**Returns:** ``true`` if inversion is set successfully, ``false`` otherwise. + +setDebugOutput +************** + +Enables or disables debug output on this Serial port. + +.. code-block:: arduino + + void setDebugOutput(bool enable); + +* ``enable`` - If ``true``, enables debug output (ESP-IDF log messages will be sent to this Serial port) + +**Note:** By default, debug output is sent to UART0 (Serial0). + +operator bool +************* + +Returns whether the Serial port is initialized and ready. + +.. code-block:: arduino + + operator bool() const; + +**Returns:** ``true`` if the Serial port is initialized, ``false`` otherwise. + +**Example:** + +.. code-block:: arduino + + Serial1.begin(115200); + while (!Serial1) { + delay(10); // Wait for Serial1 to be ready + } + +Serial Configuration Constants +------------------------------ + +The following constants are used for serial configuration in the ``begin()`` function: + +Data Bits, Parity, Stop Bits +**************************** + +* ``SERIAL_5N1``, ``SERIAL_5N2``, ``SERIAL_5E1``, ``SERIAL_5E2``, ``SERIAL_5O1``, ``SERIAL_5O2`` - 5 data bits +* ``SERIAL_6N1``, ``SERIAL_6N2``, ``SERIAL_6E1``, ``SERIAL_6E2``, ``SERIAL_6O1``, ``SERIAL_6O2`` - 6 data bits +* ``SERIAL_7N1``, ``SERIAL_7N2``, ``SERIAL_7E1``, ``SERIAL_7E2``, ``SERIAL_7O1``, ``SERIAL_7O2`` - 7 data bits +* ``SERIAL_8N1``, ``SERIAL_8N2``, ``SERIAL_8E1``, ``SERIAL_8E2``, ``SERIAL_8O1``, ``SERIAL_8O2`` - 8 data bits + +Where: +* First number = data bits (5, 6, 7, or 8) +* Letter = parity: N (None), E (Even), O (Odd) +* Last number = stop bits (1 or 2) + +Example Applications +******************** + +.. _baud-rate-detection-example: + +Baud Rate Detection Example: + +.. literalinclude:: ../../../libraries/ESP32/examples/Serial/BaudRateDetect_Demo/BaudRateDetect_Demo.ino + :language: arduino + +OnReceive Callback Example: + +.. literalinclude:: ../../../libraries/ESP32/examples/Serial/OnReceive_Demo/OnReceive_Demo.ino + :language: arduino + +RS485 Communication Example: + +.. literalinclude:: ../../../libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino + :language: arduino + +Complete list of `Serial examples `_. From c2789c6a126956e0a31f3c48254c4d113bc88224 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Mon, 10 Nov 2025 09:50:02 -0300 Subject: [PATCH 13/38] feat(openthread): adds arduino openthread library documentation (#11991) * feat(openthread): adds arduino openthread library documentation * fix(openthread): Fixes document formatting * fix(op * fix(openthread): gramma fix Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(openthread): gramma fix Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(othread): use esp-idf instead of just idf * ci(pre-commit): Apply automatic fixes * fix(othread):better phrasing Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(openthread): space before time unit * fix(openthread): space before time unit --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- docs/en/libraries.rst | 12 + docs/en/openthread/openthread.rst | 296 +++++++++++ docs/en/openthread/openthread_cli.rst | 580 ++++++++++++++++++++++ docs/en/openthread/openthread_core.rst | 579 +++++++++++++++++++++ docs/en/openthread/openthread_dataset.rst | 461 +++++++++++++++++ 5 files changed, 1928 insertions(+) create mode 100644 docs/en/openthread/openthread.rst create mode 100644 docs/en/openthread/openthread_cli.rst create mode 100644 docs/en/openthread/openthread_core.rst create mode 100644 docs/en/openthread/openthread_dataset.rst diff --git a/docs/en/libraries.rst b/docs/en/libraries.rst index daddca2b1d8..d9961d67b41 100644 --- a/docs/en/libraries.rst +++ b/docs/en/libraries.rst @@ -103,6 +103,18 @@ Matter APIs matter/matter_ep matter/ep_* +OpenThread APIs +--------------- + +.. toctree:: + :maxdepth: 1 + :glob: + + openthread/openthread + openthread/openthread_cli + openthread/openthread_core + openthread/openthread_dataset + Zigbee APIs ----------- diff --git a/docs/en/openthread/openthread.rst b/docs/en/openthread/openthread.rst new file mode 100644 index 00000000000..9a72d035b2e --- /dev/null +++ b/docs/en/openthread/openthread.rst @@ -0,0 +1,296 @@ +########## +OpenThread +########## + +About +----- + +The OpenThread library provides support for creating Thread network devices using ESP32 SoCs with IEEE 802.15.4 radio support. The library offers two different programming interfaces for interacting with the OpenThread stack: + +* **Stream-based CLI enhanced with Helper Functions API**: Command-line interface helper functions that send OpenThread CLI commands and parse responses +* **Classes API**: Object-oriented classes that directly call OpenThread API functions + +The OpenThread library is built on top of `ESP OpenThread `_ and provides a high-level Arduino-style interface for creating Thread devices. + +Thread Protocol Overview +************************ + +Thread is an IPv6-based, low-power wireless mesh networking protocol designed for smart home and IoT applications. It provides secure, reliable, and scalable connectivity for battery-powered devices. + +**Key Features:** + +* **IPv6-based**: Native IPv6 addressing and routing +* **Mesh Networking**: Self-healing mesh topology with automatic routing +* **Low Power**: Optimized for battery-operated devices +* **Security**: Built-in security features including encryption and authentication +* **Scalability**: Supports up to 250+ devices per network +* **Reliability**: Automatic route discovery and self-healing capabilities + +Thread Network Topology +*********************** + +.. code-block:: text + + ┌─────────────────┐ + │ Internet │ + └─────────────────┘ + ▲ + │ + │ + ┌─────────────────┐ + │ Wi-Fi Router │ + │ │ + └─────────────────┘ + │ + ┌───────────────┴───────────────┐ + │ │ + ▼ ▼ + ┌───────────────────────┐ ┌──────────────────┐ + │ Other Wi-Fi Devices │ │ Thread Border │ + │ │ │ Router │ + └───────────────────────┘ └──────────────────┘ + │ + │ Thread Network + │ + ┌─────────────────────────┼─────────────────────────┐ + │ │ │ + ▼ ▼ ▼ + ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ + │ Thread Leader │◄─────►│ Thread Router │◄─────►│ Thread Child │ + │ │ │ │ │ │ + └─────────────────┘ └─────────────────┘ └─────────────────┘ + │ │ │ + └──────────────────────────┴──────────────────────────┘ + Other Thread Nodes + + +**Thread Device Roles:** + +* **Leader**: Manages the Thread network, assigns router IDs, and maintains network state. This device should be powered by a wall adapter. +* **Router**: Extends network range, routes messages, maintains network topology. This device should be powered by a wall adapter. +* **Child**: End device that can sleep for extended periods (battery-powered devices). It can be powered by a battery or a wall adapter. +* **Detached**: Device not currently participating in a Thread network. +* **Disabled**: The Thread stack and interface are disabled. + +**Other Thread Network Devices:** + +* **Thread Border Router**: A device that connects a Thread network to other IP-based networks in the external world. The Thread Border Router is connected to both the Thread network and external IP networks (like a Wi-Fi router), enabling Thread devices to communicate with devices on other networks and the Internet. A Border Router can be implemented on a device with any Thread device role (Leader, Router, or Child). It can also act as a gateway to other protocols such as MQTT or Zigbee. + +OpenThread Library Structure +---------------------------- + +**The library provides two main programming interfaces:** + +* **CLI Helper Functions API**: Functions that interact with OpenThread through the CLI interface + * ``otGetRespCmd()``: Execute CLI command and get response + * ``otExecCommand()``: Execute CLI command with arguments + * ``otPrintRespCLI()``: Execute CLI command and print response to Stream + * ``OpenThreadCLI``: Stream-based CLI interface class + +* **Classes API**: Object-oriented classes that directly call OpenThread API functions + * ``OpenThread``: Main class for managing Thread network operations + * ``DataSet``: Class for managing Thread operational datasets + +OpenThread Class +**************** + +The ``OpenThread`` class is the main entry point for Thread operations using the Classes API. It provides direct access to OpenThread API functions for managing the Thread network. + +* **Network Management**: Starting, stopping, and managing the Thread network +* **Device Role Management**: Getting and monitoring device role (Leader, Router, Child, Detached, Disabled) +* **Dataset Management**: Setting and getting operational dataset parameters +* **Address Management**: Getting mesh-local addresses, RLOC, and multicast addresses +* **Network Information**: Getting network name, channel, PAN ID, and other network parameters + +The ``OpenThread`` class is implemented as a singleton, meaning there's only one instance available globally. You access it directly as ``OThread`` without creating an instance. + +.. toctree:: + :maxdepth: 2 + + openthread_core + +DataSet Class +************* + +The ``DataSet`` class provides a convenient way to manage Thread operational datasets. It allows you to create, configure, and apply operational datasets to the Thread network. + +* **Dataset Creation**: Create new operational datasets +* **Parameter Configuration**: Set network name, channel, PAN ID, network key, and extended PAN ID +* **Dataset Application**: Apply datasets to the Thread network +* **Dataset Retrieval**: Get current dataset parameters + +.. toctree:: + :maxdepth: 2 + + openthread_dataset + +OpenThreadCLI +************* + +The ``OpenThreadCLI`` class provides a Stream-based interface for interacting with the OpenThread CLI. It allows you to send CLI commands and receive responses programmatically. + +* **CLI Interface**: Stream-based interface for sending commands and receiving responses +* **Command Execution**: Execute OpenThread CLI commands programmatically +* **Response Handling**: Parse and handle CLI command responses +* **Console Mode**: Interactive console mode for debugging and testing + +.. toctree:: + :maxdepth: 2 + + openthread_cli + +CLI Helper Functions API +************************* + +The CLI Helper Functions API provides utility functions for executing OpenThread CLI commands and parsing responses. This API is useful when you need to interact with OpenThread through the CLI interface. + +* **Command Execution**: Execute CLI commands with arguments +* **Response Parsing**: Get and parse CLI command responses +* **Error Handling**: Handle CLI command errors and return codes + +**Key Functions:** + +* ``otGetRespCmd()``: Execute CLI command and get response string +* ``otExecCommand()``: Execute CLI command with arguments and error handling +* ``otPrintRespCLI()``: Execute CLI command and print response to Stream + +For detailed documentation on the CLI Helper Functions API, see the :doc:`openthread_cli` documentation. + +Supported Hardware +------------------ + +The OpenThread library requires ESP32 SoCs with IEEE 802.15.4 radio support: + +* **ESP32-H2**: Native Thread support with IEEE 802.15.4 radio +* **ESP32-C6**: Thread support with IEEE 802.15.4 radio (when Thread is enabled) +* **ESP32-C5**: Thread support with IEEE 802.15.4 radio (when Thread is enabled) + +**Note:** Thread support must be enabled in the ESP-IDF configuration (``CONFIG_OPENTHREAD_ENABLED``). This is done automatically when using the ESP32 Arduino OpenThread library. + +Common Problems and Issues +-------------------------- + +Troubleshooting +--------------- + +Common Issues +************* + +**Thread network not starting** + * Ensure the device has IEEE 802.15.4 radio support (ESP32-H2, ESP32-C6, ESP32-C5) + * Check that Thread is enabled in ESP-IDF configuration (``CONFIG_OPENTHREAD_ENABLED``) + * Verify that ``OpenThread::begin()`` is called before using Thread functions + * Check Serial Monitor for initialization errors + +**Device not joining network** + * Verify the operational dataset parameters (network name, network key, channel, PAN ID) + * Ensure the device is within range of the Thread network + * Check that the network key and extended PAN ID match the network you're trying to join + * Verify the device role is not "Detached" + +**CLI commands not working** + * Ensure ``OpenThreadCLI::begin()`` is called before using CLI functions + * Check that ``OpenThreadCLI::startConsole()`` is called with a valid Stream + * Verify the CLI is properly initialized and running + * Check Serial Monitor for CLI initialization errors + +**Address not available** + * Wait for the device to join the Thread network (role should be Child, Router, or Leader) + * Check that the network interface is up using ``networkInterfaceUp()`` + * Verify the device has obtained a mesh-local address + * Check network connectivity using ``getRloc()`` or ``getMeshLocalEid()`` + +**Dataset not applying** + * Ensure all required dataset parameters are set (network name, network key, channel) + * Verify the dataset is valid before applying + * Check that OpenThread is started before applying the dataset + * Verify the dataset parameters match the target network + +Initialization Order +******************** + +For proper initialization, follow this order: + +1. Initialize OpenThread stack: ``OpenThread::begin()`` +2. Initialize OpenThreadCLI (if using CLI): ``OpenThreadCLI::begin()`` +3. Start CLI console (if using CLI): ``OpenThreadCLI::startConsole()`` +4. Configure dataset (if needed): Create and configure ``DataSet`` +5. Apply dataset (if needed): ``OThread.commitDataSet(dataset)`` +6. Start Thread network: ``OThread.start()`` +7. Bring network interface up: ``OThread.networkInterfaceUp()`` + +Example +------- + +Basic OpenThread Setup +********************** + +Using the Classes API: + +.. code-block:: arduino + + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread stack + OpenThread::begin(); + + // Wait for OpenThread to be ready + while (!OThread) { + delay(100); + } + + // Create and configure dataset + DataSet dataset; + dataset.initNew(); + dataset.setNetworkName("MyThreadNetwork"); + dataset.setChannel(15); + + // Apply dataset and start network + OThread.commitDataSet(dataset); + OThread.start(); + OThread.networkInterfaceUp(); + + // Print network information + OpenThread::otPrintNetworkInformation(Serial); + } + +Using the CLI Helper Functions API: + +.. code-block:: arduino + + #include + #include + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread stack + OpenThread::begin(); + + // Initialize and start CLI + OThreadCLI.begin(); + OThreadCLI.startConsole(Serial); + + // Wait for CLI to be ready + while (!OThreadCLI) { + delay(100); + } + + // Execute CLI commands + char resp[256]; + if (otGetRespCmd("state", resp)) { + Serial.printf("Thread state: %s\r\n", resp); + } + + if (otExecCommand("networkname", "MyThreadNetwork", NULL)) { + Serial.println("Network name set successfully"); + } + + if (otExecCommand("ifconfig", "up", NULL)) { + Serial.println("Network interface up"); + } + } diff --git a/docs/en/openthread/openthread_cli.rst b/docs/en/openthread/openthread_cli.rst new file mode 100644 index 00000000000..1d598fb5063 --- /dev/null +++ b/docs/en/openthread/openthread_cli.rst @@ -0,0 +1,580 @@ +############## +OpenThread CLI +############## + +About +----- + +The OpenThread CLI (Command-Line Interface) provides two ways to interact with the OpenThread stack through CLI commands: + +* **CLI Helper Functions API**: Utility functions that execute CLI commands and parse responses +* **OpenThreadCLI Class**: Stream-based interface for interactive CLI access + +The CLI Helper Functions API is useful for programmatic control using OpenThread CLI commands, while the ``OpenThreadCLI`` class provides a Stream interface for interactive console access. + +CLI Helper Functions API +************************ + +The CLI Helper Functions API consists of utility functions that execute OpenThread CLI commands and handle responses. These functions interact with the OpenThread CLI through the ``OpenThreadCLI`` interface. + +otGetRespCmd +^^^^^^^^^^^^ + +Executes a CLI command and gets the response. + +.. code-block:: arduino + + bool otGetRespCmd(const char *cmd, char *resp = NULL, uint32_t respTimeout = 5000); + +* ``cmd`` - The CLI command to execute (e.g., ``"state"``, ``"networkname"``) +* ``resp`` - Buffer to store the response (optional, can be ``NULL``) +* ``respTimeout`` - Timeout in milliseconds for waiting for response (default: 5000 ms) + +This function executes a CLI command and collects all response lines until "Done" or "Error" is received. If ``resp`` is not ``NULL``, the response is stored in the buffer. + +**Returns:** ``true`` if command executed successfully, ``false`` on error or timeout. + +**Example:** + +.. code-block:: arduino + + char response[256]; + if (otGetRespCmd("state", response)) { + Serial.printf("Thread state: %s\r\n", response); + } + + if (otGetRespCmd("networkname", response)) { + Serial.printf("Network name: %s\r\n", response); + } + +otExecCommand +^^^^^^^^^^^^^ + +Executes a CLI command with arguments. + +.. code-block:: arduino + + bool otExecCommand(const char *cmd, const char *arg, ot_cmd_return_t *returnCode = NULL); + +* ``cmd`` - The CLI command to execute (e.g., ``"networkname"``, ``"channel"``) +* ``arg`` - The command argument (can be ``NULL`` for commands without arguments) +* ``returnCode`` - Pointer to ``ot_cmd_return_t`` structure to receive error information (optional) + +This function executes a CLI command with an optional argument and returns the success status. If ``returnCode`` is provided, it will be populated with error information on failure. + +**Returns:** ``true`` if command executed successfully, ``false`` on error. + +**Error Structure:** + +.. code-block:: arduino + + typedef struct { + int errorCode; // OpenThread error code + String errorMessage; // Error message string + } ot_cmd_return_t; + +**Example:** + +.. code-block:: arduino + + ot_cmd_return_t errorInfo; + + // Set network name + if (otExecCommand("networkname", "MyThreadNetwork", &errorInfo)) { + Serial.println("Network name set successfully"); + } else { + Serial.printf("Error %d: %s\r\n", errorInfo.errorCode, errorInfo.errorMessage.c_str()); + } + + // Set channel + if (otExecCommand("channel", "15", &errorInfo)) { + Serial.println("Channel set successfully"); + } + + // Bring interface up + if (otExecCommand("ifconfig", "up", NULL)) { + Serial.println("Interface is up"); + } + +otPrintRespCLI +^^^^^^^^^^^^^^ + +Executes a CLI command and prints the response to a Stream. + +.. code-block:: arduino + + bool otPrintRespCLI(const char *cmd, Stream &output, uint32_t respTimeout); + +* ``cmd`` - The CLI command to execute +* ``output`` - The Stream object to print responses to (e.g., ``Serial``) +* ``respTimeout`` - Timeout in milliseconds per response line (default: 5000 ms) + +This function executes a CLI command and prints all response lines to the specified Stream until "Done" or "Error" is received. + +**Returns:** ``true`` if command executed successfully, ``false`` on error or timeout. + +**Example:** + +.. code-block:: arduino + + // Print all IP addresses + if (otPrintRespCLI("ipaddr", Serial, 5000)) { + Serial.println("IP addresses printed"); + } + + // Print all multicast addresses + if (otPrintRespCLI("ipmaddr", Serial, 5000)) { + Serial.println("Multicast addresses printed"); + } + +OpenThreadCLI Class +******************* + +The ``OpenThreadCLI`` class provides a Stream-based interface for interacting with the OpenThread CLI. It allows you to send CLI commands and receive responses programmatically or through an interactive console. + +Initialization +************** + +begin +^^^^^ + +Initializes the OpenThread CLI. + +.. code-block:: arduino + + void begin(); + +This function initializes the OpenThread CLI interface. It must be called after ``OpenThread::begin()`` and before using any CLI functions. + +**Note:** The OpenThread stack must be started before initializing the CLI. + +end +^^^ + +Stops and cleans up the OpenThread CLI. + +.. code-block:: arduino + + void end(); + +This function stops the CLI interface and cleans up all CLI resources. + +Console Management +****************** + +startConsole +^^^^^^^^^^^^ + +Starts an interactive console for CLI access. + +.. code-block:: arduino + + void startConsole(Stream &otStream, bool echoback = true, const char *prompt = "ot> "); + +* ``otStream`` - The Stream object for console I/O (e.g., ``Serial``) +* ``echoback`` - If ``true``, echo characters back to the console (default: ``true``) +* ``prompt`` - The console prompt string (default: ``"ot> "``, can be ``NULL`` for no prompt) + +This function starts an interactive console task that allows you to type CLI commands directly. The console will echo input and display responses. + +**Example:** + +.. code-block:: arduino + + OThreadCLI.startConsole(Serial, true, "ot> "); + +stopConsole +^^^^^^^^^^^ + +Stops the interactive console. + +.. code-block:: arduino + + void stopConsole(); + +This function stops the interactive console task. + +setStream +^^^^^^^^^ + +Changes the console Stream object. + +.. code-block:: arduino + + void setStream(Stream &otStream); + +* ``otStream`` - The new Stream object for console I/O + +This function changes the Stream object used by the console. + +setEchoBack +^^^^^^^^^^^ + +Changes the echo back setting. + +.. code-block:: arduino + + void setEchoBack(bool echoback); + +* ``echoback`` - If ``true``, echo characters back to the console + +This function changes whether characters are echoed back to the console. + +setPrompt +^^^^^^^^^ + +Changes the console prompt. + +.. code-block:: arduino + + void setPrompt(char *prompt); + +* ``prompt`` - The new prompt string (can be ``NULL`` for no prompt) + +This function changes the console prompt string. + +onReceive +^^^^^^^^^ + +Sets a callback function for CLI responses. + +.. code-block:: arduino + + void onReceive(OnReceiveCb_t func); + +* ``func`` - Callback function to call when a complete line of output is received + +The callback function is called whenever a complete line of output is received from the OpenThread CLI. This allows you to process CLI responses asynchronously. + +**Callback Signature:** + +.. code-block:: arduino + + typedef std::function OnReceiveCb_t; + +**Example:** + +.. code-block:: arduino + + void handleCLIResponse() { + while (OThreadCLI.available() > 0) { + char c = OThreadCLI.read(); + // Process response character + } + } + + OThreadCLI.onReceive(handleCLIResponse); + +Buffer Management +***************** + +setTxBufferSize +^^^^^^^^^^^^^^^ + +Sets the transmit buffer size. + +.. code-block:: arduino + + size_t setTxBufferSize(size_t tx_queue_len); + +* ``tx_queue_len`` - The size of the transmit buffer in bytes (default: 256) + +This function sets the size of the transmit buffer used for sending CLI commands. + +**Returns:** The actual buffer size set, or 0 on error. + +setRxBufferSize +^^^^^^^^^^^^^^^ + +Sets the receive buffer size. + +.. code-block:: arduino + + size_t setRxBufferSize(size_t rx_queue_len); + +* ``rx_queue_len`` - The size of the receive buffer in bytes (default: 1024) + +This function sets the size of the receive buffer used for receiving CLI responses. + +**Returns:** The actual buffer size set, or 0 on error. + +Stream Interface +**************** + +The ``OpenThreadCLI`` class implements the Arduino ``Stream`` interface, allowing you to use it like any other Stream object. + +write +^^^^^ + +Writes a byte to the CLI. + +.. code-block:: arduino + + size_t write(uint8_t c); + +* ``c`` - The byte to write + +This function writes a single byte to the CLI transmit buffer. + +**Returns:** The number of bytes written (1 on success, 0 on failure). + +available +^^^^^^^^^ + +Checks if data is available to read. + +.. code-block:: arduino + + int available(); + +This function returns the number of bytes available in the receive buffer. + +**Returns:** Number of bytes available, or -1 if CLI is not initialized. + +read +^^^^ + +Reads a byte from the CLI. + +.. code-block:: arduino + + int read(); + +This function reads a single byte from the CLI receive buffer. + +**Returns:** The byte read, or -1 if no data is available. + +peek +^^^^ + +Peeks at the next byte without removing it. + +.. code-block:: arduino + + int peek(); + +This function returns the next byte in the receive buffer without removing it. + +**Returns:** The byte, or -1 if no data is available. + +flush +^^^^^ + +Flushes the transmit buffer. + +.. code-block:: arduino + + void flush(); + +This function waits for all data in the transmit buffer to be sent. + +Operators +********* + +bool operator +^^^^^^^^^^^^^ + +Returns whether the CLI is started. + +.. code-block:: arduino + + operator bool() const; + +This operator returns ``true`` if the CLI is started and ready, ``false`` otherwise. + +**Example:** + +.. code-block:: arduino + + if (OThreadCLI) { + Serial.println("CLI is ready"); + } + +Example +------- + +Using CLI Helper Functions API +****************************** + +.. code-block:: arduino + + #include + #include + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread + OpenThread::begin(); + while (!OThread) { + delay(100); + } + + // Initialize CLI + OThreadCLI.begin(); + while (!OThreadCLI) { + delay(100); + } + + // Get network state + char resp[256]; + if (otGetRespCmd("state", resp)) { + Serial.printf("Thread state: %s\r\n", resp); + } + + // Set network name + ot_cmd_return_t errorInfo; + if (otExecCommand("networkname", "MyThreadNetwork", &errorInfo)) { + Serial.println("Network name set"); + } else { + Serial.printf("Error: %s\r\n", errorInfo.errorMessage.c_str()); + } + + // Set channel + if (otExecCommand("channel", "15", NULL)) { + Serial.println("Channel set"); + } + + // Bring interface up + if (otExecCommand("ifconfig", "up", NULL)) { + Serial.println("Interface up"); + } + + // Print IP addresses + otPrintRespCLI("ipaddr", Serial, 5000); + } + +Using OpenThreadCLI Class +************************* + +Interactive Console +^^^^^^^^^^^^^^^^^^^ + +.. code-block:: arduino + + #include + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread + OpenThread::begin(); + while (!OThread) { + delay(100); + } + + // Initialize and start CLI console + OThreadCLI.begin(); + OThreadCLI.startConsole(Serial, true, "ot> "); + + Serial.println("OpenThread CLI Console Ready"); + Serial.println("Type OpenThread CLI commands (e.g., 'state', 'networkname')"); + } + +Programmatic CLI Access +^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: arduino + + #include + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread + OpenThread::begin(); + while (!OThread) { + delay(100); + } + + // Initialize CLI + OThreadCLI.begin(); + while (!OThreadCLI) { + delay(100); + } + + // Send CLI commands programmatically + OThreadCLI.println("state"); + delay(100); + while (OThreadCLI.available() > 0) { + char c = OThreadCLI.read(); + Serial.write(c); + } + + // Send command with argument + OThreadCLI.print("networkname "); + OThreadCLI.println("MyThreadNetwork"); + delay(100); + while (OThreadCLI.available() > 0) { + char c = OThreadCLI.read(); + Serial.write(c); + } + } + +Using Callback for Responses +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: arduino + + #include + #include + + void handleCLIResponse() { + String response = ""; + while (OThreadCLI.available() > 0) { + char c = OThreadCLI.read(); + if (c == '\n' || c == '\r') { + if (response.length() > 0) { + Serial.printf("CLI Response: %s\r\n", response.c_str()); + response = ""; + } + } else { + response += c; + } + } + } + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread + OpenThread::begin(); + while (!OThread) { + delay(100); + } + + // Initialize CLI with callback + OThreadCLI.begin(); + OThreadCLI.onReceive(handleCLIResponse); + + // Send commands + OThreadCLI.println("state"); + delay(500); + OThreadCLI.println("networkname"); + delay(500); + } + +Common OpenThread CLI Commands +****************************** + +Here are some commonly used OpenThread CLI commands: + +* ``state`` - Get the current Thread state +* ``networkname `` - Set or get the network name +* ``channel `` - Set or get the channel (11-26) +* ``panid `` - Set or get the PAN ID +* ``extpanid `` - Set or get the extended PAN ID +* ``networkkey `` - Set or get the network key +* ``ifconfig up`` - Bring the network interface up +* ``ifconfig down`` - Bring the network interface down +* ``ipaddr`` - List all IPv6 addresses +* ``ipmaddr`` - List all multicast addresses +* ``rloc16`` - Get the RLOC16 +* ``leaderdata`` - Get leader data +* ``router table`` - Get router table +* ``child table`` - Get child table + +For a complete list of OpenThread CLI commands, refer to the `OpenThread CLI Reference `_. diff --git a/docs/en/openthread/openthread_core.rst b/docs/en/openthread/openthread_core.rst new file mode 100644 index 00000000000..0ba88acde88 --- /dev/null +++ b/docs/en/openthread/openthread_core.rst @@ -0,0 +1,579 @@ +################ +OpenThread Class +################ + +About +----- + +The ``OpenThread`` class provides direct access to OpenThread API functions for managing Thread network operations. This is the **Classes API** approach, which offers object-oriented methods that directly call OpenThread API functions. + +**Key Features:** +* Direct OpenThread API access +* Network management (start, stop, interface control) +* Dataset management +* Address management with caching +* Network information retrieval +* Device role monitoring + +**Use Cases:** +* Thread network configuration and management +* Direct control over Thread operations +* Programmatic network setup +* Address and routing information access + +API Reference +------------- + +Initialization +************** + +begin +^^^^^ + +Initializes the OpenThread stack. + +.. code-block:: arduino + + static void begin(bool OThreadAutoStart = true); + +* ``OThreadAutoStart`` - If ``true``, automatically starts Thread with default dataset from NVS or ESP-IDF settings (default: ``true``) + +This function initializes the OpenThread stack and creates the OpenThread task. If ``OThreadAutoStart`` is ``true``, it will attempt to start Thread using the active dataset from NVS or ESP-IDF default settings. + +**Note:** This is a static function and should be called before creating an ``OpenThread`` instance. + +end +^^^ + +Stops and cleans up the OpenThread stack. + +.. code-block:: arduino + + static void end(); + +This function stops the OpenThread task and cleans up all OpenThread resources. It should be called when you no longer need the OpenThread stack. + +**Note:** This is a static function. + +Network Control +*************** + +start +^^^^^ + +Starts the Thread network. + +.. code-block:: arduino + + void start(); + +This function enables the Thread network. The device will attempt to join or form a Thread network based on the active dataset. + +**Note:** The network interface must be brought up separately using ``networkInterfaceUp()``. + +stop +^^^^ + +Stops the Thread network. + +.. code-block:: arduino + + void stop(); + +This function disables the Thread network. The device will leave the Thread network and stop participating in Thread operations. + +networkInterfaceUp +^^^^^^^^^^^^^^^^^^ + +Brings the Thread network interface up. + +.. code-block:: arduino + + void networkInterfaceUp(); + +This function enables the Thread IPv6 interface (equivalent to CLI command ``ifconfig up``). The device will be able to send and receive IPv6 packets over the Thread network. + +networkInterfaceDown +^^^^^^^^^^^^^^^^^^^^ + +Brings the Thread network interface down. + +.. code-block:: arduino + + void networkInterfaceDown(); + +This function disables the Thread IPv6 interface (equivalent to CLI command ``ifconfig down``). The device will stop sending and receiving IPv6 packets. + +Dataset Management +****************** + +commitDataSet +^^^^^^^^^^^^^ + +Commits an operational dataset to the Thread network. + +.. code-block:: arduino + + void commitDataSet(const DataSet &dataset); + +* ``dataset`` - The ``DataSet`` object containing the operational dataset parameters + +This function sets the active operational dataset for the Thread network. The dataset must be properly configured before committing. + +**Example:** + +.. code-block:: arduino + + DataSet dataset; + dataset.initNew(); + dataset.setNetworkName("MyThreadNetwork"); + dataset.setChannel(15); + dataset.setNetworkKey(networkKey); + OThread.commitDataSet(dataset); + +getCurrentDataSet +^^^^^^^^^^^^^^^^^ + +Gets the current active operational dataset. + +.. code-block:: arduino + + const DataSet &getCurrentDataSet() const; + +This function returns a reference to a ``DataSet`` object containing the current active operational dataset parameters. + +Network Information +******************* + +getNetworkName +^^^^^^^^^^^^^^ + +Gets the Thread network name. + +.. code-block:: arduino + + String getNetworkName() const; + +This function returns the network name as a ``String``. + +getExtendedPanId +^^^^^^^^^^^^^^^^ + +Gets the extended PAN ID. + +.. code-block:: arduino + + const uint8_t *getExtendedPanId() const; + +This function returns a pointer to an 8-byte array containing the extended PAN ID. + +getNetworkKey +^^^^^^^^^^^^^ + +Gets the network key. + +.. code-block:: arduino + + const uint8_t *getNetworkKey() const; + +This function returns a pointer to a 16-byte array containing the network key. + +**Note:** The network key is stored in static storage and persists after the function returns. + +getChannel +^^^^^^^^^^ + +Gets the Thread channel. + +.. code-block:: arduino + + uint8_t getChannel() const; + +This function returns the Thread channel number (11-26). + +getPanId +^^^^^^^^ + +Gets the PAN ID. + +.. code-block:: arduino + + uint16_t getPanId() const; + +This function returns the PAN ID as a 16-bit value. + +Device Role +*********** + +otGetDeviceRole +^^^^^^^^^^^^^^^ + +Gets the current device role. + +.. code-block:: arduino + + static ot_device_role_t otGetDeviceRole(); + +This function returns the current Thread device role: + +* ``OT_ROLE_DISABLED`` - The Thread stack is disabled +* ``OT_ROLE_DETACHED`` - Not currently participating in a Thread network +* ``OT_ROLE_CHILD`` - The Thread Child role +* ``OT_ROLE_ROUTER`` - The Thread Router role +* ``OT_ROLE_LEADER`` - The Thread Leader role + +**Note:** This is a static function. + +otGetStringDeviceRole +^^^^^^^^^^^^^^^^^^^^^ + +Gets the current device role as a string. + +.. code-block:: arduino + + static const char *otGetStringDeviceRole(); + +This function returns a human-readable string representation of the current device role. + +**Note:** This is a static function. + +otPrintNetworkInformation +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Prints network information to a Stream. + +.. code-block:: arduino + + static void otPrintNetworkInformation(Stream &output); + +* ``output`` - The Stream object to print to (e.g., ``Serial``) + +This function prints comprehensive network information including: +* Device role +* RLOC16 +* Network name +* Channel +* PAN ID +* Extended PAN ID +* Network key + +**Note:** This is a static function. + +Address Management +****************** + +getMeshLocalPrefix +^^^^^^^^^^^^^^^^^^ + +Gets the mesh-local prefix. + +.. code-block:: arduino + + const otMeshLocalPrefix *getMeshLocalPrefix() const; + +This function returns a pointer to the mesh-local prefix structure. + +getMeshLocalEid +^^^^^^^^^^^^^^^ + +Gets the mesh-local EID (Endpoint Identifier). + +.. code-block:: arduino + + IPAddress getMeshLocalEid() const; + +This function returns the mesh-local IPv6 address as an ``IPAddress`` object. + +getLeaderRloc +^^^^^^^^^^^^^ + +Gets the Thread Leader RLOC (Routing Locator). + +.. code-block:: arduino + + IPAddress getLeaderRloc() const; + +This function returns the IPv6 address of the Thread Leader as an ``IPAddress`` object. + +getRloc +^^^^^^^ + +Gets the node RLOC (Routing Locator). + +.. code-block:: arduino + + IPAddress getRloc() const; + +This function returns the IPv6 RLOC address of this node as an ``IPAddress`` object. + +getRloc16 +^^^^^^^^^ + +Gets the RLOC16 (16-bit Routing Locator). + +.. code-block:: arduino + + uint16_t getRloc16() const; + +This function returns the 16-bit RLOC of this node. + +Unicast Address Management +************************** + +getUnicastAddressCount +^^^^^^^^^^^^^^^^^^^^^^ + +Gets the number of unicast addresses. + +.. code-block:: arduino + + size_t getUnicastAddressCount() const; + +This function returns the number of unicast IPv6 addresses assigned to this node. The count is cached for performance. + +getUnicastAddress +^^^^^^^^^^^^^^^^^ + +Gets a unicast address by index. + +.. code-block:: arduino + + IPAddress getUnicastAddress(size_t index) const; + +* ``index`` - The index of the address (0-based) + +This function returns the unicast IPv6 address at the specified index as an ``IPAddress`` object. + +**Note:** Addresses are cached for performance. Use ``clearUnicastAddressCache()`` to refresh the cache. + +getAllUnicastAddresses +^^^^^^^^^^^^^^^^^^^^^^ + +Gets all unicast addresses. + +.. code-block:: arduino + + std::vector getAllUnicastAddresses() const; + +This function returns a vector containing all unicast IPv6 addresses assigned to this node. + +Multicast Address Management +**************************** + +getMulticastAddressCount +^^^^^^^^^^^^^^^^^^^^^^^^ + +Gets the number of multicast addresses. + +.. code-block:: arduino + + size_t getMulticastAddressCount() const; + +This function returns the number of multicast IPv6 addresses subscribed by this node. The count is cached for performance. + +getMulticastAddress +^^^^^^^^^^^^^^^^^^^ + +Gets a multicast address by index. + +.. code-block:: arduino + + IPAddress getMulticastAddress(size_t index) const; + +* ``index`` - The index of the address (0-based) + +This function returns the multicast IPv6 address at the specified index as an ``IPAddress`` object. + +**Note:** Addresses are cached for performance. Use ``clearMulticastAddressCache()`` to refresh the cache. + +getAllMulticastAddresses +^^^^^^^^^^^^^^^^^^^^^^^^ + +Gets all multicast addresses. + +.. code-block:: arduino + + std::vector getAllMulticastAddresses() const; + +This function returns a vector containing all multicast IPv6 addresses subscribed by this node. + +Cache Management +**************** + +clearUnicastAddressCache +^^^^^^^^^^^^^^^^^^^^^^^^ + +Clears the unicast address cache. + +.. code-block:: arduino + + void clearUnicastAddressCache() const; + +This function clears the cached unicast addresses. The cache will be automatically repopulated on the next address access. + +clearMulticastAddressCache +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Clears the multicast address cache. + +.. code-block:: arduino + + void clearMulticastAddressCache() const; + +This function clears the cached multicast addresses. The cache will be automatically repopulated on the next address access. + +clearAllAddressCache +^^^^^^^^^^^^^^^^^^^^ + +Clears all address caches. + +.. code-block:: arduino + + void clearAllAddressCache() const; + +This function clears both unicast and multicast address caches. + +Advanced Access +*************** + +getInstance +^^^^^^^^^^^ + +Gets the OpenThread instance pointer. + +.. code-block:: arduino + + otInstance *getInstance(); + +This function returns a pointer to the underlying OpenThread instance. This allows direct access to OpenThread API functions for advanced use cases. + +**Warning:** Direct use of the OpenThread instance requires knowledge of the OpenThread API. Use with caution. + +Operators +********* + +bool operator +^^^^^^^^^^^^^ + +Returns whether OpenThread is started. + +.. code-block:: arduino + + operator bool() const; + +This operator returns ``true`` if OpenThread is started and ready, ``false`` otherwise. + +**Example:** + +.. code-block:: arduino + + if (OThread) { + Serial.println("OpenThread is ready"); + } + +Example +------- + +Basic Thread Network Setup +************************** + +.. code-block:: arduino + + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread stack + OpenThread::begin(); + + // Wait for OpenThread to be ready + while (!OThread) { + delay(100); + } + + // Create and configure dataset + DataSet dataset; + dataset.initNew(); + dataset.setNetworkName("MyThreadNetwork"); + dataset.setChannel(15); + + // Set network key (16 bytes) + uint8_t networkKey[16] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + dataset.setNetworkKey(networkKey); + + // Apply dataset and start network + OThread.commitDataSet(dataset); + OThread.start(); + OThread.networkInterfaceUp(); + + // Wait for network to be ready + while (OpenThread::otGetDeviceRole() == OT_ROLE_DETACHED) { + delay(100); + } + + // Print network information + OpenThread::otPrintNetworkInformation(Serial); + + // Get and print addresses + Serial.printf("Mesh Local EID: %s\r\n", OThread.getMeshLocalEid().toString().c_str()); + Serial.printf("RLOC: %s\r\n", OThread.getRloc().toString().c_str()); + Serial.printf("RLOC16: 0x%04x\r\n", OThread.getRloc16()); + } + +Monitoring Device Role +********************** + +.. code-block:: arduino + + void loop() { + ot_device_role_t role = OpenThread::otGetDeviceRole(); + const char *roleStr = OpenThread::otGetStringDeviceRole(); + + Serial.printf("Current role: %s\r\n", roleStr); + + switch (role) { + case OT_ROLE_LEADER: + Serial.println("This device is the Thread Leader"); + break; + case OT_ROLE_ROUTER: + Serial.println("This device is a Thread Router"); + break; + case OT_ROLE_CHILD: + Serial.println("This device is a Thread Child"); + break; + case OT_ROLE_DETACHED: + Serial.println("This device is not attached to a network"); + break; + case OT_ROLE_DISABLED: + Serial.println("Thread is disabled"); + break; + } + + delay(5000); + } + +Address Management +****************** + +.. code-block:: arduino + + void printAddresses() { + // Print unicast addresses + size_t unicastCount = OThread.getUnicastAddressCount(); + Serial.printf("Unicast addresses: %zu\r\n", unicastCount); + for (size_t i = 0; i < unicastCount; i++) { + Serial.printf(" [%zu] %s\r\n", i, OThread.getUnicastAddress(i).toString().c_str()); + } + + // Print multicast addresses + size_t multicastCount = OThread.getMulticastAddressCount(); + Serial.printf("Multicast addresses: %zu\r\n", multicastCount); + for (size_t i = 0; i < multicastCount; i++) { + Serial.printf(" [%zu] %s\r\n", i, OThread.getMulticastAddress(i).toString().c_str()); + } + + // Clear cache to force refresh + OThread.clearAllAddressCache(); + } diff --git a/docs/en/openthread/openthread_dataset.rst b/docs/en/openthread/openthread_dataset.rst new file mode 100644 index 00000000000..1cffd5cac2d --- /dev/null +++ b/docs/en/openthread/openthread_dataset.rst @@ -0,0 +1,461 @@ +############# +DataSet Class +############# + +About +----- + +The ``DataSet`` class provides a convenient way to create, configure, and manage Thread operational datasets. An operational dataset contains all the parameters needed to join or form a Thread network, including network name, channel, PAN ID, network key, and extended PAN ID. + +**Key Features:** +* Create new operational datasets +* Configure dataset parameters +* Apply datasets to the Thread network +* Retrieve dataset parameters +* Clear and reset datasets + +**Use Cases:** +* Creating new Thread networks +* Joining existing Thread networks +* Configuring network parameters +* Network migration and reconfiguration + +API Reference +------------- + +Constructor +*********** + +DataSet +^^^^^^^ + +Creates a new DataSet object. + +.. code-block:: arduino + + DataSet(); + +This constructor creates an empty dataset. You must either call ``initNew()`` to create a new dataset or configure parameters manually. + +Dataset Management +****************** + +clear +^^^^^ + +Clears all dataset parameters. + +.. code-block:: arduino + + void clear(); + +This function clears all dataset parameters, resetting the dataset to an empty state. + +initNew +^^^^^^^ + +Initializes a new operational dataset. + +.. code-block:: arduino + + void initNew(); + +This function creates a new operational dataset with randomly generated values for network key, extended PAN ID, and other parameters. The dataset will be ready to form a new Thread network. + +**Note:** OpenThread must be started (``OpenThread::begin()``) before calling this function. + +**Example:** + +.. code-block:: arduino + + DataSet dataset; + dataset.initNew(); // Creates new dataset with random values + dataset.setNetworkName("MyNewNetwork"); + dataset.setChannel(15); + +getDataset +^^^^^^^^^^ + +Gets the underlying OpenThread dataset structure. + +.. code-block:: arduino + + const otOperationalDataset &getDataset() const; + +This function returns a reference to the underlying ``otOperationalDataset`` structure. This is used internally when applying the dataset to the Thread network. + +**Note:** This function is typically used internally by ``OpenThread::commitDataSet()``. + +Setters +******* + +setNetworkName +^^^^^^^^^^^^^^ + +Sets the network name. + +.. code-block:: arduino + + void setNetworkName(const char *name); + +* ``name`` - The network name string (maximum 16 characters) + +This function sets the network name for the Thread network. The network name is a human-readable identifier for the network. + +**Example:** + +.. code-block:: arduino + + dataset.setNetworkName("MyThreadNetwork"); + +setExtendedPanId +^^^^^^^^^^^^^^^^ + +Sets the extended PAN ID. + +.. code-block:: arduino + + void setExtendedPanId(const uint8_t *extPanId); + +* ``extPanId`` - Pointer to an 8-byte array containing the extended PAN ID + +This function sets the extended PAN ID, which uniquely identifies the Thread network partition. + +**Example:** + +.. code-block:: arduino + + uint8_t extPanId[8] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77}; + dataset.setExtendedPanId(extPanId); + +setNetworkKey +^^^^^^^^^^^^^ + +Sets the network key. + +.. code-block:: arduino + + void setNetworkKey(const uint8_t *key); + +* ``key`` - Pointer to a 16-byte array containing the network key + +This function sets the network key, which is used for encryption and authentication in the Thread network. + +**Example:** + +.. code-block:: arduino + + uint8_t networkKey[16] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + dataset.setNetworkKey(networkKey); + +setChannel +^^^^^^^^^^ + +Sets the Thread channel. + +.. code-block:: arduino + + void setChannel(uint8_t channel); + +* ``channel`` - The Thread channel number (11-26) + +This function sets the IEEE 802.15.4 channel used by the Thread network. Valid channels are 11 through 26. + +**Example:** + +.. code-block:: arduino + + dataset.setChannel(15); // Use channel 15 + +setPanId +^^^^^^^^ + +Sets the PAN ID. + +.. code-block:: arduino + + void setPanId(uint16_t panId); + +* ``panId`` - The PAN ID (16-bit value) + +This function sets the PAN (Personal Area Network) ID for the Thread network. + +**Example:** + +.. code-block:: arduino + + dataset.setPanId(0x1234); // Set PAN ID to 0x1234 + +Getters +******* + +getNetworkName +^^^^^^^^^^^^^^ + +Gets the network name. + +.. code-block:: arduino + + const char *getNetworkName() const; + +This function returns a pointer to the network name string. + +**Returns:** Pointer to the network name, or ``NULL`` if not set. + +getExtendedPanId +^^^^^^^^^^^^^^^^ + +Gets the extended PAN ID. + +.. code-block:: arduino + + const uint8_t *getExtendedPanId() const; + +This function returns a pointer to the 8-byte extended PAN ID array. + +**Returns:** Pointer to the extended PAN ID array, or ``NULL`` if not set. + +getNetworkKey +^^^^^^^^^^^^^ + +Gets the network key. + +.. code-block:: arduino + + const uint8_t *getNetworkKey() const; + +This function returns a pointer to the 16-byte network key array. + +**Returns:** Pointer to the network key array, or ``NULL`` if not set. + +getChannel +^^^^^^^^^^ + +Gets the Thread channel. + +.. code-block:: arduino + + uint8_t getChannel() const; + +This function returns the Thread channel number. + +**Returns:** The channel number (11-26), or 0 if not set. + +getPanId +^^^^^^^^ + +Gets the PAN ID. + +.. code-block:: arduino + + uint16_t getPanId() const; + +This function returns the PAN ID. + +**Returns:** The PAN ID, or 0 if not set. + +Dataset Application +******************* + +apply +^^^^^ + +Applies the dataset to an OpenThread instance. + +.. code-block:: arduino + + void apply(otInstance *instance); + +* ``instance`` - Pointer to the OpenThread instance + +This function applies the dataset to the specified OpenThread instance, making it the active operational dataset. + +**Note:** This function is typically used internally. For normal use, use ``OpenThread::commitDataSet()`` instead. + +**Example:** + +.. code-block:: arduino + + otInstance *instance = OThread.getInstance(); + dataset.apply(instance); + +Example +------- + +Creating a New Network +********************** + +.. code-block:: arduino + + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread + OpenThread::begin(); + while (!OThread) { + delay(100); + } + + // Create a new dataset + DataSet dataset; + dataset.initNew(); // Generate random values + + // Configure network parameters + dataset.setNetworkName("MyNewThreadNetwork"); + dataset.setChannel(15); + + // Set network key (16 bytes) + uint8_t networkKey[16] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + dataset.setNetworkKey(networkKey); + + // Set extended PAN ID (8 bytes) + uint8_t extPanId[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}; + dataset.setExtendedPanId(extPanId); + + // Set PAN ID + dataset.setPanId(0x1234); + + // Apply dataset and start network + OThread.commitDataSet(dataset); + OThread.start(); + OThread.networkInterfaceUp(); + + Serial.println("New Thread network created"); + } + +Joining an Existing Network +*************************** + +.. code-block:: arduino + + #include + + void setup() { + Serial.begin(115200); + + // Initialize OpenThread + OpenThread::begin(); + while (!OThread) { + delay(100); + } + + // Create dataset for existing network + DataSet dataset; + + // Configure with existing network parameters + dataset.setNetworkName("ExistingThreadNetwork"); + dataset.setChannel(15); + + // Set the network key from the existing network + uint8_t networkKey[16] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}; + dataset.setNetworkKey(networkKey); + + // Set the extended PAN ID from the existing network + uint8_t extPanId[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}; + dataset.setExtendedPanId(extPanId); + + // Set PAN ID + dataset.setPanId(0x1234); + + // Apply dataset and start network + OThread.commitDataSet(dataset); + OThread.start(); + OThread.networkInterfaceUp(); + + Serial.println("Joining existing Thread network"); + } + +Reading Current Dataset +*********************** + +.. code-block:: arduino + + void printCurrentDataset() { + // Get current dataset from OpenThread + const DataSet ¤tDataset = OThread.getCurrentDataSet(); + + // Print dataset parameters + Serial.println("Current Thread Dataset:"); + Serial.printf(" Network Name: %s\r\n", currentDataset.getNetworkName()); + Serial.printf(" Channel: %d\r\n", currentDataset.getChannel()); + Serial.printf(" PAN ID: 0x%04x\r\n", currentDataset.getPanId()); + + // Print extended PAN ID + const uint8_t *extPanId = currentDataset.getExtendedPanId(); + if (extPanId) { + Serial.print(" Extended PAN ID: "); + for (int i = 0; i < 8; i++) { + Serial.printf("%02x", extPanId[i]); + } + Serial.println(); + } + + // Print network key (first 4 bytes for security) + const uint8_t *networkKey = currentDataset.getNetworkKey(); + if (networkKey) { + Serial.print(" Network Key: "); + for (int i = 0; i < 4; i++) { + Serial.printf("%02x", networkKey[i]); + } + Serial.println("..."); + } + } + +Modifying Dataset Parameters +**************************** + +.. code-block:: arduino + + void modifyNetworkChannel() { + // Get current dataset + DataSet dataset = OThread.getCurrentDataSet(); + + // Modify channel + dataset.setChannel(20); // Change to channel 20 + + // Apply modified dataset + OThread.commitDataSet(dataset); + + Serial.println("Network channel changed to 20"); + } + +Best Practices +-------------- + +Dataset Security +**************** + +* **Network Key**: Keep the network key secure and never expose it in logs or serial output +* **Extended PAN ID**: Use unique extended PAN IDs to avoid network conflicts +* **Channel Selection**: Choose channels that avoid interference with Wi-Fi networks (channels 11, 15, 20, 25 are often good choices) + +Required Parameters +******************* + +For a dataset to be valid and usable, you typically need: + +* **Network Name**: Required for human identification +* **Network Key**: Required for security (16 bytes) +* **Channel**: Required for radio communication (11-26) +* **Extended PAN ID**: Recommended for network identification (8 bytes) +* **PAN ID**: Optional, will be assigned if not set + +Parameter Validation +******************** + +The DataSet class performs basic validation: + +* Network name length is checked (maximum 16 characters) +* Channel range is validated (11-26) +* Null pointer checks for array parameters + +However, it's your responsibility to ensure: + +* Network key is properly generated (use ``initNew()`` for random generation) +* Extended PAN ID is unique within your network environment +* All required parameters are set before applying the dataset From 333bfffcc6ab56e61b1db1b6bba522ab198ae241 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Mon, 10 Nov 2025 09:56:39 -0300 Subject: [PATCH 14/38] feat(rmt): improves RMT documentation (#11992) * feat(rmt): improves RMT documentation * fix(rmt): includes missing reference to C5 and P4 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(rmt): note rewritting Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(rmt): rephasing Clarify behavior of rmtTransmitCompleted in looping mode. * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- docs/en/api/rmt.rst | 448 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 439 insertions(+), 9 deletions(-) diff --git a/docs/en/api/rmt.rst b/docs/en/api/rmt.rst index 6f87054a9c2..84d885c7d90 100644 --- a/docs/en/api/rmt.rst +++ b/docs/en/api/rmt.rst @@ -1,24 +1,454 @@ -### -RMT -### +#################### +Remote Control (RMT) +#################### About ----- +The Remote Control Transceiver (RMT) peripheral was originally designed to act as an infrared transceiver, +but it can be used to generate or receive many other types of digital signals with precise timing. -.. note:: This is a work in progress project and this section is still missing. If you want to contribute, please see the `Contributions Guide <../contributing.html>`_. +The RMT peripheral is capable of transmitting and receiving digital signals with precise timing control, +making it ideal for protocols that require specific pulse widths and timing, such as: -Remote Control Transceiver (RMT) peripheral was designed to act as an infrared transceiver. +* **Infrared (IR) remote control protocols** (NEC, RC5, Sony, etc.) +* **WS2812/NeoPixel RGB LED control** (requires precise timing) +* **Custom communication protocols** with specific timing requirements +* **Pulse generation** for various applications -Example -------- +RMT operates by encoding digital signals as sequences of high/low pulses with specific durations. +Each RMT symbol represents two consecutive pulses (level0/duration0 and level1/duration1). -To get started with RMT, you can try: +RMT Memory Blocks +----------------- -RMT Write RGB LED +RMT channels use memory blocks to store signal data. The number of available memory blocks varies by SoC: + +========= ================== ====================================== +ESP32 SoC Memory Blocks Notes +========= ================== ====================================== +ESP32 8 blocks total Shared between TX and RX channels +ESP32-S2 4 blocks total Shared between TX and RX channels +ESP32-S3 4 blocks TX + 4 RX Separate memory for TX and RX channels +ESP32-C3 2 blocks TX + 2 RX Separate memory for TX and RX channels +ESP32-C5 2 blocks TX + 2 RX Separate memory for TX and RX channels +ESP32-C6 2 blocks TX + 2 RX Separate memory for TX and RX channels +ESP32-H2 2 blocks TX + 2 RX Separate memory for TX and RX channels +ESP32-P4 4 blocks TX + 4 RX Separate memory for TX and RX channels +========= ================== ====================================== + +Each memory block can store ``RMT_SYMBOLS_PER_CHANNEL_BLOCK`` symbols (64 for ESP32/ESP32-S2, 48 for ESP32-S3/ESP32-C3/ESP32-C5/ESP32-C6/ESP32-H2/ESP32-P4). + +**Note:** Each RMT symbol is 4 bytes (32 bits), containing two pulses with their durations and levels. + +Arduino-ESP32 RMT API +--------------------- + +rmtInit +******* + +Initializes an RMT channel for a specific GPIO pin with the specified direction, memory size, and frequency. + +.. code-block:: arduino + + bool rmtInit(int pin, rmt_ch_dir_t channel_direction, rmt_reserve_memsize_t memsize, uint32_t frequency_Hz); + +* ``pin`` - GPIO pin number to use for RMT +* ``channel_direction`` - Channel direction: + + * ``RMT_RX_MODE`` - Receive mode (for reading signals) + * ``RMT_TX_MODE`` - Transmit mode (for sending signals) + +* ``memsize`` - Number of memory blocks to reserve for this channel: + + * ``RMT_MEM_NUM_BLOCKS_1`` - 1 block + * ``RMT_MEM_NUM_BLOCKS_2`` - 2 blocks + * ``RMT_MEM_NUM_BLOCKS_3`` - 3 blocks (ESP32 only) + * ``RMT_MEM_NUM_BLOCKS_4`` - 4 blocks (ESP32 only) + * ``RMT_MEM_NUM_BLOCKS_5`` through ``RMT_MEM_NUM_BLOCKS_8`` - 5-8 blocks (ESP32 only) + +* ``frequency_Hz`` - RMT channel frequency in Hz (tick frequency). Must be between 312.5 kHz and 80 MHz. + + The frequency determines the resolution of pulse durations. For example: + + * 10 MHz (100 ns tick) - High precision, suitable for WS2812 LEDs + * 1 MHz (1 µs tick) - Good for most IR protocols + * 400 kHz (2.5 µs tick) - Suitable for slower protocols + +This function returns ``true`` if initialization is successful, ``false`` otherwise. + +**Note:** The RMT tick is set by the frequency parameter. Example: 100 ns tick => 10 MHz, thus frequency will be 10,000,000 Hz. + +rmtDeinit +********* + +Deinitializes the RMT channel and releases all allocated resources for the specified pin. + +.. code-block:: arduino + + bool rmtDeinit(int pin); + +* ``pin`` - GPIO pin number that was initialized with RMT + +This function returns ``true`` if deinitialization is successful, ``false`` otherwise. + +rmtSetEOT +********* + +Sets the End of Transmission (EOT) level for the RMT pin when transmission ends. +This function affects how ``rmtWrite()``, ``rmtWriteAsync()``, or ``rmtWriteLooping()`` will set the pin after writing the data. + +.. code-block:: arduino + + bool rmtSetEOT(int pin, uint8_t EOT_Level); + +* ``pin`` - GPIO pin number configured for RMT TX mode +* ``EOT_Level`` - End of transmission level: + + * ``0`` (LOW) - Pin will be set to LOW after transmission (default) + * Non-zero (HIGH) - Pin will be set to HIGH after transmission + +**Note:** This only affects the transmission process. The pre-transmission idle level can be set manually using ``digitalWrite(pin, level)``. + +This function returns ``true`` if EOT level is set successfully, ``false`` otherwise. + +rmtWrite +******** + +Sends RMT data in blocking mode. The function waits until all data is transmitted or until timeout occurs. + +.. code-block:: arduino + + bool rmtWrite(int pin, rmt_data_t *data, size_t num_rmt_symbols, uint32_t timeout_ms); + +* ``pin`` - GPIO pin number configured for RMT TX mode +* ``data`` - Pointer to array of ``rmt_data_t`` symbols to transmit +* ``num_rmt_symbols`` - Number of RMT symbols to transmit +* ``timeout_ms`` - Timeout in milliseconds. Use ``RMT_WAIT_FOR_EVER`` for indefinite wait + +**Blocking mode:** The function only returns after sending all data or by timeout. + +This function returns ``true`` if transmission is successful, ``false`` on error or timeout. + +**Example:** + +.. code-block:: arduino + + rmt_data_t symbols[] = { + {8, 1, 4, 0}, // High for 8 ticks, Low for 4 ticks (bit '1') + {4, 1, 8, 0} // High for 4 ticks, Low for 8 ticks (bit '0') + }; + + rmtWrite(pin, symbols, 2, RMT_WAIT_FOR_EVER); + +rmtWriteAsync +************* + +Sends RMT data in non-blocking (asynchronous) mode. The function returns immediately after starting the transmission. + +.. code-block:: arduino + + bool rmtWriteAsync(int pin, rmt_data_t *data, size_t num_rmt_symbols); + +* ``pin`` - GPIO pin number configured for RMT TX mode +* ``data`` - Pointer to array of ``rmt_data_t`` symbols to transmit +* ``num_rmt_symbols`` - Number of RMT symbols to transmit + +**Non-blocking mode:** Returns immediately after execution. Use ``rmtTransmitCompleted()`` to check if transmission is finished. + +**Note:** If ``rmtWriteAsync()`` is called while a previous transmission is still in progress, it will return ``false`` immediately to indicate failure; it does not wait for the previous transmission to finish. + +This function returns ``true`` on execution success, ``false`` otherwise. + +rmtWriteLooping +**************** + +Sends RMT data in infinite looping mode. The data will be transmitted continuously until stopped. + +.. code-block:: arduino + + bool rmtWriteLooping(int pin, rmt_data_t *data, size_t num_rmt_symbols); + +* ``pin`` - GPIO pin number configured for RMT TX mode +* ``data`` - Pointer to array of ``rmt_data_t`` symbols to transmit +* ``num_rmt_symbols`` - Number of RMT symbols to transmit + +**Looping mode:** The data is transmitted continuously in a loop. To stop looping, call ``rmtWrite()`` or ``rmtWriteAsync()`` with new data, or call ``rmtWriteLooping()`` with ``NULL`` data or zero size. + +**Note:** Looping mode needs a zero-ending data symbol ``{0, 0, 0, 0}`` to mark the end of data. + +This function returns ``true`` on execution success, ``false`` otherwise. + +rmtWriteRepeated +**************** + +Sends RMT data a fixed number of times (repeated transmission). + +.. code-block:: arduino + + bool rmtWriteRepeated(int pin, rmt_data_t *data, size_t num_rmt_symbols, uint32_t loop_count); + +* ``pin`` - GPIO pin number configured for RMT TX mode +* ``data`` - Pointer to array of ``rmt_data_t`` symbols to transmit +* ``num_rmt_symbols`` - Number of RMT symbols to transmit +* ``loop_count`` - Number of times to repeat the transmission (must be at least 1) + +**Note:** +* ``loop_count == 0`` is invalid (no transmission) +* ``loop_count == 1`` transmits once (no looping) +* ``loop_count > 1`` transmits the data repeatedly + +**Note:** Loop count feature is only supported on certain SoCs. On unsupported SoCs, this function will return ``false``. + +This function returns ``true`` on execution success, ``false`` otherwise. + +rmtTransmitCompleted +******************** + +Checks if the RMT transmission is completed and the channel is ready for transmitting new data. + +.. code-block:: arduino + + bool rmtTransmitCompleted(int pin); + +* ``pin`` - GPIO pin number configured for RMT TX mode + +This function returns ``true`` when all data has been sent and the channel is ready for a new transmission, ``false`` otherwise. + +**Note:** +* If ``rmtWrite()`` times out or ``rmtWriteAsync()`` is called, this function will return ``false`` until all data is sent out. +* ``rmtTransmitCompleted()`` will always return ``true`` when ``rmtWriteLooping()`` is active, because it has no effect in such case. + +rmtRead +******* + +Initiates blocking receive operation. Reads RMT data and stores it in the provided buffer. + +.. code-block:: arduino + + bool rmtRead(int pin, rmt_data_t *data, size_t *num_rmt_symbols, uint32_t timeout_ms); + +* ``pin`` - GPIO pin number configured for RMT RX mode +* ``data`` - Pointer to buffer where received RMT symbols will be stored +* ``num_rmt_symbols`` - Pointer to variable containing maximum number of symbols to read. + + On return, this variable will contain the actual number of symbols read. + +* ``timeout_ms`` - Timeout in milliseconds. Use ``RMT_WAIT_FOR_EVER`` for indefinite wait + +**Blocking mode:** The function waits until data is received or timeout occurs. + +If the reading operation times out, ``num_rmt_symbols`` won't change and ``rmtReceiveCompleted()`` can be used later to check if data is available. + +This function returns ``true`` when data is successfully read, ``false`` on error or timeout. + +rmtReadAsync +************ + +Initiates non-blocking (asynchronous) receive operation. Returns immediately after starting the receive process. + +.. code-block:: arduino + + bool rmtReadAsync(int pin, rmt_data_t *data, size_t *num_rmt_symbols); + +* ``pin`` - GPIO pin number configured for RMT RX mode +* ``data`` - Pointer to buffer where received RMT symbols will be stored +* ``num_rmt_symbols`` - Pointer to variable containing maximum number of symbols to read. + + On completion, this variable will be updated with the actual number of symbols read. + +**Non-blocking mode:** Returns immediately after execution. Use ``rmtReceiveCompleted()`` to check if data is available. + +This function returns ``true`` on execution success, ``false`` otherwise. + +rmtReceiveCompleted +******************* + +Checks if RMT data reception is completed and new data is available for processing. + +.. code-block:: arduino + + bool rmtReceiveCompleted(int pin); + +* ``pin`` - GPIO pin number configured for RMT RX mode + +This function returns ``true`` when data has been received and is available in the buffer, ``false`` otherwise. + +**Note:** The data reception information is reset when a new ``rmtRead()`` or ``rmtReadAsync()`` function is called. + +rmtSetCarrier +************* + +Sets carrier frequency modulation/demodulation for RMT TX or RX channel. + +.. code-block:: arduino + + bool rmtSetCarrier(int pin, bool carrier_en, bool carrier_level, uint32_t frequency_Hz, float duty_percent); + +* ``pin`` - GPIO pin number configured for RMT +* ``carrier_en`` - Enable/disable carrier modulation (TX) or demodulation (RX) +* ``carrier_level`` - Carrier polarity level: + + * ``true`` - Positive polarity (active high) + * ``false`` - Negative polarity (active low) + +* ``frequency_Hz`` - Carrier frequency in Hz (e.g., 38000 for 38 kHz IR carrier) +* ``duty_percent`` - Duty cycle as a float from 0.0 to 1.0 (e.g., 0.33 for 33% duty cycle, 0.5 for 50% square wave) + +**Note:** Parameters changed in Arduino Core 3: low and high (ticks) are now expressed in Carrier Frequency in Hz and duty cycle in percentage (float 0.0 to 1.0). + +**Example:** 38.5 kHz carrier with 33% duty cycle: ``rmtSetCarrier(pin, true, true, 38500, 0.33)`` + +This function returns ``true`` if carrier is set successfully, ``false`` otherwise. + +rmtSetRxMinThreshold +******************** + +Sets the minimum pulse width filter threshold for RX channel. Pulses smaller than this threshold will be ignored as noise. + +.. code-block:: arduino + + bool rmtSetRxMinThreshold(int pin, uint8_t filter_pulse_ticks); + +* ``pin`` - GPIO pin number configured for RMT RX mode +* ``filter_pulse_ticks`` - Minimum pulse width in RMT ticks. Pulses (high or low) smaller than this will be filtered out. + + Set to ``0`` to disable the filter. + +**Note:** The filter threshold is specified in RMT ticks, which depends on the RMT frequency set during ``rmtInit()``. + +This function returns ``true`` if filter threshold is set successfully, ``false`` otherwise. + +rmtSetRxMaxThreshold +******************** + +Sets the maximum idle threshold for RX channel. When no edge is detected for longer than this threshold, the receiving process is finished. + +.. code-block:: arduino + + bool rmtSetRxMaxThreshold(int pin, uint16_t idle_thres_ticks); + +* ``pin`` - GPIO pin number configured for RMT RX mode +* ``idle_thres_ticks`` - Maximum idle time in RMT ticks. When no edge is detected for longer than this time, reception ends. + + This threshold also defines how many low/high bits are read at the end of the received data. + +**Note:** The idle threshold is specified in RMT ticks, which depends on the RMT frequency set during ``rmtInit()``. + +This function returns ``true`` if idle threshold is set successfully, ``false`` otherwise. + +RMT Data Structure +------------------ + +rmt_data_t +********** + +RMT data structure representing a single RMT symbol (two consecutive pulses). + +.. code-block:: arduino + + typedef union { + struct { + uint32_t duration0 : 15; // Duration of first pulse in RMT ticks + uint32_t level0 : 1; // Level of first pulse (0 = LOW, 1 = HIGH) + uint32_t duration1 : 15; // Duration of second pulse in RMT ticks + uint32_t level1 : 1; // Level of second pulse (0 = LOW, 1 = HIGH) + }; + uint32_t val; // Access as 32-bit value + } rmt_data_t; + +Each RMT symbol contains two pulses: +* **First pulse:** ``level0`` for ``duration0`` ticks +* **Second pulse:** ``level1`` for ``duration1`` ticks + +**Example:** + +.. code-block:: arduino + + // Create a symbol: HIGH for 8 ticks, then LOW for 4 ticks + rmt_data_t symbol = { + .duration0 = 8, + .level0 = 1, + .duration1 = 4, + .level1 = 0 + }; + + // Or using struct initialization + rmt_data_t symbol2 = {8, 1, 4, 0}; + +Helper Macros +------------- + +RMT_SYMBOLS_OF +************** + +Helper macro to calculate the number of RMT symbols in an array. + +.. code-block:: arduino + + #define RMT_SYMBOLS_OF(x) (sizeof(x) / sizeof(rmt_data_t)) + +**Example:** + +.. code-block:: arduino + + rmt_data_t data[] = { + {8, 1, 4, 0}, + {4, 1, 8, 0} + }; + + size_t num_symbols = RMT_SYMBOLS_OF(data); // Returns 2 + +RMT_WAIT_FOR_EVER ***************** +Constant for indefinite timeout in blocking operations. + +.. code-block:: arduino + + #define RMT_WAIT_FOR_EVER ((uint32_t)portMAX_DELAY) + +Use this constant as the ``timeout_ms`` parameter in ``rmtWrite()`` or ``rmtRead()`` to wait indefinitely. + +**Example:** + +.. code-block:: arduino + + rmtWrite(pin, data, num_symbols, RMT_WAIT_FOR_EVER); + +RMT_SYMBOLS_PER_CHANNEL_BLOCK +****************************** + +Constant defining the number of RMT symbols per memory block. + +* ESP32/ESP32-S2: 64 symbols per block +* ESP32-S3/ESP32-C3/ESP32-C5/ESP32-C6/ESP32-H2/ESP32-P4: 48 symbols per block + +**Example:** + +.. code-block:: arduino + + // Allocate buffer for 1 memory block + rmt_data_t buffer[RMT_SYMBOLS_PER_CHANNEL_BLOCK]; + +Example Applications +******************** + +RMT Write RGB LED (WS2812): +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + .. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino :language: arduino +RMT LED Blink: +^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMT_LED_Blink/RMT_LED_Blink.ino + :language: arduino + +RMT Read XJT Protocol: +^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTReadXJT/RMTReadXJT.ino + :language: arduino Complete list of `RMT examples `_. From 96520bc5726e85f2fea2999364e3672759b6c1c6 Mon Sep 17 00:00:00 2001 From: Piotr Gniado Date: Wed, 12 Nov 2025 10:55:06 +0100 Subject: [PATCH 15/38] fix(network): Fix getting fallback DNS server (#12013) - Fix getting fallback DNS server using NetworkInterface::dnsIP() getter - Remove magic number from NetworkInterface::dnsIP() setter --- libraries/Network/src/NetworkInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/Network/src/NetworkInterface.cpp b/libraries/Network/src/NetworkInterface.cpp index 94675e65e12..393d2b9cf7f 100644 --- a/libraries/Network/src/NetworkInterface.cpp +++ b/libraries/Network/src/NetworkInterface.cpp @@ -352,7 +352,7 @@ bool NetworkInterface::enableIPv6(bool en) { } bool NetworkInterface::dnsIP(uint8_t dns_no, IPAddress ip) { - if (_esp_netif == NULL || dns_no > 2) { + if (_esp_netif == NULL || dns_no >= ESP_NETIF_DNS_MAX) { return false; } esp_netif_flags_t flags = esp_netif_get_flags(_esp_netif); @@ -708,11 +708,11 @@ IPAddress NetworkInterface::gatewayIP() const { } IPAddress NetworkInterface::dnsIP(uint8_t dns_no) const { - if (_esp_netif == NULL) { + if (_esp_netif == NULL || dns_no >= ESP_NETIF_DNS_MAX) { return IPAddress(); } esp_netif_dns_info_t d; - if (esp_netif_get_dns_info(_esp_netif, dns_no ? ESP_NETIF_DNS_BACKUP : ESP_NETIF_DNS_MAIN, &d) != ESP_OK) { + if (esp_netif_get_dns_info(_esp_netif, (esp_netif_dns_type_t)dns_no, &d) != ESP_OK) { return IPAddress(); } if (d.ip.type == ESP_IPADDR_TYPE_V6) { From 7bfecf2b309bb12f376f6c6032a884973ab8e197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:07:56 +0100 Subject: [PATCH 16/38] feat(zigbee): Update esp-zigbee-sdk to latest 1.6.8 (#12017) --- idf_component.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idf_component.yml b/idf_component.yml index 7a883f1658a..99bf7048c1c 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -54,12 +54,12 @@ dependencies: espressif/esp_modem: version: "^1.1.0" espressif/esp-zboss-lib: - version: "==1.6.4" # compatible with esp-zigbee-lib 1.6.7 + version: "==1.6.4" # compatible with esp-zigbee-lib 1.6.8 require: public rules: - if: "target not in [esp32c2, esp32p4]" espressif/esp-zigbee-lib: - version: "==1.6.7" + version: "==1.6.8" require: public rules: - if: "target not in [esp32c2, esp32p4]" From 088d416b0f1829d2ec217ac4ab9fed3fee326f72 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Wed, 12 Nov 2025 16:00:24 +0200 Subject: [PATCH 17/38] feat(hosted): Add OTA and version functionality to esp-hosted (#11936) * feat(hosted): Add OTA and version functionality to esp-hosted * feat(hosted): Add hostedActivateUpdate() function * feat(hosted): Add new BLE init/deinit API calls * fix(hosted): Apply suggestion from @lucasssvaz Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> * fix(hosted): Apply suggestion from @lucasssvaz Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- cores/esp32/esp32-hal-hosted.c | 130 ++++++++++++++++++++++++++++++++- cores/esp32/esp32-hal-hosted.h | 8 ++ 2 files changed, 135 insertions(+), 3 deletions(-) diff --git a/cores/esp32/esp32-hal-hosted.c b/cores/esp32/esp32-hal-hosted.c index 0bb8023432a..3e510438bd0 100644 --- a/cores/esp32/esp32-hal-hosted.c +++ b/cores/esp32/esp32-hal-hosted.c @@ -18,9 +18,10 @@ #include "esp32-hal-hosted.h" #include "esp32-hal-log.h" +#include "esp_hosted.h" #include "esp_hosted_transport_config.h" -extern esp_err_t esp_hosted_init(); -extern esp_err_t esp_hosted_deinit(); +// extern esp_err_t esp_hosted_init(); +// extern esp_err_t esp_hosted_deinit(); static bool hosted_initialized = false; static bool hosted_ble_active = false; @@ -46,6 +47,100 @@ static sdio_pin_config_t sdio_pin_config = { #endif }; +static esp_hosted_coprocessor_fwver_t slave_version_struct = {.major1 = 0, .minor1 = 0, .patch1 = 0}; +static esp_hosted_coprocessor_fwver_t host_version_struct = { + .major1 = ESP_HOSTED_VERSION_MAJOR_1, .minor1 = ESP_HOSTED_VERSION_MINOR_1, .patch1 = ESP_HOSTED_VERSION_PATCH_1 +}; + +void hostedGetHostVersion(uint32_t *major, uint32_t *minor, uint32_t *patch) { + *major = host_version_struct.major1; + *minor = host_version_struct.minor1; + *patch = host_version_struct.patch1; +} + +void hostedGetSlaveVersion(uint32_t *major, uint32_t *minor, uint32_t *patch) { + *major = slave_version_struct.major1; + *minor = slave_version_struct.minor1; + *patch = slave_version_struct.patch1; +} + +bool hostedHasUpdate() { + uint32_t host_version = ESP_HOSTED_VERSION_VAL(host_version_struct.major1, host_version_struct.minor1, host_version_struct.patch1); + uint32_t slave_version = 0; + + esp_err_t ret = esp_hosted_get_coprocessor_fwversion(&slave_version_struct); + if (ret != ESP_OK) { + log_e("Could not get slave firmware version: %s", esp_err_to_name(ret)); + } else { + slave_version = ESP_HOSTED_VERSION_VAL(slave_version_struct.major1, slave_version_struct.minor1, slave_version_struct.patch1); + } + + log_i("Host firmware version: %" PRIu32 ".%" PRIu32 ".%" PRIu32, host_version_struct.major1, host_version_struct.minor1, host_version_struct.patch1); + log_i("Slave firmware version: %" PRIu32 ".%" PRIu32 ".%" PRIu32, slave_version_struct.major1, slave_version_struct.minor1, slave_version_struct.patch1); + + // compare major.minor only + // slave_version &= 0xFFFFFF00; + // host_version &= 0xFFFFFF00; + + if (host_version == slave_version) { + log_i("Versions Match!"); + } else if (host_version > slave_version) { + log_w("Version on Host is NEWER than version on co-processor"); + log_w("Update URL: %s", hostedGetUpdateURL()); + return true; + } else { + log_w("Version on Host is OLDER than version on co-processor"); + } + return false; +} + +char *hostedGetUpdateURL() { + // https://espressif.github.io/arduino-esp32/hosted/esp32c6-v1.2.3.bin + static char url[92] = {0}; + snprintf( + url, 92, "https://espressif.github.io/arduino-esp32/hosted/%s-v%" PRIu32 ".%" PRIu32 ".%" PRIu32 ".bin", CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET, + host_version_struct.major1, host_version_struct.minor1, host_version_struct.patch1 + ); + return url; +} + +bool hostedBeginUpdate() { + esp_err_t err = esp_hosted_slave_ota_begin(); + if (err != ESP_OK) { + log_e("Failed to begin Update: %s", esp_err_to_name(err)); + } + return err == ESP_OK; +} + +bool hostedWriteUpdate(uint8_t *buf, uint32_t len) { + esp_err_t err = esp_hosted_slave_ota_write(buf, len); + if (err != ESP_OK) { + log_e("Failed to write Update: %s", esp_err_to_name(err)); + } + return err == ESP_OK; +} + +bool hostedEndUpdate() { + esp_err_t err = esp_hosted_slave_ota_end(); + if (err != ESP_OK) { + log_e("Failed to end Update: %s", esp_err_to_name(err)); + } + return err == ESP_OK; +} + +bool hostedActivateUpdate() { + esp_err_t err = esp_hosted_slave_ota_activate(); + if (err != ESP_OK) { + log_e("Failed to activate Update: %s", esp_err_to_name(err)); + } + // else { + // hostedDeinit(); + // delay(1000); + // hostedInit(); + // } + return err == ESP_OK; +} + static bool hostedInit() { if (!hosted_initialized) { log_i("Initializing ESP-Hosted"); @@ -69,6 +164,12 @@ static bool hostedInit() { return false; } log_i("ESP-Hosted initialized!"); + if (esp_hosted_connect_to_slave() != ESP_OK) { + log_e("Failed to connect to slave"); + return false; + } + hostedHasUpdate(); + return true; } // Attach pins to PeriMan here @@ -101,8 +202,21 @@ static bool hostedDeinit() { bool hostedInitBLE() { log_i("Initializing ESP-Hosted for BLE"); + if (!hostedInit()) { + return false; + } + esp_err_t err = esp_hosted_bt_controller_init(); + if (err != ESP_OK) { + log_e("esp_hosted_bt_controller_init failed: %s", esp_err_to_name(err)); + return false; + } + err = esp_hosted_bt_controller_enable(); + if (err != ESP_OK) { + log_e("esp_hosted_bt_controller_enable failed: %s", esp_err_to_name(err)); + return false; + } hosted_ble_active = true; - return hostedInit(); + return true; } bool hostedInitWiFi() { @@ -113,6 +227,16 @@ bool hostedInitWiFi() { bool hostedDeinitBLE() { log_i("Deinitializing ESP-Hosted for BLE"); + esp_err_t err = esp_hosted_bt_controller_disable(); + if (err != ESP_OK) { + log_e("esp_hosted_bt_controller_disable failed: %s", esp_err_to_name(err)); + return false; + } + err = esp_hosted_bt_controller_deinit(false); + if (err != ESP_OK) { + log_e("esp_hosted_bt_controller_deinit failed: %s", esp_err_to_name(err)); + return false; + } hosted_ble_active = false; if (!hosted_wifi_active) { return hostedDeinit(); diff --git a/cores/esp32/esp32-hal-hosted.h b/cores/esp32/esp32-hal-hosted.h index 0a916bfac85..1b329fcb469 100644 --- a/cores/esp32/esp32-hal-hosted.h +++ b/cores/esp32/esp32-hal-hosted.h @@ -44,6 +44,14 @@ bool hostedIsBLEActive(); bool hostedIsWiFiActive(); bool hostedSetPins(int8_t clk, int8_t cmd, int8_t d0, int8_t d1, int8_t d2, int8_t d3, int8_t rst); void hostedGetPins(int8_t *clk, int8_t *cmd, int8_t *d0, int8_t *d1, int8_t *d2, int8_t *d3, int8_t *rst); +void hostedGetHostVersion(uint32_t *major, uint32_t *minor, uint32_t *patch); +void hostedGetSlaveVersion(uint32_t *major, uint32_t *minor, uint32_t *patch); +bool hostedHasUpdate(); +char *hostedGetUpdateURL(); +bool hostedBeginUpdate(); +bool hostedWriteUpdate(uint8_t *buf, uint32_t len); +bool hostedEndUpdate(); +bool hostedActivateUpdate(); #ifdef __cplusplus } From 9167b18a800e6a61869a6193c9041c80455d1cc0 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Wed, 12 Nov 2025 16:00:54 +0200 Subject: [PATCH 18/38] IDF release/v5.5 8410210c (#12018) --- package/package_esp32_index.template.json | 68 +++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/package/package_esp32_index.template.json b/package/package_esp32_index.template.json index 3219801be0c..32fba7d3082 100644 --- a/package/package_esp32_index.template.json +++ b/package/package_esp32_index.template.json @@ -51,7 +51,7 @@ { "packager": "esp32", "name": "esp32-arduino-libs", - "version": "idf-release_v5.5-f1a1df9b-v3" + "version": "idf-release_v5.5-8410210c-v2" }, { "packager": "esp32", @@ -104,63 +104,63 @@ "tools": [ { "name": "esp32-arduino-libs", - "version": "idf-release_v5.5-f1a1df9b-v3", + "version": "idf-release_v5.5-8410210c-v2", "systems": [ { "host": "i686-mingw32", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" }, { "host": "x86_64-mingw32", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" }, { "host": "arm64-apple-darwin", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" }, { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" }, { "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-f1a1df9b-v3.zip", - "checksum": "SHA-256:35c0cc87b1965d0e70d599472dc6640e0363b05340488e73ccb7481d349906f3", - "size": "451353300" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", + "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", + "size": "449287409" } ] }, From 491e2d21367a43626fedb8b22cb2f4449abb2078 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 14:05:15 +0000 Subject: [PATCH 19/38] change(version): Update core version to 3.3.4 --- .github/ISSUE_TEMPLATE/Issue-report.yml | 1 + .gitlab/workflows/common.yml | 2 +- cores/esp32/esp_arduino_version.h | 2 +- docs/conf_common.py | 2 +- libraries/ArduinoOTA/library.properties | 2 +- libraries/AsyncUDP/library.properties | 2 +- libraries/BLE/library.properties | 2 +- libraries/BluetoothSerial/library.properties | 2 +- libraries/DNSServer/library.properties | 2 +- libraries/EEPROM/library.properties | 2 +- libraries/ESP32/library.properties | 2 +- libraries/ESP_I2S/library.properties | 2 +- libraries/ESP_NOW/library.properties | 2 +- libraries/ESP_SR/library.properties | 2 +- libraries/ESPmDNS/library.properties | 2 +- libraries/Ethernet/library.properties | 2 +- libraries/FFat/library.properties | 2 +- libraries/FS/library.properties | 2 +- libraries/HTTPClient/library.properties | 2 +- libraries/HTTPUpdate/library.properties | 2 +- libraries/HTTPUpdateServer/library.properties | 2 +- libraries/Hash/library.properties | 2 +- libraries/Insights/library.properties | 2 +- libraries/LittleFS/library.properties | 2 +- libraries/Matter/library.properties | 2 +- libraries/NetBIOS/library.properties | 2 +- libraries/Network/library.properties | 2 +- libraries/NetworkClientSecure/library.properties | 2 +- libraries/OpenThread/library.properties | 2 +- libraries/PPP/library.properties | 2 +- libraries/Preferences/library.properties | 2 +- libraries/RainMaker/library.properties | 2 +- libraries/SD/library.properties | 2 +- libraries/SD_MMC/library.properties | 2 +- libraries/SPI/library.properties | 2 +- libraries/SPIFFS/library.properties | 2 +- libraries/SimpleBLE/library.properties | 2 +- libraries/TFLiteMicro/library.properties | 2 +- libraries/Ticker/library.properties | 2 +- libraries/USB/library.properties | 2 +- libraries/Update/library.properties | 2 +- libraries/WebServer/library.properties | 2 +- libraries/WiFi/library.properties | 2 +- libraries/WiFiProv/library.properties | 2 +- libraries/Wire/library.properties | 2 +- libraries/Zigbee/library.properties | 2 +- package.json | 2 +- platform.txt | 2 +- 48 files changed, 48 insertions(+), 47 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Issue-report.yml b/.github/ISSUE_TEMPLATE/Issue-report.yml index b3c3e4a944c..53f28c46e89 100644 --- a/.github/ISSUE_TEMPLATE/Issue-report.yml +++ b/.github/ISSUE_TEMPLATE/Issue-report.yml @@ -43,6 +43,7 @@ body: - latest stable Release (if not listed below) - latest development Release Candidate (RC-X) - latest master (checkout manually) + - v3.3.4 - v3.3.3 - v3.3.2 - v3.3.1 diff --git a/.gitlab/workflows/common.yml b/.gitlab/workflows/common.yml index b5183114dc9..0f4bda9bcce 100644 --- a/.gitlab/workflows/common.yml +++ b/.gitlab/workflows/common.yml @@ -13,7 +13,7 @@ stages: variables: ESP_IDF_VERSION: "5.5" - ESP_ARDUINO_VERSION: "3.3.3" + ESP_ARDUINO_VERSION: "3.3.4" ############# # `default` # diff --git a/cores/esp32/esp_arduino_version.h b/cores/esp32/esp_arduino_version.h index 2919a4979a2..587fe02cd16 100644 --- a/cores/esp32/esp_arduino_version.h +++ b/cores/esp32/esp_arduino_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_ARDUINO_VERSION_MINOR 3 /** Patch version number (x.x.X) */ -#define ESP_ARDUINO_VERSION_PATCH 3 +#define ESP_ARDUINO_VERSION_PATCH 4 /** * Macro to convert ARDUINO version number into an integer diff --git a/docs/conf_common.py b/docs/conf_common.py index 4e3a3e31f0d..0960d7c4315 100644 --- a/docs/conf_common.py +++ b/docs/conf_common.py @@ -4,7 +4,7 @@ # Used for substituting variables in the documentation rst_prolog = """ -.. |version| replace:: 3.3.3 +.. |version| replace:: 3.3.4 .. |idf_version| replace:: 5.5 """ diff --git a/libraries/ArduinoOTA/library.properties b/libraries/ArduinoOTA/library.properties index 19e4ff49497..604e21d2819 100644 --- a/libraries/ArduinoOTA/library.properties +++ b/libraries/ArduinoOTA/library.properties @@ -1,5 +1,5 @@ name=ArduinoOTA -version=3.3.3 +version=3.3.4 author=Ivan Grokhotkov and Hristo Gochkov maintainer=Hristo Gochkov sentence=Enables Over The Air upgrades, via wifi and espota.py UDP request/TCP download. diff --git a/libraries/AsyncUDP/library.properties b/libraries/AsyncUDP/library.properties index 2bddae6ed53..0dc51eae1f7 100644 --- a/libraries/AsyncUDP/library.properties +++ b/libraries/AsyncUDP/library.properties @@ -1,5 +1,5 @@ name=ESP32 Async UDP -version=3.3.3 +version=3.3.4 author=Me-No-Dev maintainer=Me-No-Dev sentence=Async UDP Library for ESP32 diff --git a/libraries/BLE/library.properties b/libraries/BLE/library.properties index 2c2b07649b7..f4faf62a79e 100644 --- a/libraries/BLE/library.properties +++ b/libraries/BLE/library.properties @@ -1,5 +1,5 @@ name=BLE -version=3.3.3 +version=3.3.4 author=Neil Kolban maintainer=lucasssvaz sentence=BLE functions for ESP32 diff --git a/libraries/BluetoothSerial/library.properties b/libraries/BluetoothSerial/library.properties index 0ed931d2e2a..03d5687a49e 100644 --- a/libraries/BluetoothSerial/library.properties +++ b/libraries/BluetoothSerial/library.properties @@ -1,5 +1,5 @@ name=BluetoothSerial -version=3.3.3 +version=3.3.4 author=Evandro Copercini maintainer=Evandro Copercini sentence=Simple UART to Classical Bluetooth bridge for ESP32 diff --git a/libraries/DNSServer/library.properties b/libraries/DNSServer/library.properties index 3f880f80b1e..6d124cace69 100644 --- a/libraries/DNSServer/library.properties +++ b/libraries/DNSServer/library.properties @@ -1,5 +1,5 @@ name=DNSServer -version=3.3.3 +version=3.3.4 author=Kristijan Novoselić maintainer=Kristijan Novoselić, sentence=A simple DNS server for ESP32. diff --git a/libraries/EEPROM/library.properties b/libraries/EEPROM/library.properties index 4e69f9ea949..bf03f1a66e1 100644 --- a/libraries/EEPROM/library.properties +++ b/libraries/EEPROM/library.properties @@ -1,5 +1,5 @@ name=EEPROM -version=3.3.3 +version=3.3.4 author=Ivan Grokhotkov maintainer=Paolo Becchi sentence=Enables reading and writing data a sequential, addressable FLASH storage diff --git a/libraries/ESP32/library.properties b/libraries/ESP32/library.properties index 122a53435a9..ef14a246302 100644 --- a/libraries/ESP32/library.properties +++ b/libraries/ESP32/library.properties @@ -1,5 +1,5 @@ name=ESP32 -version=3.3.3 +version=3.3.4 author=Hristo Gochkov, Ivan Grokhtkov maintainer=Hristo Gochkov sentence=ESP32 sketches examples diff --git a/libraries/ESP_I2S/library.properties b/libraries/ESP_I2S/library.properties index e1dc8e34a03..da985780ca7 100644 --- a/libraries/ESP_I2S/library.properties +++ b/libraries/ESP_I2S/library.properties @@ -1,5 +1,5 @@ name=ESP_I2S -version=3.3.3 +version=3.3.4 author=me-no-dev maintainer=me-no-dev sentence=Library for ESP I2S communication diff --git a/libraries/ESP_NOW/library.properties b/libraries/ESP_NOW/library.properties index 4483af3c038..cae0ed03dc3 100644 --- a/libraries/ESP_NOW/library.properties +++ b/libraries/ESP_NOW/library.properties @@ -1,5 +1,5 @@ name=ESP_NOW -version=3.3.3 +version=3.3.4 author=me-no-dev maintainer=P-R-O-C-H-Y sentence=Library for ESP_NOW diff --git a/libraries/ESP_SR/library.properties b/libraries/ESP_SR/library.properties index 8752b08b2ee..5e019e501a2 100644 --- a/libraries/ESP_SR/library.properties +++ b/libraries/ESP_SR/library.properties @@ -1,5 +1,5 @@ name=ESP_SR -version=3.3.3 +version=3.3.4 author=me-no-dev maintainer=me-no-dev sentence=Library for ESP Sound Recognition diff --git a/libraries/ESPmDNS/library.properties b/libraries/ESPmDNS/library.properties index 68327251265..44a14541f40 100644 --- a/libraries/ESPmDNS/library.properties +++ b/libraries/ESPmDNS/library.properties @@ -1,5 +1,5 @@ name=ESPmDNS -version=3.3.3 +version=3.3.4 author=Hristo Gochkov, Ivan Grokhtkov maintainer=Hristo Gochkov sentence=ESP32 mDNS Library diff --git a/libraries/Ethernet/library.properties b/libraries/Ethernet/library.properties index d5cf3006131..bc342dff285 100644 --- a/libraries/Ethernet/library.properties +++ b/libraries/Ethernet/library.properties @@ -1,5 +1,5 @@ name=Ethernet -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=Enables network connection (local and Internet) using the ESP32 Ethernet. diff --git a/libraries/FFat/library.properties b/libraries/FFat/library.properties index dcce91754b8..707c593d9d2 100644 --- a/libraries/FFat/library.properties +++ b/libraries/FFat/library.properties @@ -1,5 +1,5 @@ name=FFat -version=3.3.3 +version=3.3.4 author=Hristo Gochkov, Ivan Grokhtkov, Larry Bernstone maintainer=Hristo Gochkov sentence=ESP32 FAT on Flash File System diff --git a/libraries/FS/library.properties b/libraries/FS/library.properties index c5c63775763..1ff59d3308d 100644 --- a/libraries/FS/library.properties +++ b/libraries/FS/library.properties @@ -1,5 +1,5 @@ name=FS -version=3.3.3 +version=3.3.4 author=Hristo Gochkov, Ivan Grokhtkov maintainer=Hristo Gochkov sentence=ESP32 File System diff --git a/libraries/HTTPClient/library.properties b/libraries/HTTPClient/library.properties index c685164c092..ffbcc9101be 100644 --- a/libraries/HTTPClient/library.properties +++ b/libraries/HTTPClient/library.properties @@ -1,5 +1,5 @@ name=HTTPClient -version=3.3.3 +version=3.3.4 author=Markus Sattler maintainer=Markus Sattler sentence=HTTP Client for ESP32 diff --git a/libraries/HTTPUpdate/library.properties b/libraries/HTTPUpdate/library.properties index f5a5bbe25bd..dcf5f1219d7 100644 --- a/libraries/HTTPUpdate/library.properties +++ b/libraries/HTTPUpdate/library.properties @@ -1,5 +1,5 @@ name=HTTPUpdate -version=3.3.3 +version=3.3.4 author=Markus Sattler maintainer=Markus Sattler sentence=Http Update for ESP32 diff --git a/libraries/HTTPUpdateServer/library.properties b/libraries/HTTPUpdateServer/library.properties index 9529c3831a8..bd034861f1e 100644 --- a/libraries/HTTPUpdateServer/library.properties +++ b/libraries/HTTPUpdateServer/library.properties @@ -1,5 +1,5 @@ name=HTTPUpdateServer -version=3.3.3 +version=3.3.4 author=Hristo Kapanakov maintainer= sentence=Simple HTTP Update server based on the WebServer diff --git a/libraries/Hash/library.properties b/libraries/Hash/library.properties index 8e416c03005..c497c42f71e 100644 --- a/libraries/Hash/library.properties +++ b/libraries/Hash/library.properties @@ -1,5 +1,5 @@ name=Hash -version=3.3.3 +version=3.3.4 author=lucasssvaz maintainer=lucasssvaz sentence=Bundle of hashing functions for the ESP32 diff --git a/libraries/Insights/library.properties b/libraries/Insights/library.properties index 49ffe5c0a1b..27285e999fe 100644 --- a/libraries/Insights/library.properties +++ b/libraries/Insights/library.properties @@ -1,5 +1,5 @@ name=ESP Insights -version=3.3.3 +version=3.3.4 author=Sanket Wadekar maintainer=Sanket Wadekar sentence=ESP Insights diff --git a/libraries/LittleFS/library.properties b/libraries/LittleFS/library.properties index e85cd5b4810..f5ad750a315 100644 --- a/libraries/LittleFS/library.properties +++ b/libraries/LittleFS/library.properties @@ -1,5 +1,5 @@ name=LittleFS -version=3.3.3 +version=3.3.4 author= maintainer= sentence=LittleFS for esp32 diff --git a/libraries/Matter/library.properties b/libraries/Matter/library.properties index 29d698d9f0e..b95e4e09a10 100644 --- a/libraries/Matter/library.properties +++ b/libraries/Matter/library.properties @@ -1,5 +1,5 @@ name=Matter -version=3.3.3 +version=3.3.4 author=Rodrigo Garcia | GitHub @SuGlider maintainer=Rodrigo Garcia sentence=Library for supporting Matter environment on ESP32. diff --git a/libraries/NetBIOS/library.properties b/libraries/NetBIOS/library.properties index 32609f02d6a..527a4aa1835 100644 --- a/libraries/NetBIOS/library.properties +++ b/libraries/NetBIOS/library.properties @@ -1,5 +1,5 @@ name=NetBIOS -version=3.3.3 +version=3.3.4 author=Pablo@xpablo.cz maintainer=Hristo Gochkov sentence=Enables NBNS (NetBIOS) name resolution. diff --git a/libraries/Network/library.properties b/libraries/Network/library.properties index 4e11bf73edc..f6c465eebb5 100644 --- a/libraries/Network/library.properties +++ b/libraries/Network/library.properties @@ -1,5 +1,5 @@ name=Networking -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=General network management library. diff --git a/libraries/NetworkClientSecure/library.properties b/libraries/NetworkClientSecure/library.properties index 02c0e566e38..2b867985222 100644 --- a/libraries/NetworkClientSecure/library.properties +++ b/libraries/NetworkClientSecure/library.properties @@ -1,5 +1,5 @@ name=NetworkClientSecure -version=3.3.3 +version=3.3.4 author=Evandro Luis Copercini maintainer=Github Community sentence=Enables secure network connection (local and Internet) using the ESP32 built-in WiFi. diff --git a/libraries/OpenThread/library.properties b/libraries/OpenThread/library.properties index d29ce033544..68b9c85f864 100644 --- a/libraries/OpenThread/library.properties +++ b/libraries/OpenThread/library.properties @@ -1,5 +1,5 @@ name=OpenThread -version=3.3.3 +version=3.3.4 author=Rodrigo Garcia | GitHub @SuGlider maintainer=Rodrigo Garcia sentence=Library for OpenThread Network on ESP32. diff --git a/libraries/PPP/library.properties b/libraries/PPP/library.properties index 8a4590ce1ac..b6ce0d16f34 100644 --- a/libraries/PPP/library.properties +++ b/libraries/PPP/library.properties @@ -1,5 +1,5 @@ name=PPP -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=Enables network connection using GSM Modem. diff --git a/libraries/Preferences/library.properties b/libraries/Preferences/library.properties index ea452b9e363..a9e3932888e 100644 --- a/libraries/Preferences/library.properties +++ b/libraries/Preferences/library.properties @@ -1,5 +1,5 @@ name=Preferences -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=Provides friendly access to ESP32's Non-Volatile Storage diff --git a/libraries/RainMaker/library.properties b/libraries/RainMaker/library.properties index 6c7d63a1c1f..af0c63b233b 100644 --- a/libraries/RainMaker/library.properties +++ b/libraries/RainMaker/library.properties @@ -1,5 +1,5 @@ name=ESP RainMaker -version=3.3.3 +version=3.3.4 author=Sweety Mhaiske maintainer=Hristo Gochkov sentence=ESP RainMaker Support diff --git a/libraries/SD/library.properties b/libraries/SD/library.properties index 81fcfc705b5..4bb9876e684 100644 --- a/libraries/SD/library.properties +++ b/libraries/SD/library.properties @@ -1,5 +1,5 @@ name=SD -version=3.3.3 +version=3.3.4 author=Arduino, SparkFun maintainer=Arduino sentence=Enables reading and writing on SD cards. For all Arduino boards. diff --git a/libraries/SD_MMC/library.properties b/libraries/SD_MMC/library.properties index 31447c8b95a..6011ed115ea 100644 --- a/libraries/SD_MMC/library.properties +++ b/libraries/SD_MMC/library.properties @@ -1,5 +1,5 @@ name=SD_MMC -version=3.3.3 +version=3.3.4 author=Hristo Gochkov, Ivan Grokhtkov maintainer=Hristo Gochkov sentence=ESP32 SDMMC File System diff --git a/libraries/SPI/library.properties b/libraries/SPI/library.properties index 9c4c8abec3e..15a17d9101c 100644 --- a/libraries/SPI/library.properties +++ b/libraries/SPI/library.properties @@ -1,5 +1,5 @@ name=SPI -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=Enables the communication with devices that use the Serial Peripheral Interface (SPI) Bus. For all Arduino boards, BUT Arduino DUE. diff --git a/libraries/SPIFFS/library.properties b/libraries/SPIFFS/library.properties index 5e73cf85f84..923172dd6ae 100644 --- a/libraries/SPIFFS/library.properties +++ b/libraries/SPIFFS/library.properties @@ -1,5 +1,5 @@ name=SPIFFS -version=3.3.3 +version=3.3.4 author=Hristo Gochkov, Ivan Grokhtkov maintainer=Hristo Gochkov sentence=ESP32 SPIFFS File System diff --git a/libraries/SimpleBLE/library.properties b/libraries/SimpleBLE/library.properties index 78c6d010b4b..cfa030f860d 100644 --- a/libraries/SimpleBLE/library.properties +++ b/libraries/SimpleBLE/library.properties @@ -1,5 +1,5 @@ name=SimpleBLE -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=Provides really simple BLE advertizer with just on and off diff --git a/libraries/TFLiteMicro/library.properties b/libraries/TFLiteMicro/library.properties index 7aa9c1381e9..52641b149d1 100644 --- a/libraries/TFLiteMicro/library.properties +++ b/libraries/TFLiteMicro/library.properties @@ -1,5 +1,5 @@ name=TFLite Micro -version=3.3.3 +version=3.3.4 author=Sanket Wadekar maintainer=Sanket Wadekar sentence=TensorFlow Lite for Microcontrollers diff --git a/libraries/Ticker/library.properties b/libraries/Ticker/library.properties index ccb63ec4f98..441519edab0 100644 --- a/libraries/Ticker/library.properties +++ b/libraries/Ticker/library.properties @@ -1,5 +1,5 @@ name=Ticker -version=3.3.3 +version=3.3.4 author=Bert Melis maintainer=Hristo Gochkov sentence=Allows to call functions with a given interval. diff --git a/libraries/USB/library.properties b/libraries/USB/library.properties index cb4ddfe231b..8698f2cffbe 100644 --- a/libraries/USB/library.properties +++ b/libraries/USB/library.properties @@ -1,5 +1,5 @@ name=USB -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=ESP32S2 USB Library diff --git a/libraries/Update/library.properties b/libraries/Update/library.properties index bb1ce7dd38d..e1b77c462b1 100644 --- a/libraries/Update/library.properties +++ b/libraries/Update/library.properties @@ -1,5 +1,5 @@ name=Update -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=ESP32 Sketch Update Library diff --git a/libraries/WebServer/library.properties b/libraries/WebServer/library.properties index 33a24010ecc..4d491effc14 100644 --- a/libraries/WebServer/library.properties +++ b/libraries/WebServer/library.properties @@ -1,5 +1,5 @@ name=WebServer -version=3.3.3 +version=3.3.4 author=Ivan Grokhotkov maintainer=Ivan Grokhtkov sentence=Simple web server library diff --git a/libraries/WiFi/library.properties b/libraries/WiFi/library.properties index 3f22467ad0d..61e8ddb0ca5 100644 --- a/libraries/WiFi/library.properties +++ b/libraries/WiFi/library.properties @@ -1,5 +1,5 @@ name=WiFi -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=Enables network connection (local and Internet) using the ESP32 built-in WiFi. diff --git a/libraries/WiFiProv/library.properties b/libraries/WiFiProv/library.properties index 134d86472f8..0a4aa5f9837 100644 --- a/libraries/WiFiProv/library.properties +++ b/libraries/WiFiProv/library.properties @@ -1,5 +1,5 @@ name=WiFiProv -version=3.3.3 +version=3.3.4 author=Switi Mhaiske maintainer=Hristo Gochkov sentence=Enables provisioning. diff --git a/libraries/Wire/library.properties b/libraries/Wire/library.properties index 72f3278a8d7..f016c349b88 100644 --- a/libraries/Wire/library.properties +++ b/libraries/Wire/library.properties @@ -1,5 +1,5 @@ name=Wire -version=3.3.3 +version=3.3.4 author=Hristo Gochkov maintainer=Hristo Gochkov sentence=Allows the communication between devices or sensors connected via Two Wire Interface Bus. For esp8266 boards. diff --git a/libraries/Zigbee/library.properties b/libraries/Zigbee/library.properties index 9f5fc6ef46e..cb671149723 100644 --- a/libraries/Zigbee/library.properties +++ b/libraries/Zigbee/library.properties @@ -1,5 +1,5 @@ name=Zigbee -version=3.3.3 +version=3.3.4 author=P-R-O-C-H-Y maintainer=Jan Procházka sentence=Enables zigbee connection with the ESP32 diff --git a/package.json b/package.json index 6c609c154bc..b8e8085d815 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "framework-arduinoespressif32", - "version": "3.3.3", + "version": "3.3.4", "description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-P4, ESP32-S and ESP32-C series of SoCs", "keywords": [ "framework", diff --git a/platform.txt b/platform.txt index ff0f7c92062..d715c0e2dca 100644 --- a/platform.txt +++ b/platform.txt @@ -1,5 +1,5 @@ name=ESP32 Arduino -version=3.3.3 +version=3.3.4 tools.esp32-arduino-libs.path={runtime.platform.path}/tools/esp32-arduino-libs tools.esp32-arduino-libs.path.windows={runtime.platform.path}\tools\esp32-arduino-libs From 607ebf090e523cea7061d0bc6908111cc8654d8d Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 13 Nov 2025 23:12:37 +0200 Subject: [PATCH 20/38] fix(hosted): Fix custom WiFi pins not picked from config (#12021) * fix(hosted): Fix custom WiFi pins not picked from config * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- cores/esp32/esp32-hal-hosted.c | 1 + variants/m5stack_tab5/pins_arduino.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/cores/esp32/esp32-hal-hosted.c b/cores/esp32/esp32-hal-hosted.c index 3e510438bd0..4fba105457c 100644 --- a/cores/esp32/esp32-hal-hosted.c +++ b/cores/esp32/esp32-hal-hosted.c @@ -17,6 +17,7 @@ #include "esp32-hal-hosted.h" #include "esp32-hal-log.h" +#include "pins_arduino.h" #include "esp_hosted.h" #include "esp_hosted_transport_config.h" diff --git a/variants/m5stack_tab5/pins_arduino.h b/variants/m5stack_tab5/pins_arduino.h index df9c1fb0d65..9f91ef7a29d 100644 --- a/variants/m5stack_tab5/pins_arduino.h +++ b/variants/m5stack_tab5/pins_arduino.h @@ -49,6 +49,10 @@ static const uint8_t T11 = 13; static const uint8_t T12 = 14; static const uint8_t T13 = 15; +//SDMMC +#define BOARD_HAS_SDMMC +#define BOARD_SDMMC_SLOT 0 + //WIFI - ESP32C6 #define BOARD_HAS_SDIO_ESP_HOSTED #define BOARD_SDIO_ESP_HOSTED_CLK 12 From 605b6f9d950b678843a6ba8cb4b129b161d5676f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Andr=C3=BDsek?= Date: Fri, 14 Nov 2025 09:47:05 +0100 Subject: [PATCH 21/38] feat(gpio): Enhance GPIO validation tests with interrupt handling and button functionality (#12020) --- tests/validation/gpio/diagram.esp32.json | 18 +- tests/validation/gpio/diagram.esp32c3.json | 14 +- tests/validation/gpio/diagram.esp32c6.json | 14 +- tests/validation/gpio/diagram.esp32h2.json | 14 +- tests/validation/gpio/diagram.esp32p4.json | 9 +- tests/validation/gpio/diagram.esp32s2.json | 14 +- tests/validation/gpio/diagram.esp32s3.json | 18 +- tests/validation/gpio/gpio.ino | 242 +++++++++++++++++++-- tests/validation/gpio/scenario.yaml | 40 ---- tests/validation/gpio/test_gpio.py | 109 +++++++++- 10 files changed, 411 insertions(+), 81 deletions(-) delete mode 100644 tests/validation/gpio/scenario.yaml diff --git a/tests/validation/gpio/diagram.esp32.json b/tests/validation/gpio/diagram.esp32.json index 05b28156e37..23603bc60fd 100644 --- a/tests/validation/gpio/diagram.esp32.json +++ b/tests/validation/gpio/diagram.esp32.json @@ -13,16 +13,26 @@ { "type": "wokwi-pushbutton", "id": "btn1", - "top": -13, - "left": -19.2, - "attrs": { "color": "green" } + "top": 83, + "left": -38.4, + "attrs": { "color": "green", "bounce": "0" } + }, + { + "type": "wokwi-led", + "id": "led1", + "top": -39.6, + "left": -41.4, + "rotate": 90, + "attrs": { "color": "red" } } ], "connections": [ [ "esp32:RX", "$serialMonitor:TX", "", [] ], [ "esp32:TX", "$serialMonitor:RX", "", [] ], [ "btn1:1.l", "esp32:0", "blue", [ "h-19.2", "v48", "h-38.4" ] ], - [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ] + [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v57.8", "h-240", "v-76.8" ] ], + [ "esp32:GND.2", "led1:C", "black", [ "v0" ] ], + [ "esp32:4", "led1:A", "green", [ "h0" ] ] ], "dependencies": {} } diff --git a/tests/validation/gpio/diagram.esp32c3.json b/tests/validation/gpio/diagram.esp32c3.json index c237e089ea2..e4c35c60667 100644 --- a/tests/validation/gpio/diagram.esp32c3.json +++ b/tests/validation/gpio/diagram.esp32c3.json @@ -15,14 +15,24 @@ "id": "btn1", "top": -22.6, "left": -19.2, - "attrs": { "color": "green" } + "attrs": { "color": "green", "bounce": "0" } + }, + { + "type": "wokwi-led", + "id": "led1", + "top": 28, + "left": -286.6, + "rotate": 270, + "attrs": { "color": "red" } } ], "connections": [ [ "esp32:RX", "$serialMonitor:TX", "", [] ], [ "esp32:TX", "$serialMonitor:RX", "", [] ], [ "btn1:1.l", "esp32:0", "blue", [ "h-28.8", "v144", "h-144", "v-95.7" ] ], - [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ] + [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ], + [ "esp32:GND.4", "led1:C", "black", [ "h0" ] ], + [ "esp32:4", "led1:A", "green", [ "v0" ] ] ], "dependencies": {} } diff --git a/tests/validation/gpio/diagram.esp32c6.json b/tests/validation/gpio/diagram.esp32c6.json index 5020171f4e6..f019943df78 100644 --- a/tests/validation/gpio/diagram.esp32c6.json +++ b/tests/validation/gpio/diagram.esp32c6.json @@ -15,14 +15,24 @@ "id": "btn1", "top": -22.6, "left": -19.2, - "attrs": { "color": "green" } + "attrs": { "color": "green", "bounce": "0" } + }, + { + "type": "wokwi-led", + "id": "led1", + "top": 56.8, + "left": -286.6, + "rotate": 270, + "attrs": { "color": "red" } } ], "connections": [ [ "esp32:RX", "$serialMonitor:TX", "", [] ], [ "esp32:TX", "$serialMonitor:RX", "", [] ], [ "btn1:1.l", "esp32:0", "blue", [ "h-19.2", "v-96", "h-163.2", "v93.77" ] ], - [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ] + [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ], + [ "esp32:GND.1", "led1:C", "black", [ "h0" ] ], + [ "esp32:4", "led1:A", "green", [ "h0" ] ] ], "dependencies": {} } diff --git a/tests/validation/gpio/diagram.esp32h2.json b/tests/validation/gpio/diagram.esp32h2.json index 48189dcea9f..e8c760d34db 100644 --- a/tests/validation/gpio/diagram.esp32h2.json +++ b/tests/validation/gpio/diagram.esp32h2.json @@ -15,14 +15,24 @@ "id": "btn1", "top": -22.6, "left": -19.2, - "attrs": { "color": "green" } + "attrs": { "color": "green", "bounce": "0" } + }, + { + "type": "wokwi-led", + "id": "led1", + "top": -0.8, + "left": -267.4, + "rotate": 270, + "attrs": { "color": "red" } } ], "connections": [ [ "esp32:RX", "$serialMonitor:TX", "", [] ], [ "esp32:TX", "$serialMonitor:RX", "", [] ], [ "btn1:1.l", "esp32:0", "blue", [ "h-19.2", "v-96", "h-163.2", "v93.77" ] ], - [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ] + [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ], + [ "esp32:GND.2", "led1:C", "black", [ "h0" ] ], + [ "esp32:4", "led1:A", "green", [ "h-29.14", "v-26.57" ] ] ], "dependencies": {} } diff --git a/tests/validation/gpio/diagram.esp32p4.json b/tests/validation/gpio/diagram.esp32p4.json index ffb0cde2775..21bc4177896 100644 --- a/tests/validation/gpio/diagram.esp32p4.json +++ b/tests/validation/gpio/diagram.esp32p4.json @@ -15,14 +15,17 @@ "id": "btn1", "top": -128.2, "left": -19.2, - "attrs": { "color": "green", "bounce": "1" } - } + "attrs": { "color": "green", "bounce": "0" } + }, + { "type": "wokwi-led", "id": "led1", "top": -138, "left": -92.2, "attrs": { "color": "red" } } ], "connections": [ [ "esp32:38", "$serialMonitor:TX", "", [] ], [ "esp32:37", "$serialMonitor:RX", "", [] ], [ "btn1:2.r", "esp32:GND.3", "black", [ "h19.4", "v29" ] ], - [ "esp32:0", "btn1:1.l", "blue", [ "h-48", "v-67.2" ] ] + [ "esp32:0", "btn1:1.l", "blue", [ "h-48", "v-67.2" ] ], + [ "esp32:GND.1", "led1:C", "black", [ "v0" ] ], + [ "esp32:4", "led1:A", "green", [ "v-19.2", "h-48" ] ] ], "dependencies": {} } diff --git a/tests/validation/gpio/diagram.esp32s2.json b/tests/validation/gpio/diagram.esp32s2.json index e3f850e193e..6607863962d 100644 --- a/tests/validation/gpio/diagram.esp32s2.json +++ b/tests/validation/gpio/diagram.esp32s2.json @@ -15,14 +15,24 @@ "id": "btn1", "top": -22.6, "left": -19.2, - "attrs": { "color": "green" } + "attrs": { "color": "green", "bounce": "0" } + }, + { + "type": "wokwi-led", + "id": "led1", + "top": -0.8, + "left": -277, + "rotate": 270, + "attrs": { "color": "red" } } ], "connections": [ [ "esp32:RX", "$serialMonitor:TX", "", [] ], [ "esp32:TX", "$serialMonitor:RX", "", [] ], [ "btn1:1.l", "esp32:0", "blue", [ "h-28.8", "v-57.6", "h-144", "v42.71" ] ], - [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ] + [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ], + [ "esp32:GND.1", "led1:C", "black", [ "h-67.47", "v-167.51" ] ], + [ "esp32:4", "led1:A", "green", [ "h0" ] ] ], "dependencies": {} } diff --git a/tests/validation/gpio/diagram.esp32s3.json b/tests/validation/gpio/diagram.esp32s3.json index ad9f9e0308a..11b14e86cf6 100644 --- a/tests/validation/gpio/diagram.esp32s3.json +++ b/tests/validation/gpio/diagram.esp32s3.json @@ -13,16 +13,26 @@ { "type": "wokwi-pushbutton", "id": "btn1", - "top": -22.6, - "left": -19.2, - "attrs": { "color": "green" } + "top": 83, + "left": 9.6, + "attrs": { "color": "green", "bounce": "0" } + }, + { + "type": "wokwi-led", + "id": "led1", + "top": 66.4, + "left": -257.8, + "rotate": 270, + "attrs": { "color": "red", "flip": "" } } ], "connections": [ [ "esp32:RX", "$serialMonitor:TX", "", [] ], [ "esp32:TX", "$serialMonitor:RX", "", [] ], [ "btn1:1.l", "esp32:0", "blue", [ "h-38.4", "v105.78" ] ], - [ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v221", "h-269.2", "v-57.42" ] ] + [ "btn1:2.r", "esp32:GND.3", "green", [ "h19.4", "v48.2", "h-144.4", "v0.18" ] ], + [ "esp32:4", "led1:A", "green", [ "h0" ] ], + [ "esp32:GND.1", "led1:C", "black", [ "h0" ] ] ], "dependencies": {} } diff --git a/tests/validation/gpio/gpio.ino b/tests/validation/gpio/gpio.ino index a5bec1cb5a3..b0c3f7ec0bd 100644 --- a/tests/validation/gpio/gpio.ino +++ b/tests/validation/gpio/gpio.ino @@ -1,31 +1,241 @@ +/** + * GPIO Validation Test + * There are multiple synchronization points in this test. + * They are required for proper timing between the running code and wokwi-pytest. + * Without them, the test sometimes fails due to timing issues. + */ + #include #include #define BTN 0 +#define LED 4 + +volatile int interruptCounter = 0; +volatile bool interruptFlag = false; +volatile unsigned long lastInterruptTime = 0; + +// Variables for interrupt with argument test +volatile int argInterruptCounter = 0; +volatile bool argInterruptFlag = false; +volatile int receivedArg = 0; -void test_button() { - Serial.println("Button test"); - static int count = 0; - static int lastState = HIGH; - while (count < 3) { - int state = digitalRead(BTN); - if (state != lastState) { - if (state == LOW) { - count++; - Serial.print("Button pressed "); - Serial.print(count); - Serial.println(" times"); - } - lastState = state; +void waitForSyncAck(const String &token = "OK") { + while (true) { + String response = Serial.readStringUntil('\n'); + response.trim(); + if (response.equalsIgnoreCase(token)) { + break; } delay(10); } } +void setUp(void) { + interruptCounter = 0; + interruptFlag = false; + lastInterruptTime = 0; + argInterruptCounter = 0; + argInterruptFlag = false; + receivedArg = 0; +} + +void tearDown(void) {} + +void IRAM_ATTR buttonISR() { + unsigned long currentTime = millis(); + if (currentTime - lastInterruptTime > 50) { + interruptCounter = interruptCounter + 1; + interruptFlag = true; + lastInterruptTime = currentTime; + } +} + +void IRAM_ATTR buttonISRWithArg(void *arg) { + unsigned long currentTime = millis(); + if (currentTime - lastInterruptTime > 50) { + argInterruptCounter = argInterruptCounter + 1; + argInterruptFlag = true; + receivedArg = *(int *)arg; + lastInterruptTime = currentTime; + } +} + +void test_read_basic(void) { + pinMode(BTN, INPUT_PULLUP); + TEST_ASSERT_EQUAL(HIGH, digitalRead(BTN)); + Serial.println("BTN read as HIGH after pinMode INPUT_PULLUP"); + + waitForSyncAck(); // sync ack R1 + TEST_ASSERT_EQUAL(LOW, digitalRead(BTN)); + Serial.println("BTN read as LOW"); + + waitForSyncAck(); // sync ack R2 + TEST_ASSERT_EQUAL(HIGH, digitalRead(BTN)); + Serial.println("BTN read as HIGH"); +} + +void test_write_basic(void) { + pinMode(LED, OUTPUT); + Serial.println("GPIO LED set to OUTPUT"); + waitForSyncAck(); // sync ack W1 + + digitalWrite(LED, HIGH); + Serial.println("LED set to HIGH"); + waitForSyncAck(); // sync ack W2 + + digitalWrite(LED, LOW); + Serial.println("LED set to LOW"); +} + +void test_interrupt_attach_detach(void) { + pinMode(BTN, INPUT_PULLUP); + pinMode(LED, OUTPUT); + digitalWrite(LED, LOW); + + interruptCounter = 0; + attachInterrupt(digitalPinToInterrupt(BTN), buttonISR, FALLING); + Serial.println("Interrupt attached - FALLING edge"); + + for (int i = 1; i <= 3; i++) { + interruptFlag = false; + waitForSyncAck("OK:" + String(i)); + + TEST_ASSERT_TRUE(interruptFlag); + TEST_ASSERT_EQUAL(i, interruptCounter); + Serial.println(String(i) + " interrupt triggered successfully"); + } + + detachInterrupt(digitalPinToInterrupt(BTN)); + Serial.println("Interrupt detached"); + + interruptCounter = 0; + interruptFlag = false; + + TEST_ASSERT_FALSE(interruptFlag); + TEST_ASSERT_EQUAL(0, interruptCounter); + Serial.println("No interrupt triggered after detach"); + waitForSyncAck(); +} + +void test_interrupt_falling(void) { + pinMode(BTN, INPUT_PULLUP); + + interruptCounter = 0; + interruptFlag = false; + + attachInterrupt(digitalPinToInterrupt(BTN), buttonISR, FALLING); + Serial.println("Testing FALLING edge interrupt"); + + for (int i = 1; i <= 3; i++) { + interruptFlag = false; + waitForSyncAck("OK:" + String(i)); + + TEST_ASSERT_TRUE(interruptFlag); + TEST_ASSERT_EQUAL(i, interruptCounter); + Serial.println(String(i) + " FALLING edge interrupt worked"); + } + + detachInterrupt(digitalPinToInterrupt(BTN)); + Serial.println("Testing FALLING edge END"); + waitForSyncAck(); +} + +void test_interrupt_rising(void) { + pinMode(BTN, INPUT_PULLUP); + + interruptCounter = 0; + interruptFlag = false; + + attachInterrupt(digitalPinToInterrupt(BTN), buttonISR, RISING); + Serial.println("Testing RISING edge interrupt"); + + interruptCounter = 0; + interruptFlag = false; + + for (int i = 1; i <= 3; i++) { + interruptFlag = false; + waitForSyncAck("OK:" + String(i)); + + TEST_ASSERT_TRUE(interruptFlag); + TEST_ASSERT_EQUAL(i, interruptCounter); + Serial.println(String(i) + " RISING edge interrupt worked"); + } + + detachInterrupt(digitalPinToInterrupt(BTN)); + Serial.println("Testing RISING edge END"); + waitForSyncAck(); +} + +void test_interrupt_change(void) { + pinMode(BTN, INPUT_PULLUP); + + interruptCounter = 0; + interruptFlag = false; + + attachInterrupt(digitalPinToInterrupt(BTN), buttonISR, CHANGE); + Serial.println("Testing CHANGE edge interrupt"); + + for (int i = 1; i <= 6; i++) { + interruptFlag = false; + waitForSyncAck("OK:" + String(i)); + + TEST_ASSERT_TRUE(interruptFlag); + TEST_ASSERT_EQUAL(i, interruptCounter); + Serial.println(String(i) + " CHANGE edge interrupt worked"); + } + + detachInterrupt(digitalPinToInterrupt(BTN)); + Serial.println("Testing CHANGE edge END"); + waitForSyncAck(); +} + +void test_interrupt_with_arg(void) { + pinMode(BTN, INPUT_PULLUP); + + int argValue = 42; // Example argument to pass + interruptCounter = 0; + argInterruptFlag = false; + + attachInterruptArg(digitalPinToInterrupt(BTN), buttonISRWithArg, &argValue, FALLING); + Serial.println("Testing interrupt with argument"); + + for (int i = 1; i <= 3; i++) { + argInterruptFlag = false; + waitForSyncAck("OK:" + String(i)); + + TEST_ASSERT_TRUE(argInterruptFlag); + TEST_ASSERT_EQUAL(i, argInterruptCounter); + TEST_ASSERT_EQUAL(argValue, receivedArg); + Serial.println(String(i) + " interrupt with argument worked, received arg: " + String(receivedArg)); + ++argValue; + } + + detachInterrupt(digitalPinToInterrupt(BTN)); + Serial.println("Testing interrupt with argument END"); + waitForSyncAck(); +} + void setup() { Serial.begin(115200); - pinMode(BTN, INPUT_PULLUP); - test_button(); + while (!Serial) {} + + UNITY_BEGIN(); + + Serial.println("GPIO test START"); + RUN_TEST(test_read_basic); + RUN_TEST(test_write_basic); + + Serial.println("GPIO interrupt START"); + RUN_TEST(test_interrupt_attach_detach); + RUN_TEST(test_interrupt_falling); + RUN_TEST(test_interrupt_rising); + + RUN_TEST(test_interrupt_change); + RUN_TEST(test_interrupt_with_arg); + + UNITY_END(); + Serial.println("GPIO test END"); } void loop() {} diff --git a/tests/validation/gpio/scenario.yaml b/tests/validation/gpio/scenario.yaml deleted file mode 100644 index 957f58b2176..00000000000 --- a/tests/validation/gpio/scenario.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Pushbutton counter test -version: 1 -author: Jan Prochazka (jan.prochazka@espressif.com) - -steps: - - wait-serial: "Button test" - - # Need for 1s delay for scenario to run properly - - delay: 5000ms - - # Press once - - set-control: - part-id: btn1 - control: pressed - value: 1 - - delay: 2000ms - - set-control: - part-id: btn1 - control: pressed - value: 0 - - delay: 3000ms - - # Press 2nd time - - set-control: - part-id: btn1 - control: pressed - value: 1 - - delay: 2000ms - - set-control: - part-id: btn1 - control: pressed - value: 0 - - delay: 3000ms - - # Press for the 3rd time - - set-control: - part-id: btn1 - control: pressed - value: 1 - - wait-serial: "Button pressed 3 times" diff --git a/tests/validation/gpio/test_gpio.py b/tests/validation/gpio/test_gpio.py index 42010ab520b..30f32562c88 100644 --- a/tests/validation/gpio/test_gpio.py +++ b/tests/validation/gpio/test_gpio.py @@ -1,17 +1,114 @@ import logging from pytest_embedded_wokwi import Wokwi from pytest_embedded import Dut +from time import sleep def test_gpio(dut: Dut, wokwi: Wokwi): LOGGER = logging.getLogger(__name__) - LOGGER.info("Waiting for Button test begin...") - dut.expect_exact("Button test") - - for i in range(3): - LOGGER.info(f"Setting button pressed for {i + 1} seconds") + def test_read_basic(): + dut.expect_exact("BTN read as HIGH after pinMode INPUT_PULLUP") wokwi.client.set_control("btn1", "pressed", 1) + wokwi.client.serial_write("OK\n") # Sync ack R1 + dut.expect_exact("BTN read as LOW") - dut.expect_exact(f"Button pressed {i + 1} times") wokwi.client.set_control("btn1", "pressed", 0) + wokwi.client.serial_write("OK\n") # Sync ack R2 + dut.expect_exact("BTN read as HIGH") + LOGGER.info("GPIO read basic test passed.") + + def test_write_basic(): + dut.expect_exact("GPIO LED set to OUTPUT") + assert wokwi.client.read_pin("led1", "A")["value"] == 0 # Anode pin + wokwi.client.serial_write("OK\n") # Sync ack W1 + + dut.expect_exact("LED set to HIGH") + assert wokwi.client.read_pin("led1", "A")["value"] == 1 + wokwi.client.serial_write("OK\n") # Sync ack W2 + + dut.expect_exact("LED set to LOW") + assert wokwi.client.read_pin("led1", "A")["value"] == 0 + LOGGER.info("GPIO write basic test passed.") + + def test_interrupt_attach_detach(): + dut.expect_exact("Interrupt attached - FALLING edge") + + for i in range(1, 4): + wokwi.client.set_control("btn1", "pressed", 1) + wokwi.client.serial_write(f"OK:{i}\n") + dut.expect_exact(f"{i} interrupt triggered successfully") + wokwi.client.set_control("btn1", "pressed", 0) + + dut.expect_exact("Interrupt detached") + wokwi.client.set_control("btn1", "pressed", 1) + sleep(0.1) + dut.expect_exact("No interrupt triggered after detach") + wokwi.client.set_control("btn1", "pressed", 0) + wokwi.client.serial_write("OK\n") + LOGGER.info("GPIO interrupt attach/detach test passed.") + + def test_interrupt_falling(): + dut.expect_exact("Testing FALLING edge interrupt") + for i in range(1, 4): + wokwi.client.set_control("btn1", "pressed", 1) + wokwi.client.serial_write(f"OK:{i}\n") + dut.expect_exact(f"{i} FALLING edge interrupt worked") + wokwi.client.set_control("btn1", "pressed", 0) + + dut.expect_exact("Testing FALLING edge END") + wokwi.client.serial_write("OK\n") + LOGGER.info("GPIO interrupt falling test passed.") + + def test_interrupt_rising(): + dut.expect_exact("Testing RISING edge interrupt") + + for i in range(1, 4): + wokwi.client.set_control("btn1", "pressed", 1) + wokwi.client.set_control("btn1", "pressed", 0) + wokwi.client.serial_write(f"OK:{i}\n") + dut.expect_exact(f"{i} RISING edge interrupt worked") + + dut.expect_exact("Testing RISING edge END") + wokwi.client.serial_write("OK\n") + LOGGER.info("GPIO interrupt rising test passed.") + + def test_interrupt_change(): + dut.expect_exact("Testing CHANGE edge interrupt") + + for i in range(1, 4): + wokwi.client.set_control("btn1", "pressed", 1) + wokwi.client.serial_write(f"OK:{i * 2 - 1}\n") + dut.expect_exact(f"{i * 2 - 1} CHANGE edge interrupt worked") + + wokwi.client.set_control("btn1", "pressed", 0) + wokwi.client.serial_write(f"OK:{i * 2}\n") + dut.expect_exact(f"{i * 2} CHANGE edge interrupt worked") + + dut.expect_exact("Testing CHANGE edge END") + wokwi.client.serial_write("OK\n") + LOGGER.info("GPIO interrupt change test passed.") + + def test_interrupt_with_arg(): + dut.expect_exact("Testing interrupt with argument") + + for i in range(1, 4): + wokwi.client.set_control("btn1", "pressed", 1) + wokwi.client.serial_write(f"OK:{i}\n") + dut.expect_exact(f"{i} interrupt with argument worked, received arg: {42 + i - 1}") + wokwi.client.set_control("btn1", "pressed", 0) + dut.expect_exact("Testing interrupt with argument END") + wokwi.client.serial_write("OK\n") + LOGGER.info("GPIO interrupt with argument test passed.") + + LOGGER.info("Waiting for GPIO test begin...") + dut.expect_exact("GPIO test START") + test_read_basic() + test_write_basic() + dut.expect_exact("GPIO interrupt START") + test_interrupt_attach_detach() + test_interrupt_falling() + test_interrupt_rising() + test_interrupt_change() + test_interrupt_with_arg() + LOGGER.info("GPIO test END") From 3cad8496598029bf248b3b29d81afbdb6425c9ff Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Fri, 14 Nov 2025 05:47:23 -0300 Subject: [PATCH 22/38] feat(ble): Add function to set pins when using hosted BLE (#12023) --- libraries/BLE/src/BLEDevice.cpp | 17 +++++++++++++++++ libraries/BLE/src/BLEDevice.h | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/libraries/BLE/src/BLEDevice.cpp b/libraries/BLE/src/BLEDevice.cpp index 8cf8dca0e5a..c184fada279 100644 --- a/libraries/BLE/src/BLEDevice.cpp +++ b/libraries/BLE/src/BLEDevice.cpp @@ -1219,6 +1219,23 @@ void BLEDevice::setCustomGattsHandler(gatts_event_handler handler) { #if defined(CONFIG_NIMBLE_ENABLED) +/** + * @brief Set the SDIO pins for connection to external ESP MCU when using ESP-Hosted with NimBLE + * @param [in] clk The clock pin + * @param [in] cmd The command pin + * @param [in] d0 The data pin 0 + * @param [in] d1 The data pin 1 + * @param [in] d2 The data pin 2 + * @param [in] d3 The data pin 3 + * @param [in] rst The reset pin + * @return True if the pins were set successfully. + */ +#if CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE +bool BLEDevice::setPins(int8_t clk, int8_t cmd, int8_t d0, int8_t d1, int8_t d2, int8_t d3, int8_t rst) { + return hostedSetPins(clk, cmd, d0, d1, d2, d3, rst); +} +#endif + /** * @brief Checks if a peer device is whitelisted. * @param [in] address The address to check for in the whitelist. diff --git a/libraries/BLE/src/BLEDevice.h b/libraries/BLE/src/BLEDevice.h index 9d9cbf0421e..5d4a16295a8 100644 --- a/libraries/BLE/src/BLEDevice.h +++ b/libraries/BLE/src/BLEDevice.h @@ -234,6 +234,10 @@ class BLEDevice { static bool setOwnAddr(uint8_t *addr); static void setDeviceCallbacks(BLEDeviceCallbacks *cb); static bool onWhiteList(BLEAddress &address); +#if CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE + // Set SDIO pins for connection to external ESP MCU + static bool setPins(int8_t clk, int8_t cmd, int8_t d0, int8_t d1, int8_t d2, int8_t d3, int8_t rst); +#endif #endif private: From da663f357c31d43faed73982003fc978f12e9019 Mon Sep 17 00:00:00 2001 From: Wulu Date: Sat, 15 Nov 2025 00:35:38 +0800 Subject: [PATCH 23/38] fix(boards): Enable CDC on Boot by default for Waveshare ESP32-S3-ZERO (#12030) --- boards.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boards.txt b/boards.txt index 9add21d43e7..dc38debe94d 100644 --- a/boards.txt +++ b/boards.txt @@ -42936,10 +42936,10 @@ waveshare_esp32_s3_zero.menu.USBMode.hwcdc.build.usb_mode=1 waveshare_esp32_s3_zero.menu.USBMode.default=USB-OTG (TinyUSB) waveshare_esp32_s3_zero.menu.USBMode.default.build.usb_mode=0 -waveshare_esp32_s3_zero.menu.CDCOnBoot.default=Disabled -waveshare_esp32_s3_zero.menu.CDCOnBoot.default.build.cdc_on_boot=0 -waveshare_esp32_s3_zero.menu.CDCOnBoot.cdc=Enabled -waveshare_esp32_s3_zero.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +waveshare_esp32_s3_zero.menu.CDCOnBoot.default=Enabled +waveshare_esp32_s3_zero.menu.CDCOnBoot.default.build.cdc_on_boot=1 +waveshare_esp32_s3_zero.menu.CDCOnBoot.cdc=Disabled +waveshare_esp32_s3_zero.menu.CDCOnBoot.cdc.build.cdc_on_boot=0 waveshare_esp32_s3_zero.menu.MSCOnBoot.default=Disabled waveshare_esp32_s3_zero.menu.MSCOnBoot.default.build.msc_on_boot=0 From fc8501052e1b0be2e8b6fc99ba3055b05d336ae0 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Fri, 14 Nov 2025 22:17:12 +0200 Subject: [PATCH 24/38] feat(components): Update cbor to 0.6.1~4 (#12028) --- idf_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idf_component.yml b/idf_component.yml index 99bf7048c1c..5d52c8f8c8f 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -94,7 +94,7 @@ dependencies: rules: - if: "target not in [esp32c2, esp32p4]" espressif/cbor: - version: "0.6.0~1" + version: "0.6.1~4" rules: - if: "target not in [esp32c2, esp32p4]" espressif/qrcode: From d39181be05bd4b4d6f1ac47a4cda3c43825e79c4 Mon Sep 17 00:00:00 2001 From: Piotr Gniado Date: Mon, 17 Nov 2025 13:07:48 +0100 Subject: [PATCH 25/38] Add variation of PPPClass::cmd() (#12034) * feat(ppp): Add variation of PPPClass::cmd() Add variation of PPPClass::cmd() function that returns more detailed response. * fix(pr): Fix typo in comment about timeout occurrence --------- Co-authored-by: Me No Dev --- libraries/PPP/src/PPP.cpp | 24 ++++++++++++++++++++++++ libraries/PPP/src/PPP.h | 15 +++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/libraries/PPP/src/PPP.cpp b/libraries/PPP/src/PPP.cpp index 76c5fad0d78..01989429ae5 100644 --- a/libraries/PPP/src/PPP.cpp +++ b/libraries/PPP/src/PPP.cpp @@ -757,6 +757,30 @@ String PPPClass::cmd(const char *at_command, int timeout) { return String(out); } +bool PPPClass::cmd(const char *at_command, String &response, int timeout) { + PPP_CMD_MODE_CHECK(false); + + char out[128] = {0}; + esp_err_t err = _esp_modem_at(_dce, at_command, out, timeout); + response = String(out); + + if (err != ESP_OK) { + log_e("esp_modem_at failed %d %s", err, esp_err_to_name(err)); + + if (err == ESP_FAIL && response.isEmpty()) { + response = "ERROR"; + } + + return false; + } + + if (response.isEmpty()) { + response = "OK"; + } + + return true; +} + size_t PPPClass::printDriverInfo(Print &out) const { size_t bytes = 0; if (_dce == NULL || _mode == ESP_MODEM_MODE_DATA) { diff --git a/libraries/PPP/src/PPP.h b/libraries/PPP/src/PPP.h index 189825b61a1..cb87b57fe57 100644 --- a/libraries/PPP/src/PPP.h +++ b/libraries/PPP/src/PPP.h @@ -73,11 +73,26 @@ class PPPClass : public NetworkInterface { } // Send AT command with timeout in milliseconds + // Function deprecated - kept for backward compatibility + // Function may return empty string in multiple cases: + // - When timeout occurred; + // - When "OK" AT response was received; + // - When "ERROR" AT response was received. + // For more detailed return, usage of `bool PPPClass::cmd(at_command, response, timeout)` is recommended. String cmd(const char *at_command, int timeout); String cmd(String at_command, int timeout) { return cmd(at_command.c_str(), timeout); } + // Send AT command with timeout in milliseconds + // When PPP is not started or timeout occurs: Function returns false; response string is not modified + // When AT error response is received: Function returns false; response contains "ERROR" or detailed AT response + // When AT success response is received: Function returns true; response contains "OK" or detailed AT response + bool cmd(const char *at_command, String &response, int timeout); + bool cmd(String at_command, String &response, int timeout) { + return cmd(at_command.c_str(), response, timeout); + } + // untested bool powerDown(); bool reset(); From 071e97489ae5ae6a00960112b07dc52300c71da6 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Wed, 19 Nov 2025 20:26:16 +0200 Subject: [PATCH 26/38] feat(core): Add option to support chip variants (#12036) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(core): Add option to support chip variants * add `chip_variant` to pioarduino-build.py * Refactor build_mcu and chip_variant assignment logic * fix(adc): Rename data struct as its used in idf * IDF release/v5.5 8d036f2e * fix(adc): Add weak definitions for p4 rev 3 * fix(adc): Calibration fix for unsupported socs --------- Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- boards.txt | 15 +- cores/esp32/esp32-hal-adc.c | 60 +++++- cores/esp32/esp32-hal-adc.h | 4 +- docs/en/api/adc.rst | 10 +- .../AnalogReadContinuous.ino | 2 +- package/package_esp32_index.template.json | 204 +++++++++--------- platform.txt | 5 +- tests/validation/periman/periman.ino | 2 +- tools/pioarduino-build.py | 6 +- 9 files changed, 179 insertions(+), 129 deletions(-) diff --git a/boards.txt b/boards.txt index dc38debe94d..fee18c92c14 100644 --- a/boards.txt +++ b/boards.txt @@ -19,6 +19,7 @@ menu.EraseFlash=Erase All Flash Before Sketch Upload menu.JTAGAdapter=JTAG Adapter menu.ZigbeeMode=Zigbee Mode menu.PinNumbers=Pin Numbering +menu.ChipVariant=Chip Variant # Custom options menu.Revision=Board Revision @@ -398,6 +399,7 @@ esp32p4.build.target=esp esp32p4.build.mcu=esp32p4 esp32p4.build.core=esp32 esp32p4.build.variant=esp32p4 +esp32p4.build.chip_variant=esp32p4_es esp32p4.build.board=ESP32P4_DEV esp32p4.build.bootloader_addr=0x2000 @@ -414,6 +416,13 @@ esp32p4.build.boot=qio esp32p4.build.partitions=default esp32p4.build.defines= +esp32p4.menu.ChipVariant.prev3=Before v3.00 +esp32p4.menu.ChipVariant.prev3.build.chip_variant=esp32p4_es +esp32p4.menu.ChipVariant.prev3.build.f_cpu=360000000L +esp32p4.menu.ChipVariant.postv3=v3.00 or newer +esp32p4.menu.ChipVariant.postv3.build.chip_variant=esp32p4 +esp32p4.menu.ChipVariant.postv3.build.f_cpu=400000000L + ## IDE 2.0 Seems to not update the value esp32p4.menu.JTAGAdapter.default=Disabled esp32p4.menu.JTAGAdapter.default.build.copy_jtag_files=0 @@ -512,12 +521,6 @@ esp32p4.menu.PartitionScheme.custom=Custom esp32p4.menu.PartitionScheme.custom.build.partitions= esp32p4.menu.PartitionScheme.custom.upload.maximum_size=16777216 -## From https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/api-reference/kconfig.html#config-esp-default-cpu-freq-mhz -esp32p4.menu.CPUFreq.360=360MHz -esp32p4.menu.CPUFreq.360.build.f_cpu=360000000L -esp32p4.menu.CPUFreq.40=40MHz -esp32p4.menu.CPUFreq.40.build.f_cpu=40000000L - esp32p4.menu.FlashMode.qio=QIO esp32p4.menu.FlashMode.qio.build.flash_mode=dio esp32p4.menu.FlashMode.qio.build.boot=qio diff --git a/cores/esp32/esp32-hal-adc.c b/cores/esp32/esp32-hal-adc.c index c7cc1f5d556..342ce9aefb0 100644 --- a/cores/esp32/esp32-hal-adc.c +++ b/cores/esp32/esp32-hal-adc.c @@ -21,6 +21,35 @@ #include "esp_adc/adc_continuous.h" #include "esp_adc/adc_cali_scheme.h" +#if CONFIG_IDF_TARGET_ESP32P4 && CONFIG_ESP32P4_REV_MIN_FULL >= 300 +// NOTE: These weak definitions allow successful linkage if the real efuse calibration functions are missing. +// This is a workaround for the ESP32P4 rev 3.0+, which is missing efuse calibration functions in the IDF. +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_ver(void) { + return 0; +} + +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_init_code(uint32_t atten, uint32_t *code) { + if (code) { + *code = 0; + } + return 0; // 0 means success in ESP-IDF conventions +} + +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_chan_compens(uint32_t atten, uint32_t *comp) { + if (comp) { + *comp = 0; + } + return 0; +} + +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_cal_voltage(uint32_t atten, uint32_t *voltage) { + if (voltage) { + *voltage = 0; + } + return 0; +} +#endif + // ESP32-C2 does not define those two for some reason #ifndef SOC_ADC_DIGI_RESULT_BYTES #define SOC_ADC_DIGI_RESULT_BYTES (4) @@ -75,11 +104,14 @@ static bool adcDetachBus(void *pin) { if (err != ESP_OK) { return false; } -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; } +#else + log_e("ADC Calibration scheme is not supported!"); + return false; #endif } adc_handle[adc_unit].adc_cali_handle = NULL; @@ -127,7 +159,7 @@ esp_err_t __analogChannelConfig(adc_bitwidth_t width, adc_attenuation_t atten, i log_e("adc_cali_create_scheme_curve_fitting failed with error: %d", err); return err; } -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED log_d("Deleting ADC_UNIT_%d line cali handle", adc_unit); err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { @@ -145,6 +177,9 @@ esp_err_t __analogChannelConfig(adc_bitwidth_t width, adc_attenuation_t atten, i log_e("adc_cali_create_scheme_line_fitting failed with error: %d", err); return err; } +#else + log_e("ADC Calibration scheme is not supported!"); + return ESP_ERR_NOT_SUPPORTED; #endif } } @@ -310,13 +345,16 @@ uint32_t __analogReadMilliVolts(uint8_t pin) { .bitwidth = __analogWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __analogWidth, .atten = __analogAttenuation, }; err = adc_cali_create_scheme_line_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); +#else + log_e("ADC Calibration scheme is not supported!"); + return value; #endif if (err != ESP_OK) { log_e("adc_cali_create_scheme_x failed!"); @@ -360,7 +398,7 @@ static uint8_t __adcContinuousAtten = ADC_11db; static uint8_t __adcContinuousWidth = SOC_ADC_DIGI_MAX_BITWIDTH; static uint8_t used_adc_channels = 0; -adc_continuous_data_t *adc_result = NULL; +adc_continuous_result_t *adc_result = NULL; static bool adcContinuousDetachBus(void *adc_unit_number) { adc_unit_t adc_unit = (adc_unit_t)adc_unit_number - 1; @@ -379,11 +417,14 @@ static bool adcContinuousDetachBus(void *adc_unit_number) { if (err != ESP_OK) { return false; } -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; } +#else + log_e("ADC Calibration scheme is not supported!"); + return false; #endif } adc_handle[adc_unit].adc_cali_handle = NULL; @@ -536,7 +577,7 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi } //Allocate and prepare result structure for adc readings - adc_result = malloc(pins_count * sizeof(adc_continuous_data_t)); + adc_result = malloc(pins_count * sizeof(adc_continuous_result_t)); for (int k = 0; k < pins_count; k++) { adc_result[k].pin = pins[k]; adc_result[k].channel = channel[k]; @@ -552,13 +593,16 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi .bitwidth = __adcContinuousWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __adcContinuousWidth, .atten = __adcContinuousAtten, }; err = adc_cali_create_scheme_line_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); +#else + log_e("ADC Calibration scheme is not supported!"); + return false; #endif if (err != ESP_OK) { log_e("adc_cali_create_scheme_x failed!"); @@ -577,7 +621,7 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi return true; } -bool analogContinuousRead(adc_continuous_data_t **buffer, uint32_t timeout_ms) { +bool analogContinuousRead(adc_continuous_result_t **buffer, uint32_t timeout_ms) { if (adc_handle[ADC_UNIT_1].adc_continuous_handle != NULL) { uint32_t bytes_read = 0; uint32_t read_raw[used_adc_channels]; diff --git a/cores/esp32/esp32-hal-adc.h b/cores/esp32/esp32-hal-adc.h index 6ab5c920cfc..d22ac65d06f 100644 --- a/cores/esp32/esp32-hal-adc.h +++ b/cores/esp32/esp32-hal-adc.h @@ -86,7 +86,7 @@ typedef struct { uint8_t channel; /*! Date: Wed, 19 Nov 2025 20:28:14 +0200 Subject: [PATCH 27/38] IDF release/v5.5 (#12040) * IDF release/v5.5 8d036f2e From 5ab1db62ef4c1fc1e8707d058f4126c94fa5ad96 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Thu, 20 Nov 2025 07:10:21 -0300 Subject: [PATCH 28/38] fix(ci): Fix tests and workflows (#12024) * fix(ci): Fix tests and workflows * feat(tests): Add job ID fixture * fix(tests): Fix performance test result generation * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- .github/scripts/tests_run.sh | 26 ++++++++-- .github/workflows/release.yml | 2 +- .github/workflows/tests_hw_wokwi.yml | 14 +++++- .gitlab/workflows/hw_test_template.yml | 2 +- tests/conftest.py | 22 +++++++++ tests/performance/coremark/test_coremark.py | 3 +- tests/performance/fibonacci/test_fibonacci.py | 3 +- .../linpack_double/test_linpack_double.py | 3 +- .../linpack_float/test_linpack_float.py | 3 +- .../performance/psramspeed/test_psramspeed.py | 3 +- tests/performance/ramspeed/ramspeed.ino | 4 +- tests/performance/ramspeed/test_ramspeed.py | 3 +- tests/performance/superpi/test_superpi.py | 3 +- tests/pytest.ini | 3 ++ tests/validation/wifi/test_wifi.py | 27 ++++++++++- tests/validation/wifi/wifi.ino | 48 +++++++++++++++++-- 16 files changed, 147 insertions(+), 22 deletions(-) create mode 100644 tests/conftest.py diff --git a/.github/scripts/tests_run.sh b/.github/scripts/tests_run.sh index 8dfda3d5154..21590ef31df 100755 --- a/.github/scripts/tests_run.sh +++ b/.github/scripts/tests_run.sh @@ -111,15 +111,23 @@ function run_test { rm "$sketchdir"/diagram.json 2>/dev/null || true + local wifi_args="" + if [ -n "$wifi_ssid" ]; then + wifi_args="--wifi-ssid \"$wifi_ssid\"" + fi + if [ -n "$wifi_password" ]; then + wifi_args="$wifi_args --wifi-password \"$wifi_password\"" + fi + result=0 - printf "\033[95mpytest -s \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}" - bash -c "set +e; pytest -s \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$? + printf "\033[95mpytest -s \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}" "$wifi_args" + bash -c "set +e; pytest -s \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q} $wifi_args; exit \$?" || result=$? printf "\n" if [ $result -ne 0 ]; then result=0 printf "\033[95mRetrying test: %s -- Config: %s\033[0m\n" "$sketchname" "$i" - printf "\033[95mpytest -s \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}" - bash -c "set +e; pytest -s \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$? + printf "\033[95mpytest -s \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}" "$wifi_args" + bash -c "set +e; pytest -s \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q} $wifi_args; exit \$?" || result=$? printf "\n" if [ $result -ne 0 ]; then printf "\033[91mFailed test: %s -- Config: %s\033[0m\n\n" "$sketchname" "$i" @@ -137,6 +145,8 @@ platform="hardware" chunk_run=0 options=0 erase=0 +wifi_ssid="" +wifi_password="" while [ -n "$1" ]; do case $1 in @@ -188,6 +198,14 @@ while [ -n "$1" ]; do shift test_type=$1 ;; + -wifi-ssid ) + shift + wifi_ssid=$1 + ;; + -wifi-password ) + shift + wifi_password=$1 + ;; * ) break ;; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8619cc74904..f8da07c1957 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,7 +68,7 @@ jobs: mkdir -p ${{ github.workspace }}/hosted # Copy hosted binaries to proper directory without overwriting existing files - cp -n ${{ github.workspace }}/hosted-latest/*.bin ${{ github.workspace }}/hosted/ + cp --update=none ${{ github.workspace }}/hosted-latest/*.bin ${{ github.workspace }}/hosted/ # Commit the changes git config user.name "github-actions[bot]" diff --git a/.github/workflows/tests_hw_wokwi.yml b/.github/workflows/tests_hw_wokwi.yml index 6603cdf39a0..e7f7d1e5f29 100644 --- a/.github/workflows/tests_hw_wokwi.yml +++ b/.github/workflows/tests_hw_wokwi.yml @@ -361,7 +361,14 @@ jobs: download_artifacts: 'true' download_artifacts_on_failure: 'true' download_path: './gitlab-artifacts' - variables: '{"TEST_TYPES":"${{ steps.prepare-variables.outputs.test_types }}","TEST_CHIPS":"${{ steps.prepare-variables.outputs.test_chips }}","PIPELINE_ID":"${{ env.id }}","BINARIES_RUN_ID":"${{ github.event.workflow_run.id }}","GITHUB_REPOSITORY":"${{ github.repository }}"}' + variables: >- + { + "TEST_TYPES":"${{ steps.prepare-variables.outputs.test_types }}", + "TEST_CHIPS":"${{ steps.prepare-variables.outputs.test_chips }}", + "PIPELINE_ID":"${{ env.id }}", + "BINARIES_RUN_ID":"${{ github.event.workflow_run.id }}", + "GITHUB_REPOSITORY":"${{ github.repository }}" + } - name: Process Downloaded Artifacts if: ${{ always() && steps.check-tests.outputs.enabled == 'true' }} @@ -536,8 +543,11 @@ jobs: if: ${{ steps.check-tests.outputs.enabled == 'true' }} env: WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }} + WOKWI_WIFI_SSID: "Wokwi-GUEST" + # The Wokwi Wi-Fi does not have a password, so we use an empty string + WOKWI_WIFI_PASSWORD: "" run: | - bash .github/scripts/tests_run.sh -c -type ${{ matrix.type }} -t ${{ matrix.chip }} -i 0 -m 1 -W + bash .github/scripts/tests_run.sh -c -type "${{ matrix.type }}" -t "${{ matrix.chip }}" -i 0 -m 1 -W -wifi-ssid "${{ env.WOKWI_WIFI_SSID }}" -wifi-password "${{ env.WOKWI_WIFI_PASSWORD }}" - name: Upload ${{ matrix.chip }} ${{ matrix.type }} Wokwi results as cache uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 diff --git a/.gitlab/workflows/hw_test_template.yml b/.gitlab/workflows/hw_test_template.yml index c18686bd115..5196291a453 100644 --- a/.gitlab/workflows/hw_test_template.yml +++ b/.gitlab/workflows/hw_test_template.yml @@ -50,7 +50,7 @@ hw-test-template: [ -z "$d" ] && continue; sketch=$(basename "$d"); echo Running $sketch in $d; - bash .github/scripts/tests_run.sh -t $TEST_CHIP -s $sketch -e || rc=$?; + bash .github/scripts/tests_run.sh -t "$TEST_CHIP" -s "$sketch" -e -wifi-ssid "$RUNNER_WIFI_SSID" -wifi-password "$RUNNER_WIFI_PASSWORD" || rc=$?; done <<< "$TEST_LIST"; exit $rc artifacts: diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000000..449dabc4758 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,22 @@ +import pytest +import os + + +def pytest_addoption(parser): + parser.addoption("--wifi-password", action="store", default=None, help="Wi-Fi password.") + parser.addoption("--wifi-ssid", action="store", default=None, help="Wi-Fi SSID.") + + +@pytest.fixture(scope="session") +def wifi_ssid(request): + return request.config.getoption("--wifi-ssid") + + +@pytest.fixture(scope="session") +def wifi_pass(request): + return request.config.getoption("--wifi-password") + + +@pytest.fixture(scope="session") +def ci_job_id(request): + return os.environ.get("CI_JOB_ID") diff --git a/tests/performance/coremark/test_coremark.py b/tests/performance/coremark/test_coremark.py index f314ebcfdfa..b4eb35e09b5 100644 --- a/tests/performance/coremark/test_coremark.py +++ b/tests/performance/coremark/test_coremark.py @@ -45,13 +45,14 @@ def test_coremark(dut, request): results = {"coremark": {"runs": runs, "cores": cores, "avg_score": avg_score}} current_folder = os.path.dirname(request.path) + os.makedirs(os.path.join(current_folder, dut.app.target), exist_ok=True) file_index = 0 report_file = os.path.join(current_folder, dut.app.target, "result_coremark" + str(file_index) + ".json") while os.path.exists(report_file): report_file = report_file.replace(str(file_index) + ".json", str(file_index + 1) + ".json") file_index += 1 - with open(report_file, "w") as f: + with open(report_file, "w+") as f: try: f.write(json.dumps(results)) except Exception as e: diff --git a/tests/performance/fibonacci/test_fibonacci.py b/tests/performance/fibonacci/test_fibonacci.py index c7df59bb3aa..a1658a4d4fd 100644 --- a/tests/performance/fibonacci/test_fibonacci.py +++ b/tests/performance/fibonacci/test_fibonacci.py @@ -67,13 +67,14 @@ def test_fibonacci(dut, request): results = {"fibonacci": {"runs": runs, "fib_n": fib_n, "avg_time": avg_time}} current_folder = os.path.dirname(request.path) + os.makedirs(os.path.join(current_folder, dut.app.target), exist_ok=True) file_index = 0 report_file = os.path.join(current_folder, dut.app.target, "result_fibonacci" + str(file_index) + ".json") while os.path.exists(report_file): report_file = report_file.replace(str(file_index) + ".json", str(file_index + 1) + ".json") file_index += 1 - with open(report_file, "w") as f: + with open(report_file, "w+") as f: try: f.write(json.dumps(results)) except Exception as e: diff --git a/tests/performance/linpack_double/test_linpack_double.py b/tests/performance/linpack_double/test_linpack_double.py index bd6c52cac17..246281e3d0d 100644 --- a/tests/performance/linpack_double/test_linpack_double.py +++ b/tests/performance/linpack_double/test_linpack_double.py @@ -48,13 +48,14 @@ def test_linpack_double(dut, request): results = {"linpack_double": {"runs": runs, "avg_score": avg_score, "min_score": min_score, "max_score": max_score}} current_folder = os.path.dirname(request.path) + os.makedirs(os.path.join(current_folder, dut.app.target), exist_ok=True) file_index = 0 report_file = os.path.join(current_folder, dut.app.target, "result_linpack_double" + str(file_index) + ".json") while os.path.exists(report_file): report_file = report_file.replace(str(file_index) + ".json", str(file_index + 1) + ".json") file_index += 1 - with open(report_file, "w") as f: + with open(report_file, "w+") as f: try: f.write(json.dumps(results)) except Exception as e: diff --git a/tests/performance/linpack_float/test_linpack_float.py b/tests/performance/linpack_float/test_linpack_float.py index d4c333d8e70..ec89dc69162 100644 --- a/tests/performance/linpack_float/test_linpack_float.py +++ b/tests/performance/linpack_float/test_linpack_float.py @@ -48,13 +48,14 @@ def test_linpack_float(dut, request): results = {"linpack_float": {"runs": runs, "avg_score": avg_score, "min_score": min_score, "max_score": max_score}} current_folder = os.path.dirname(request.path) + os.makedirs(os.path.join(current_folder, dut.app.target), exist_ok=True) file_index = 0 report_file = os.path.join(current_folder, dut.app.target, "result_linpack_float" + str(file_index) + ".json") while os.path.exists(report_file): report_file = report_file.replace(str(file_index) + ".json", str(file_index + 1) + ".json") file_index += 1 - with open(report_file, "w") as f: + with open(report_file, "w+") as f: try: f.write(json.dumps(results)) except Exception as e: diff --git a/tests/performance/psramspeed/test_psramspeed.py b/tests/performance/psramspeed/test_psramspeed.py index 68467478eba..69a130dce9e 100644 --- a/tests/performance/psramspeed/test_psramspeed.py +++ b/tests/performance/psramspeed/test_psramspeed.py @@ -92,13 +92,14 @@ def test_psramspeed(dut, request): results = {"psramspeed": {"runs": runs, "copies": copies, "max_test_size": max_test_size, "results": avg_results}} current_folder = os.path.dirname(request.path) + os.makedirs(os.path.join(current_folder, dut.app.target), exist_ok=True) file_index = 0 report_file = os.path.join(current_folder, dut.app.target, "result_psramspeed" + str(file_index) + ".json") while os.path.exists(report_file): report_file = report_file.replace(str(file_index) + ".json", str(file_index + 1) + ".json") file_index += 1 - with open(report_file, "w") as f: + with open(report_file, "w+") as f: try: f.write(json.dumps(results)) except Exception as e: diff --git a/tests/performance/ramspeed/ramspeed.ino b/tests/performance/ramspeed/ramspeed.ino index 776f6540679..5402d2bd8bc 100644 --- a/tests/performance/ramspeed/ramspeed.ino +++ b/tests/performance/ramspeed/ramspeed.ino @@ -234,8 +234,8 @@ void setup() { delay(10); } - void *dest = malloc(MAX_TEST_SIZE); - const void *src = malloc(MAX_TEST_SIZE); + void *dest = heap_caps_malloc(MAX_TEST_SIZE, MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); + const void *src = heap_caps_malloc(MAX_TEST_SIZE, MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); if (!dest || !src) { Serial.println("Memory allocation failed"); diff --git a/tests/performance/ramspeed/test_ramspeed.py b/tests/performance/ramspeed/test_ramspeed.py index 987b6c00066..795a9a0a9ad 100644 --- a/tests/performance/ramspeed/test_ramspeed.py +++ b/tests/performance/ramspeed/test_ramspeed.py @@ -92,13 +92,14 @@ def test_ramspeed(dut, request): results = {"ramspeed": {"runs": runs, "copies": copies, "max_test_size": max_test_size, "results": avg_results}} current_folder = os.path.dirname(request.path) + os.makedirs(os.path.join(current_folder, dut.app.target), exist_ok=True) file_index = 0 report_file = os.path.join(current_folder, dut.app.target, "result_ramspeed" + str(file_index) + ".json") while os.path.exists(report_file): report_file = report_file.replace(str(file_index) + ".json", str(file_index + 1) + ".json") file_index += 1 - with open(report_file, "w") as f: + with open(report_file, "w+") as f: try: f.write(json.dumps(results)) except Exception as e: diff --git a/tests/performance/superpi/test_superpi.py b/tests/performance/superpi/test_superpi.py index 4e99bbb1c1b..0096cd5478b 100644 --- a/tests/performance/superpi/test_superpi.py +++ b/tests/performance/superpi/test_superpi.py @@ -40,13 +40,14 @@ def test_superpi(dut, request): results = {"superpi": {"runs": runs, "digits": digits, "avg_time": avg_time}} current_folder = os.path.dirname(request.path) + os.makedirs(os.path.join(current_folder, dut.app.target), exist_ok=True) file_index = 0 report_file = os.path.join(current_folder, dut.app.target, "result_superpi" + str(file_index) + ".json") while os.path.exists(report_file): report_file = report_file.replace(str(file_index) + ".json", str(file_index + 1) + ".json") file_index += 1 - with open(report_file, "w") as f: + with open(report_file, "w+") as f: try: f.write(json.dumps(results)) except Exception as e: diff --git a/tests/pytest.ini b/tests/pytest.ini index b507b437727..d7d50e5c8e3 100644 --- a/tests/pytest.ini +++ b/tests/pytest.ini @@ -1,5 +1,8 @@ [pytest] addopts = --embedded-services esp,arduino,wokwi,qemu +junit_family = xunit1 +filterwarnings = + ignore::pytest.PytestExperimentalApiWarning # log related log_cli = True diff --git a/tests/validation/wifi/test_wifi.py b/tests/validation/wifi/test_wifi.py index 5049aae7b85..0bd3444a51b 100644 --- a/tests/validation/wifi/test_wifi.py +++ b/tests/validation/wifi/test_wifi.py @@ -1,13 +1,36 @@ import logging +import pytest -def test_wifi(dut): +def test_wifi(dut, wifi_ssid, wifi_pass): LOGGER = logging.getLogger(__name__) + # Fail if no WiFi SSID is provided + if not wifi_ssid: + pytest.fail("WiFi SSID is required but not provided. Use --wifi-ssid argument.") + + # Wait for device to be ready and send WiFi credentials + LOGGER.info("Waiting for device to be ready...") + dut.expect_exact("Device ready for WiFi credentials") + + dut.expect_exact("Send SSID:") + LOGGER.info(f"Sending WiFi credentials: SSID={wifi_ssid}") + dut.write(f"{wifi_ssid}") + + dut.expect_exact("Send Password:") + LOGGER.info(f"Sending WiFi password: Password={wifi_pass}") + dut.write(f"{wifi_pass or ''}") + + # Verify credentials were received + dut.expect_exact(f"SSID: {wifi_ssid}") + dut.expect_exact(f"Password: {wifi_pass or ''}") + LOGGER.info("Starting WiFi Scan") dut.expect_exact("Scan start") dut.expect_exact("Scan done") - dut.expect_exact("Wokwi-GUEST") + + LOGGER.info(f"Looking for WiFi network: {wifi_ssid}") + dut.expect_exact(wifi_ssid) LOGGER.info("WiFi Scan done") LOGGER.info("Connecting to WiFi") diff --git a/tests/validation/wifi/wifi.ino b/tests/validation/wifi/wifi.ino index 696234505cc..768c85a04d0 100644 --- a/tests/validation/wifi/wifi.ino +++ b/tests/validation/wifi/wifi.ino @@ -38,8 +38,8 @@ #include -const char *ssid = "Wokwi-GUEST"; -const char *password = ""; +String ssid = ""; +String password = ""; // WARNING: This function is called from a separate FreeRTOS task (thread)! void WiFiEvent(WiFiEvent_t event) { @@ -87,14 +87,56 @@ void WiFiGotIP(WiFiEvent_t event, WiFiEventInfo_t info) { Serial.println(IPAddress(info.got_ip.ip_info.ip.addr)); } +void readWiFiCredentials() { + Serial.println("Waiting for WiFi credentials..."); + Serial.println("Send SSID:"); + + // Wait for SSID + while (ssid.length() == 0) { + if (Serial.available()) { + ssid = Serial.readStringUntil('\n'); + ssid.trim(); + } + delay(100); + } + + Serial.println("Send Password:"); + + // Wait for password (allow empty password) + bool password_received = false; + while (!password_received) { + if (Serial.available()) { + password = Serial.readStringUntil('\n'); + password.trim(); + password_received = true; // Accept even empty password + } + delay(100); + } + + Serial.print("SSID: "); + Serial.println(ssid); + Serial.print("Password: "); + Serial.println(password); +} + void setup() { Serial.begin(115200); + while (!Serial) { + delay(100); + } + // delete old config WiFi.disconnect(true); delay(1000); + // Wait for test to be ready + Serial.println("Device ready for WiFi credentials"); + + // Read WiFi credentials from serial + readWiFiCredentials(); + // Examples of different ways to register wifi events; // these handlers will be called from another thread. WiFi.onEvent(WiFiEvent); @@ -134,7 +176,7 @@ void setup() { // Delete the scan result to free memory for code below. WiFi.scanDelete(); - WiFi.begin(ssid, password); + WiFi.begin(ssid.c_str(), password.c_str()); Serial.println(); Serial.println(); From a683b813f8e675e1ababcdf60361bb5abffbc70b Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 20 Nov 2025 12:10:57 +0200 Subject: [PATCH 29/38] fix(wifi): Do not use persistent mode with ESP-Hosted (#12043) --- libraries/WiFi/src/WiFiGeneric.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/WiFi/src/WiFiGeneric.cpp b/libraries/WiFi/src/WiFiGeneric.cpp index 0de8430f3be..5cf4ffbbf1d 100644 --- a/libraries/WiFi/src/WiFiGeneric.cpp +++ b/libraries/WiFi/src/WiFiGeneric.cpp @@ -264,6 +264,12 @@ bool wifiLowLevelInit(bool persistent) { wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); +#if CONFIG_ESP_WIFI_REMOTE_ENABLED + // required for proper work when esp-hosted is used. + cfg.nvs_enable = false; + persistent = false; +#endif + if (!WiFiGenericClass::useStaticBuffers()) { cfg.static_tx_buf_num = 0; cfg.dynamic_tx_buf_num = 32; From 7a3c8e08ebab44b5df29c48f4d11bef05620a601 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 20 Nov 2025 12:28:25 +0200 Subject: [PATCH 30/38] IDF release/v5.5 8d036f2e (#12046) --- package/package_esp32_index.template.json | 68 +++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/package/package_esp32_index.template.json b/package/package_esp32_index.template.json index eb84ab9076e..53d226b0447 100644 --- a/package/package_esp32_index.template.json +++ b/package/package_esp32_index.template.json @@ -51,7 +51,7 @@ { "packager": "esp32", "name": "esp32-arduino-libs", - "version": "idf-release_v5.5-8d036f2e-v1" + "version": "idf-release_v5.5-8d036f2e-v2" }, { "packager": "esp32", @@ -104,63 +104,63 @@ "tools": [ { "name": "esp32-arduino-libs", - "version": "idf-release_v5.5-8d036f2e-v1", + "version": "idf-release_v5.5-8d036f2e-v2", "systems": [ { "host": "i686-mingw32", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" }, { "host": "x86_64-mingw32", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" }, { "host": "arm64-apple-darwin", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" }, { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" }, { "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", - "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", - "size": "508786676" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v2.zip", + "checksum": "SHA-256:2b46c8b3c1e8d1ecd66cdcc7227d07fbbb48c9f16dca3ec593f8e7eac77f1db5", + "size": "508841764" } ] }, From d0795a29f6df0f72f6dfbdb33a6225e15d3e6db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Thu, 20 Nov 2025 15:27:46 +0100 Subject: [PATCH 31/38] fix(boards): Correct minimal spiffs size in name (#12047) --- boards.txt | 398 ++++++++++++++++++++++++++--------------------------- 1 file changed, 199 insertions(+), 199 deletions(-) diff --git a/boards.txt b/boards.txt index fee18c92c14..cc8e18a4246 100644 --- a/boards.txt +++ b/boards.txt @@ -108,7 +108,7 @@ esp32c2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32c2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32c2.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32c2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32c2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32c2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32c2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -250,7 +250,7 @@ esp32c5.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32c5.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32c5.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32c5.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32c5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32c5.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32c5.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32c5.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -495,7 +495,7 @@ esp32p4.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32p4.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32p4.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32p4.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32p4.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32p4.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32p4.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32p4.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32p4.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -663,7 +663,7 @@ esp32h2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32h2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32h2.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32h2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32h2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32h2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32h2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32h2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32h2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -861,7 +861,7 @@ esp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32c6.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -1147,7 +1147,7 @@ esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -1324,7 +1324,7 @@ esp32c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32c3.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32c3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -1532,7 +1532,7 @@ esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -1715,7 +1715,7 @@ esp32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -1895,7 +1895,7 @@ esp32da.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32da.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32da.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32da.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32da.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32da.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32da.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32da.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32da.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -2053,7 +2053,7 @@ esp32wrover.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32wrover.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32wrover.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32wrover.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32wrover.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32wrover.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32wrover.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32wrover.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32wrover.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -2353,7 +2353,7 @@ esp32s3-octal.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s3-octal.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s3-octal.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s3-octal.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s3-octal.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s3-octal.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s3-octal.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s3-octal.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s3-octal.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -2604,7 +2604,7 @@ esp32s3usbotg.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s3usbotg.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s3usbotg.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s3usbotg.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s3usbotg.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s3usbotg.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s3usbotg.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s3usbotg.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s3usbotg.menu.PartitionScheme.custom=Custom @@ -2704,7 +2704,7 @@ esp32s3camlcd.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s3camlcd.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s3camlcd.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s3camlcd.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s3camlcd.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s3camlcd.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s3camlcd.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s3camlcd.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -2822,7 +2822,7 @@ esp32s2usb.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s2usb.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s2usb.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s2usb.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s2usb.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s2usb.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s2usb.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s2usb.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s2usb.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -2925,7 +2925,7 @@ esp32wroverkit.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32wroverkit.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32wroverkit.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32wroverkit.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32wroverkit.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32wroverkit.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32wroverkit.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32wroverkit.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32wroverkit.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -3157,7 +3157,7 @@ aventen_s3_sync.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 aventen_s3_sync.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) aventen_s3_sync.menu.PartitionScheme.huge_app.build.partitions=huge_app aventen_s3_sync.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -aventen_s3_sync.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +aventen_s3_sync.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) aventen_s3_sync.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs aventen_s3_sync.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 aventen_s3_sync.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -3283,7 +3283,7 @@ BharatPi-Node-Wifi.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 BharatPi-Node-Wifi.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) BharatPi-Node-Wifi.menu.PartitionScheme.huge_app.build.partitions=huge_app BharatPi-Node-Wifi.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -BharatPi-Node-Wifi.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +BharatPi-Node-Wifi.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) BharatPi-Node-Wifi.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs BharatPi-Node-Wifi.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 BharatPi-Node-Wifi.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -3441,7 +3441,7 @@ BharatPi-A7672S-4G.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 BharatPi-A7672S-4G.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) BharatPi-A7672S-4G.menu.PartitionScheme.huge_app.build.partitions=huge_app BharatPi-A7672S-4G.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -BharatPi-A7672S-4G.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +BharatPi-A7672S-4G.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) BharatPi-A7672S-4G.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs BharatPi-A7672S-4G.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 BharatPi-A7672S-4G.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -3599,7 +3599,7 @@ BharatPi-LoRa.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 BharatPi-LoRa.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) BharatPi-LoRa.menu.PartitionScheme.huge_app.build.partitions=huge_app BharatPi-LoRa.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -BharatPi-LoRa.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +BharatPi-LoRa.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) BharatPi-LoRa.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs BharatPi-LoRa.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 BharatPi-LoRa.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -4092,7 +4092,7 @@ um_feathers2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 um_feathers2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) um_feathers2.menu.PartitionScheme.huge_app.build.partitions=huge_app um_feathers2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -um_feathers2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +um_feathers2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) um_feathers2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs um_feathers2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -4234,7 +4234,7 @@ um_feathers2neo.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 um_feathers2neo.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) um_feathers2neo.menu.PartitionScheme.huge_app.build.partitions=huge_app um_feathers2neo.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -um_feathers2neo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +um_feathers2neo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) um_feathers2neo.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs um_feathers2neo.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -4562,7 +4562,7 @@ um_feathers3neo.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 um_feathers3neo.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) um_feathers3neo.menu.PartitionScheme.huge_app.build.partitions=huge_app um_feathers3neo.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -um_feathers3neo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +um_feathers3neo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) um_feathers3neo.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs um_feathers3neo.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -5575,7 +5575,7 @@ um_tinys2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 um_tinys2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) um_tinys2.menu.PartitionScheme.huge_app.build.partitions=huge_app um_tinys2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -um_tinys2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +um_tinys2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) um_tinys2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs um_tinys2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -5927,7 +5927,7 @@ lilygo_t_display.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 lilygo_t_display.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) lilygo_t_display.menu.PartitionScheme.huge_app.build.partitions=huge_app lilygo_t_display.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -lilygo_t_display.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +lilygo_t_display.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) lilygo_t_display.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs lilygo_t_display.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 lilygo_t_display.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) @@ -6353,7 +6353,7 @@ lilygo_t3s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 lilygo_t3s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) lilygo_t3s3.menu.PartitionScheme.huge_app.build.partitions=huge_app lilygo_t3s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -lilygo_t3s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +lilygo_t3s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) lilygo_t3s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs lilygo_t3s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -7019,7 +7019,7 @@ micros2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 micros2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) micros2.menu.PartitionScheme.huge_app.build.partitions=huge_app micros2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -micros2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +micros2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) micros2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs micros2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -7337,7 +7337,7 @@ ttgo-t1.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ttgo-t1.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ttgo-t1.menu.PartitionScheme.huge_app.build.partitions=huge_app ttgo-t1.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ttgo-t1.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ttgo-t1.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ttgo-t1.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ttgo-t1.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -7467,7 +7467,7 @@ ttgo-t7-v13-mini32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ttgo-t7-v13-mini32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ttgo-t7-v13-mini32.menu.PartitionScheme.huge_app.build.partitions=huge_app ttgo-t7-v13-mini32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ttgo-t7-v13-mini32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ttgo-t7-v13-mini32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ttgo-t7-v13-mini32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ttgo-t7-v13-mini32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -7593,7 +7593,7 @@ ttgo-t7-v14-mini32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ttgo-t7-v14-mini32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ttgo-t7-v14-mini32.menu.PartitionScheme.huge_app.build.partitions=huge_app ttgo-t7-v14-mini32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ttgo-t7-v14-mini32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ttgo-t7-v14-mini32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ttgo-t7-v14-mini32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ttgo-t7-v14-mini32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -7719,7 +7719,7 @@ ttgo-t-oi-plus.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ttgo-t-oi-plus.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ttgo-t-oi-plus.menu.PartitionScheme.huge_app.build.partitions=huge_app ttgo-t-oi-plus.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ttgo-t-oi-plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ttgo-t-oi-plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ttgo-t-oi-plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ttgo-t-oi-plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -8193,7 +8193,7 @@ sparkfun_esp32s2_thing_plus.menu.PartitionScheme.noota_3gffat.upload.maximum_siz sparkfun_esp32s2_thing_plus.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparkfun_esp32s2_thing_plus.menu.PartitionScheme.huge_app.build.partitions=huge_app sparkfun_esp32s2_thing_plus.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparkfun_esp32s2_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_esp32s2_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparkfun_esp32s2_thing_plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparkfun_esp32s2_thing_plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 sparkfun_esp32s2_thing_plus.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -8418,7 +8418,7 @@ sparkfun_esp32s3_thing_plus.menu.PartitionScheme.noota_3gffat.upload.maximum_siz sparkfun_esp32s3_thing_plus.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparkfun_esp32s3_thing_plus.menu.PartitionScheme.huge_app.build.partitions=huge_app sparkfun_esp32s3_thing_plus.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparkfun_esp32s3_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_esp32s3_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparkfun_esp32s3_thing_plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparkfun_esp32s3_thing_plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 sparkfun_esp32s3_thing_plus.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -8567,7 +8567,7 @@ sparkfun_esp32c6_thing_plus.menu.PartitionScheme.noota_3gffat.upload.maximum_siz sparkfun_esp32c6_thing_plus.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparkfun_esp32c6_thing_plus.menu.PartitionScheme.huge_app.build.partitions=huge_app sparkfun_esp32c6_thing_plus.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparkfun_esp32c6_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_esp32c6_thing_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparkfun_esp32c6_thing_plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparkfun_esp32c6_thing_plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 sparkfun_esp32c6_thing_plus.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -8735,7 +8735,7 @@ esp32micromod.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32micromod.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32micromod.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32micromod.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32micromod.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32micromod.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32micromod.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32micromod.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32micromod.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -8977,7 +8977,7 @@ sparkfun_esp32_iot_redboard.menu.PartitionScheme.noota_3gffat.upload.maximum_siz sparkfun_esp32_iot_redboard.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparkfun_esp32_iot_redboard.menu.PartitionScheme.huge_app.build.partitions=huge_app sparkfun_esp32_iot_redboard.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparkfun_esp32_iot_redboard.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_esp32_iot_redboard.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparkfun_esp32_iot_redboard.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparkfun_esp32_iot_redboard.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 sparkfun_esp32_iot_redboard.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -9157,7 +9157,7 @@ sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.noota_3gffat.upload.maximum_s sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.huge_app.build.partitions=huge_app sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 sparkfun_esp32c6_qwiic_pocket.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -9340,7 +9340,7 @@ sparkfun_pro_micro_esp32c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size sparkfun_pro_micro_esp32c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparkfun_pro_micro_esp32c3.menu.PartitionScheme.huge_app.build.partitions=huge_app sparkfun_pro_micro_esp32c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparkfun_pro_micro_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparkfun_pro_micro_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparkfun_pro_micro_esp32c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparkfun_pro_micro_esp32c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -9482,7 +9482,7 @@ nina_w10.menu.PartitionScheme.defaultffat.build.partitions=default_ffat nina_w10.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) nina_w10.menu.PartitionScheme.default_8MB.build.partitions=default_8MB nina_w10.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 -nina_w10.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +nina_w10.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) nina_w10.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs nina_w10.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 nina_w10.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) @@ -9702,7 +9702,7 @@ nora_w10.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 nora_w10.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) nora_w10.menu.PartitionScheme.huge_app.build.partitions=huge_app nora_w10.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -nora_w10.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +nora_w10.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) nora_w10.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs nora_w10.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 #nora_w10.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) @@ -10850,7 +10850,7 @@ lolin_s3_mini.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 lolin_s3_mini.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) lolin_s3_mini.menu.PartitionScheme.huge_app.build.partitions=huge_app lolin_s3_mini.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -lolin_s3_mini.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +lolin_s3_mini.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) lolin_s3_mini.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs lolin_s3_mini.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 lolin_s3_mini.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -11021,7 +11021,7 @@ lolin_s3_mini_pro.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 lolin_s3_mini_pro.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) lolin_s3_mini_pro.menu.PartitionScheme.huge_app.build.partitions=huge_app lolin_s3_mini_pro.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -lolin_s3_mini_pro.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +lolin_s3_mini_pro.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) lolin_s3_mini_pro.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs lolin_s3_mini_pro.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 lolin_s3_mini_pro.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -11758,7 +11758,7 @@ WeMosBat.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 WeMosBat.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) WeMosBat.menu.PartitionScheme.huge_app.build.partitions=huge_app WeMosBat.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -WeMosBat.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +WeMosBat.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) WeMosBat.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs WeMosBat.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 WeMosBat.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -12244,7 +12244,7 @@ dfrobot_beetle_esp32c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=104 dfrobot_beetle_esp32c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dfrobot_beetle_esp32c3.menu.PartitionScheme.huge_app.build.partitions=huge_app dfrobot_beetle_esp32c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dfrobot_beetle_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dfrobot_beetle_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dfrobot_beetle_esp32c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dfrobot_beetle_esp32c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 dfrobot_beetle_esp32c3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -12390,7 +12390,7 @@ dfrobot_beetle_esp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=104 dfrobot_beetle_esp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dfrobot_beetle_esp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app dfrobot_beetle_esp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dfrobot_beetle_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dfrobot_beetle_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dfrobot_beetle_esp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dfrobot_beetle_esp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 dfrobot_beetle_esp32c6.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -12541,7 +12541,7 @@ dfrobot_firebeetle2_esp32e.menu.PartitionScheme.noota_3gffat.upload.maximum_size dfrobot_firebeetle2_esp32e.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dfrobot_firebeetle2_esp32e.menu.PartitionScheme.huge_app.build.partitions=huge_app dfrobot_firebeetle2_esp32e.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dfrobot_firebeetle2_esp32e.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dfrobot_firebeetle2_esp32e.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dfrobot_firebeetle2_esp32e.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dfrobot_firebeetle2_esp32e.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 dfrobot_firebeetle2_esp32e.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) @@ -12794,7 +12794,7 @@ dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_siz dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 dfrobot_firebeetle2_esp32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -12936,7 +12936,7 @@ dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_siz dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 dfrobot_firebeetle2_esp32c6.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -13161,7 +13161,7 @@ dfrobot_romeo_esp32s3.menu.PartitionScheme.minimal.build.partitions=minimal dfrobot_romeo_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dfrobot_romeo_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app dfrobot_romeo_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dfrobot_romeo_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dfrobot_romeo_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dfrobot_romeo_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dfrobot_romeo_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 dfrobot_romeo_esp32s3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -13348,7 +13348,7 @@ dfrobot_lorawan_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=10 dfrobot_lorawan_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dfrobot_lorawan_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app dfrobot_lorawan_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dfrobot_lorawan_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dfrobot_lorawan_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dfrobot_lorawan_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dfrobot_lorawan_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 dfrobot_lorawan_esp32s3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -13753,7 +13753,7 @@ adafruit_metro_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=104 adafruit_metro_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_metro_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_metro_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_metro_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -14139,7 +14139,7 @@ adafruit_magtag29_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size= adafruit_magtag29_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_magtag29_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_magtag29_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_magtag29_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -14322,7 +14322,7 @@ adafruit_funhouse_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size= adafruit_funhouse_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_funhouse_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_funhouse_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_funhouse_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -14463,7 +14463,7 @@ featheresp32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 featheresp32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) featheresp32.menu.PartitionScheme.huge_app.build.partitions=huge_app featheresp32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -featheresp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +featheresp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) featheresp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs featheresp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -14760,7 +14760,7 @@ adafruit_feather_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1 adafruit_feather_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_feather_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_feather_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -14943,7 +14943,7 @@ adafruit_feather_esp32s2_tft.menu.PartitionScheme.noota_3gffat.upload.maximum_si adafruit_feather_esp32s2_tft.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_feather_esp32s2_tft.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_feather_esp32s2_tft.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s2_tft.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -15126,7 +15126,7 @@ adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.noota_3gffat.upload.max adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s2_reversetft.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -15335,7 +15335,7 @@ adafruit_feather_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1 adafruit_feather_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_feather_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_feather_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_feather_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_feather_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_feather_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -15740,7 +15740,7 @@ adafruit_feather_esp32s3_tft.menu.PartitionScheme.noota_3gffat.upload.maximum_si adafruit_feather_esp32s3_tft.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_feather_esp32s3_tft.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_feather_esp32s3_tft.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_feather_esp32s3_tft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_feather_esp32s3_tft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_feather_esp32s3_tft.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s3_tft.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -15958,7 +15958,7 @@ adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.noota_3gffat.upload.max adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32s3_reversetft.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -16118,7 +16118,7 @@ adafruit_feather_esp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1 adafruit_feather_esp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_feather_esp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_feather_esp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_feather_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_feather_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_feather_esp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_feather_esp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 adafruit_feather_esp32c6.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -16391,7 +16391,7 @@ adafruit_qtpy_esp32c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048 adafruit_qtpy_esp32c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_qtpy_esp32c3.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_qtpy_esp32c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_qtpy_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_qtpy_esp32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_qtpy_esp32c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_qtpy_esp32c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -16572,7 +16572,7 @@ adafruit_qtpy_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048 adafruit_qtpy_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_qtpy_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_qtpy_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_qtpy_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -16968,7 +16968,7 @@ adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.noota_3gffat.upload.maximum_size adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_qtpy_esp32s3_n4r2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -17501,7 +17501,7 @@ adafruit_camera_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=10 adafruit_camera_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) adafruit_camera_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app adafruit_camera_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -adafruit_camera_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +adafruit_camera_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) adafruit_camera_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs adafruit_camera_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -17854,7 +17854,7 @@ sparklemotion.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 sparklemotion.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparklemotion.menu.PartitionScheme.huge_app.build.partitions=huge_app sparklemotion.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparklemotion.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparklemotion.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparklemotion.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparklemotion.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -17988,7 +17988,7 @@ sparklemotionmini.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 sparklemotionmini.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparklemotionmini.menu.PartitionScheme.huge_app.build.partitions=huge_app sparklemotionmini.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparklemotionmini.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparklemotionmini.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparklemotionmini.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparklemotionmini.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -18122,7 +18122,7 @@ sparklemotionstick.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 sparklemotionstick.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sparklemotionstick.menu.PartitionScheme.huge_app.build.partitions=huge_app sparklemotionstick.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sparklemotionstick.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sparklemotionstick.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sparklemotionstick.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sparklemotionstick.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -18550,7 +18550,7 @@ nologo_esp32s3_pico.menu.PartitionScheme.noota_3gffat.upload.maximum_size=104857 nologo_esp32s3_pico.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) nologo_esp32s3_pico.menu.PartitionScheme.huge_app.build.partitions=huge_app nologo_esp32s3_pico.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -nologo_esp32s3_pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +nologo_esp32s3_pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) nologo_esp32s3_pico.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs nologo_esp32s3_pico.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 nologo_esp32s3_pico.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -19265,7 +19265,7 @@ esp32-poe.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32-poe.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32-poe.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32-poe.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32-poe.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32-poe.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32-poe.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32-poe.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32-poe.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -19408,7 +19408,7 @@ esp32-poe-iso.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32-poe-iso.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32-poe-iso.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32-poe-iso.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32-poe-iso.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32-poe-iso.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32-poe-iso.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32-poe-iso.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32-poe-iso.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -19684,7 +19684,7 @@ esp32s2-devkitlipo.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s2-devkitlipo.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s2-devkitlipo.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s2-devkitlipo.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s2-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s2-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s2-devkitlipo.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s2-devkitlipo.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s2-devkitlipo.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -19879,7 +19879,7 @@ esp32s2-devkitlipo-usb.menu.PartitionScheme.noota_3gffat.upload.maximum_size=104 esp32s2-devkitlipo-usb.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s2-devkitlipo-usb.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s2-devkitlipo-usb.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s2-devkitlipo-usb.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s2-devkitlipo-usb.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s2-devkitlipo-usb.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s2-devkitlipo-usb.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s2-devkitlipo-usb.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -20134,7 +20134,7 @@ esp32s3-devkitlipo.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32s3-devkitlipo.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32s3-devkitlipo.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32s3-devkitlipo.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32s3-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s3-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32s3-devkitlipo.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32s3-devkitlipo.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32s3-devkitlipo.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -20292,7 +20292,7 @@ esp32c3-devkitlipo.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32c3-devkitlipo.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32c3-devkitlipo.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32c3-devkitlipo.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32c3-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c3-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32c3-devkitlipo.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32c3-devkitlipo.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32c3-devkitlipo.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -20465,7 +20465,7 @@ esp32c6-evb.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32c6-evb.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32c6-evb.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32c6-evb.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32c6-evb.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c6-evb.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32c6-evb.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32c6-evb.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32c6-evb.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -20648,7 +20648,7 @@ esp32h2-devkitlipo.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32h2-devkitlipo.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32h2-devkitlipo.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32h2-devkitlipo.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32h2-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32h2-devkitlipo.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32h2-devkitlipo.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32h2-devkitlipo.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32h2-devkitlipo.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -20823,7 +20823,7 @@ esp32-sbc-fabgl.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32-sbc-fabgl.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32-sbc-fabgl.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32-sbc-fabgl.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32-sbc-fabgl.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32-sbc-fabgl.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32-sbc-fabgl.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32-sbc-fabgl.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32-sbc-fabgl.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -21069,7 +21069,7 @@ m5stack_core.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_core.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_core.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_core.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_core.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_core.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_core.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_core.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_core.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -21242,7 +21242,7 @@ m5stack_fire.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_fire.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_fire.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_fire.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_fire.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_fire.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_fire.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_fire.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_fire.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -21416,7 +21416,7 @@ m5stack_core2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_core2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_core2.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_core2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_core2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_core2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_core2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_core2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_core2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -21590,7 +21590,7 @@ m5stack_tough.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_tough.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_tough.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_tough.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_tough.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_tough.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_tough.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_tough.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_tough.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -21757,7 +21757,7 @@ m5stack_station.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_station.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_station.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_station.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_station.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_station.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_station.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_station.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_station.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -21920,7 +21920,7 @@ m5stack_stickc.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 m5stack_stickc.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) m5stack_stickc.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat m5stack_stickc.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 -m5stack_stickc.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stickc.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_stickc.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_stickc.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_stickc.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -22069,7 +22069,7 @@ m5stack_stickc_plus.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 m5stack_stickc_plus.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) m5stack_stickc_plus.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat m5stack_stickc_plus.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 -m5stack_stickc_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stickc_plus.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_stickc_plus.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_stickc_plus.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_stickc_plus.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -22227,7 +22227,7 @@ m5stack_stickc_plus2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 m5stack_stickc_plus2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) m5stack_stickc_plus2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat m5stack_stickc_plus2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 -m5stack_stickc_plus2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stickc_plus2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_stickc_plus2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_stickc_plus2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_stickc_plus2.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -22378,7 +22378,7 @@ m5stack_atom.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 m5stack_atom.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) m5stack_atom.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat m5stack_atom.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 -m5stack_atom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_atom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_atom.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_atom.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_atom.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -22622,7 +22622,7 @@ m5stack_atoms3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_atoms3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_atoms3.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_atoms3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_atoms3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_atoms3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_atoms3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_atoms3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_atoms3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -22842,7 +22842,7 @@ m5stack_cores3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_cores3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_cores3.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_cores3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_cores3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_cores3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_cores3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_cores3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_cores3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -23037,7 +23037,7 @@ m5stack_tab5.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_tab5.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_tab5.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_tab5.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_tab5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_tab5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_tab5.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_tab5.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_tab5.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -23171,7 +23171,7 @@ m5stack_timer_cam.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_timer_cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_timer_cam.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_timer_cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_timer_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_timer_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_timer_cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_timer_cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -23319,7 +23319,7 @@ m5stack_unit_cam.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_unit_cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_unit_cam.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_unit_cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_unit_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_unit_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_unit_cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_unit_cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -23559,7 +23559,7 @@ m5stack_unit_cams3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_unit_cams3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_unit_cams3.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_unit_cams3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_unit_cams3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_unit_cams3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_unit_cams3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_unit_cams3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_unit_cams3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -23700,7 +23700,7 @@ m5stack_poe_cam.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_poe_cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_poe_cam.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_poe_cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_poe_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_poe_cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_poe_cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_poe_cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -23850,7 +23850,7 @@ m5stack_paper.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_paper.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_paper.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_paper.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_paper.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_paper.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_paper.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_paper.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_paper.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -24013,7 +24013,7 @@ m5stack_coreink.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_coreink.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_coreink.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_coreink.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_coreink.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_coreink.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_coreink.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_coreink.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_coreink.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -24161,7 +24161,7 @@ m5stack_stamp_pico.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_stamp_pico.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_stamp_pico.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_stamp_pico.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_stamp_pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stamp_pico.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_stamp_pico.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_stamp_pico.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_stamp_pico.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -24327,7 +24327,7 @@ m5stack_stamp_c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_stamp_c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_stamp_c3.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_stamp_c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_stamp_c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stamp_c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_stamp_c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_stamp_c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -24556,7 +24556,7 @@ m5stack_stamp_s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_stamp_s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_stamp_s3.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_stamp_s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_stamp_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_stamp_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_stamp_s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_stamp_s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_stamp_s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -24793,7 +24793,7 @@ m5stack_capsule.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_capsule.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_capsule.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_capsule.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_capsule.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_capsule.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_capsule.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_capsule.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_capsule.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -25033,7 +25033,7 @@ m5stack_cardputer.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_cardputer.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_cardputer.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_cardputer.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_cardputer.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_cardputer.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_cardputer.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_cardputer.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_cardputer.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -25270,7 +25270,7 @@ m5stack_dial.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_dial.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_dial.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_dial.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_dial.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_dial.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_dial.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_dial.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_dial.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -25507,7 +25507,7 @@ m5stack_dinmeter.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 m5stack_dinmeter.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) m5stack_dinmeter.menu.PartitionScheme.huge_app.build.partitions=huge_app m5stack_dinmeter.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -m5stack_dinmeter.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +m5stack_dinmeter.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) m5stack_dinmeter.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs m5stack_dinmeter.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 m5stack_dinmeter.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -28707,7 +28707,7 @@ alksesp32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 alksesp32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) alksesp32.menu.PartitionScheme.huge_app.build.partitions=huge_app alksesp32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -alksesp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +alksesp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) alksesp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs alksesp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 alksesp32.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -28911,7 +28911,7 @@ wt32-eth01.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 wt32-eth01.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) wt32-eth01.menu.PartitionScheme.huge_app.build.partitions=huge_app wt32-eth01.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -wt32-eth01.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +wt32-eth01.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) wt32-eth01.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs wt32-eth01.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -29332,7 +29332,7 @@ bpi_leaf_s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 bpi_leaf_s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) bpi_leaf_s3.menu.PartitionScheme.huge_app.build.partitions=huge_app bpi_leaf_s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -bpi_leaf_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +bpi_leaf_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) bpi_leaf_s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs bpi_leaf_s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 bpi_leaf_s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -30196,7 +30196,7 @@ fri3d_2024_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 fri3d_2024_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) fri3d_2024_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app fri3d_2024_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -fri3d_2024_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +fri3d_2024_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) fri3d_2024_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs fri3d_2024_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 fri3d_2024_esp32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -30421,7 +30421,7 @@ esp32cam.menu.FlashMode.dio.build.boot=dio esp32cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32cam.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32cam.menu.PartitionScheme.default=Regular 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) @@ -30909,7 +30909,7 @@ vintlabs-devkit-v1.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 vintlabs-devkit-v1.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) vintlabs-devkit-v1.menu.PartitionScheme.huge_app.build.partitions=huge_app vintlabs-devkit-v1.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -vintlabs-devkit-v1.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +vintlabs-devkit-v1.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) vintlabs-devkit-v1.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs vintlabs-devkit-v1.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 vintlabs-devkit-v1.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -31084,7 +31084,7 @@ mgbot-iotik32a.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 mgbot-iotik32a.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) mgbot-iotik32a.menu.PartitionScheme.huge_app.build.partitions=huge_app mgbot-iotik32a.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -mgbot-iotik32a.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +mgbot-iotik32a.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) mgbot-iotik32a.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs mgbot-iotik32a.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 mgbot-iotik32a.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -31231,7 +31231,7 @@ mgbot-iotik32b.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 mgbot-iotik32b.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) mgbot-iotik32b.menu.PartitionScheme.huge_app.build.partitions=huge_app mgbot-iotik32b.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -mgbot-iotik32b.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +mgbot-iotik32b.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) mgbot-iotik32b.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs mgbot-iotik32b.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 mgbot-iotik32b.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -31686,7 +31686,7 @@ mPython.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 mPython.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) mPython.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat mPython.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 -mPython.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +mPython.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) mPython.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs mPython.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -31963,7 +31963,7 @@ wifiduino32c3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 wifiduino32c3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) wifiduino32c3.menu.PartitionScheme.huge_app.build.partitions=huge_app wifiduino32c3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -wifiduino32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +wifiduino32c3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) wifiduino32c3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs wifiduino32c3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 wifiduino32c3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -32195,7 +32195,7 @@ wifiduino32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 wifiduino32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) wifiduino32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app wifiduino32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -wifiduino32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +wifiduino32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) wifiduino32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs wifiduino32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 wifiduino32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -32666,7 +32666,7 @@ uPesy_wrover.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 uPesy_wrover.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) uPesy_wrover.menu.PartitionScheme.huge_app.build.partitions=huge_app uPesy_wrover.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -uPesy_wrover.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +uPesy_wrover.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) uPesy_wrover.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs uPesy_wrover.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -32783,7 +32783,7 @@ uPesy_wroom.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 uPesy_wroom.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) uPesy_wroom.menu.PartitionScheme.huge_app.build.partitions=huge_app uPesy_wroom.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -uPesy_wroom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +uPesy_wroom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) uPesy_wroom.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs uPesy_wroom.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -32893,7 +32893,7 @@ uPesy_edu_esp32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 uPesy_edu_esp32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) uPesy_edu_esp32.menu.PartitionScheme.huge_app.build.partitions=huge_app uPesy_edu_esp32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -uPesy_edu_esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +uPesy_edu_esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) uPesy_edu_esp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs uPesy_edu_esp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -33405,7 +33405,7 @@ kb32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 kb32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) kb32.menu.PartitionScheme.huge_app.build.partitions=huge_app kb32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -kb32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +kb32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) kb32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs kb32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 kb32.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -33583,7 +33583,7 @@ deneyapkart.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 deneyapkart.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) deneyapkart.menu.PartitionScheme.huge_app.build.partitions=huge_app deneyapkart.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -deneyapkart.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +deneyapkart.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) deneyapkart.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs deneyapkart.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 deneyapkart.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -33837,7 +33837,7 @@ deneyapkartv2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 deneyapkartv2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) deneyapkartv2.menu.PartitionScheme.huge_app.build.partitions=huge_app deneyapkartv2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -deneyapkartv2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +deneyapkartv2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) deneyapkartv2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs deneyapkartv2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 deneyapkartv2.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -33984,7 +33984,7 @@ deneyapkart1A.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 deneyapkart1A.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) deneyapkart1A.menu.PartitionScheme.huge_app.build.partitions=huge_app deneyapkart1A.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -deneyapkart1A.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +deneyapkart1A.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) deneyapkart1A.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs deneyapkart1A.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 deneyapkart1A.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -34247,7 +34247,7 @@ deneyapkart1Av2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 deneyapkart1Av2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) deneyapkart1Av2.menu.PartitionScheme.huge_app.build.partitions=huge_app deneyapkart1Av2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -deneyapkart1Av2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +deneyapkart1Av2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) deneyapkart1Av2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs deneyapkart1Av2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 deneyapkart1Av2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -34416,7 +34416,7 @@ deneyapmini.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 deneyapmini.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) deneyapmini.menu.PartitionScheme.huge_app.build.partitions=huge_app deneyapmini.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -deneyapmini.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +deneyapmini.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) deneyapmini.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs deneyapmini.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 deneyapmini.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -34606,7 +34606,7 @@ deneyapminiv2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 deneyapminiv2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) deneyapminiv2.menu.PartitionScheme.huge_app.build.partitions=huge_app deneyapminiv2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -deneyapminiv2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +deneyapminiv2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) deneyapminiv2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs deneyapminiv2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 deneyapminiv2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -34775,7 +34775,7 @@ deneyapkartg.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 deneyapkartg.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) deneyapkartg.menu.PartitionScheme.huge_app.build.partitions=huge_app deneyapkartg.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -deneyapkartg.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +deneyapkartg.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) deneyapkartg.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs deneyapkartg.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 deneyapkartg.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -35087,7 +35087,7 @@ atmegazero_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 atmegazero_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) atmegazero_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app atmegazero_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -atmegazero_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +atmegazero_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) atmegazero_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs atmegazero_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 atmegazero_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -35243,7 +35243,7 @@ franzininho_wifi_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1 franzininho_wifi_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) franzininho_wifi_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app franzininho_wifi_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -franzininho_wifi_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +franzininho_wifi_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) franzininho_wifi_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs franzininho_wifi_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 franzininho_wifi_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -35350,7 +35350,7 @@ franzininho_wifi_msc_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_si franzininho_wifi_msc_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) franzininho_wifi_msc_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app franzininho_wifi_msc_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -franzininho_wifi_msc_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +franzininho_wifi_msc_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) franzininho_wifi_msc_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs franzininho_wifi_msc_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 franzininho_wifi_msc_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -35523,7 +35523,7 @@ tamc_termod_s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 tamc_termod_s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) tamc_termod_s3.menu.PartitionScheme.huge_app.build.partitions=huge_app tamc_termod_s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -tamc_termod_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +tamc_termod_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) tamc_termod_s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs tamc_termod_s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 tamc_termod_s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) @@ -35651,7 +35651,7 @@ dpu_esp32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 dpu_esp32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) dpu_esp32.menu.PartitionScheme.huge_app.build.partitions=huge_app dpu_esp32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -dpu_esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +dpu_esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) dpu_esp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs dpu_esp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -35870,7 +35870,7 @@ lionbit.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 lionbit.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) lionbit.menu.PartitionScheme.huge_app.build.partitions=huge_app lionbit.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -lionbit.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +lionbit.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) lionbit.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs lionbit.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 lionbit.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -36006,7 +36006,7 @@ watchy.menu.Revision.v20.build.board=WATCHY_V20 watchy.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) watchy.menu.PartitionScheme.huge_app.build.partitions=huge_app watchy.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -watchy.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +watchy.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) watchy.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs watchy.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -36219,7 +36219,7 @@ XIAO_ESP32C3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 XIAO_ESP32C3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) XIAO_ESP32C3.menu.PartitionScheme.huge_app.build.partitions=huge_app XIAO_ESP32C3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -XIAO_ESP32C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +XIAO_ESP32C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) XIAO_ESP32C3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs XIAO_ESP32C3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 XIAO_ESP32C3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -36392,7 +36392,7 @@ XIAO_ESP32C5.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 XIAO_ESP32C5.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) XIAO_ESP32C5.menu.PartitionScheme.huge_app.build.partitions=huge_app XIAO_ESP32C5.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -XIAO_ESP32C5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +XIAO_ESP32C5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) XIAO_ESP32C5.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs XIAO_ESP32C5.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 XIAO_ESP32C5.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -37073,7 +37073,7 @@ connaxio_espoir.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 connaxio_espoir.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) connaxio_espoir.menu.PartitionScheme.huge_app.build.partitions=huge_app connaxio_espoir.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -connaxio_espoir.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +connaxio_espoir.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) connaxio_espoir.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs connaxio_espoir.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 connaxio_espoir.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -37306,7 +37306,7 @@ department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.noota_3gffat.upload. department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs department_of_alchemy_minimain_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -37912,7 +37912,7 @@ Bee_S3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 Bee_S3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) Bee_S3.menu.PartitionScheme.huge_app.build.partitions=huge_app Bee_S3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -Bee_S3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +Bee_S3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) Bee_S3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs Bee_S3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 Bee_S3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -38154,7 +38154,7 @@ unphone8.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 unphone8.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) unphone8.menu.PartitionScheme.huge_app.build.partitions=huge_app unphone8.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -unphone8.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +unphone8.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) unphone8.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs unphone8.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 unphone8.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -38310,7 +38310,7 @@ unphone9.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 unphone9.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) unphone9.menu.PartitionScheme.huge_app.build.partitions=huge_app unphone9.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -unphone9.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +unphone9.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) unphone9.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs unphone9.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 unphone9.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -38783,7 +38783,7 @@ esp32c3m1IKit.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 esp32c3m1IKit.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) esp32c3m1IKit.menu.PartitionScheme.huge_app.build.partitions=huge_app esp32c3m1IKit.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -esp32c3m1IKit.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c3m1IKit.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) esp32c3m1IKit.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs esp32c3m1IKit.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32c3m1IKit.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -38893,7 +38893,7 @@ roboheart_hercules.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 roboheart_hercules.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) roboheart_hercules.menu.PartitionScheme.huge_app.build.partitions=huge_app roboheart_hercules.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -roboheart_hercules.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +roboheart_hercules.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) roboheart_hercules.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs roboheart_hercules.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 roboheart_hercules.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) @@ -39033,7 +39033,7 @@ VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1 VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.huge_app.build.partitions=huge_app VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 VALTRACK_V4_VTS_ESP32_C3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -39184,7 +39184,7 @@ VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1 VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.huge_app.build.partitions=huge_app VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 VALTRACK_V4_MFW_ESP32_C3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -39415,7 +39415,7 @@ Edgebox-ESP-100.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 Edgebox-ESP-100.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) Edgebox-ESP-100.menu.PartitionScheme.huge_app.build.partitions=huge_app Edgebox-ESP-100.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -Edgebox-ESP-100.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +Edgebox-ESP-100.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) Edgebox-ESP-100.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs Edgebox-ESP-100.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 Edgebox-ESP-100.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -39785,7 +39785,7 @@ nebulas3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 nebulas3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) nebulas3.menu.PartitionScheme.huge_app.build.partitions=huge_app nebulas3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -nebulas3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +nebulas3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) nebulas3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs nebulas3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 nebulas3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -40011,7 +40011,7 @@ lionbits3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 lionbits3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) lionbits3.menu.PartitionScheme.huge_app.build.partitions=huge_app lionbits3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -lionbits3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +lionbits3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) lionbits3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs lionbits3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 lionbits3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -40423,7 +40423,7 @@ namino_rosso.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 namino_rosso.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) namino_rosso.menu.PartitionScheme.huge_app.build.partitions=huge_app namino_rosso.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -namino_rosso.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +namino_rosso.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) namino_rosso.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs namino_rosso.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -40612,7 +40612,7 @@ namino_arancio.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 namino_arancio.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) namino_arancio.menu.PartitionScheme.huge_app.build.partitions=huge_app namino_arancio.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -namino_arancio.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +namino_arancio.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) namino_arancio.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs namino_arancio.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -40801,7 +40801,7 @@ namino_bianco.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 namino_bianco.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) namino_bianco.menu.PartitionScheme.huge_app.build.partitions=huge_app namino_bianco.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -namino_bianco.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +namino_bianco.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) namino_bianco.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs namino_bianco.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -40933,7 +40933,7 @@ ioxesp32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ioxesp32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ioxesp32.menu.PartitionScheme.huge_app.build.partitions=huge_app ioxesp32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ioxesp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ioxesp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ioxesp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ioxesp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 ioxesp32.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -41039,7 +41039,7 @@ ioxesp32ps.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ioxesp32ps.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ioxesp32ps.menu.PartitionScheme.huge_app.build.partitions=huge_app ioxesp32ps.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ioxesp32ps.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ioxesp32ps.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ioxesp32ps.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ioxesp32ps.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 ioxesp32ps.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -41168,7 +41168,7 @@ ioxesp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ioxesp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ioxesp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app ioxesp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ioxesp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ioxesp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ioxesp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ioxesp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 ioxesp32c6.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -41379,7 +41379,7 @@ atd147_s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 atd147_s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) atd147_s3.menu.PartitionScheme.huge_app.build.partitions=huge_app atd147_s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -atd147_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +atd147_s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) atd147_s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs atd147_s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 atd147_s3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -41562,7 +41562,7 @@ atd35s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 atd35s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) atd35s3.menu.PartitionScheme.huge_app.build.partitions=huge_app atd35s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -atd35s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +atd35s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) atd35s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs atd35s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 atd35s3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -41893,7 +41893,7 @@ sensebox_mcu_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=10485 sensebox_mcu_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) sensebox_mcu_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app sensebox_mcu_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -sensebox_mcu_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +sensebox_mcu_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) sensebox_mcu_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs sensebox_mcu_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -42549,7 +42549,7 @@ epulse_feather_c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 epulse_feather_c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) epulse_feather_c6.menu.PartitionScheme.huge_app.build.partitions=huge_app epulse_feather_c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -epulse_feather_c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +epulse_feather_c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) epulse_feather_c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs epulse_feather_c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 epulse_feather_c6.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -42811,7 +42811,7 @@ Geekble_Nano_ESP32S3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=10485 Geekble_Nano_ESP32S3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) Geekble_Nano_ESP32S3.menu.PartitionScheme.huge_app.build.partitions=huge_app Geekble_Nano_ESP32S3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -Geekble_Nano_ESP32S3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +Geekble_Nano_ESP32S3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) Geekble_Nano_ESP32S3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs Geekble_Nano_ESP32S3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 Geekble_Nano_ESP32S3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -42980,7 +42980,7 @@ waveshare_esp32_s3_zero.menu.PartitionScheme.noota_3gffat.upload.maximum_size=10 waveshare_esp32_s3_zero.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_zero.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_zero.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_zero.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_zero.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_zero.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_zero.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_zero.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -43173,7 +43173,7 @@ ws_esp32_s3_matrix.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 ws_esp32_s3_matrix.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) ws_esp32_s3_matrix.menu.PartitionScheme.huge_app.build.partitions=huge_app ws_esp32_s3_matrix.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -ws_esp32_s3_matrix.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +ws_esp32_s3_matrix.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) ws_esp32_s3_matrix.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ws_esp32_s3_matrix.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 ws_esp32_s3_matrix.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -43366,7 +43366,7 @@ waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.noota_3gffat.upload.maximu waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_169.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -43562,7 +43562,7 @@ waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.noota_3gffat.upload.maxi waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_amoled_18.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -43758,7 +43758,7 @@ waveshare_esp32_s3_lcd_169.menu.PartitionScheme.noota_3gffat.upload.maximum_size waveshare_esp32_s3_lcd_169.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_lcd_169.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_lcd_169.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_lcd_169.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_lcd_169.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_lcd_169.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_lcd_169.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_lcd_169.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -43903,7 +43903,7 @@ waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.noota_3gffat.upload.maximum waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32s3_touch_lcd_128.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) @@ -44260,7 +44260,7 @@ aslcanx2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 aslcanx2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) aslcanx2.menu.PartitionScheme.huge_app.build.partitions=huge_app aslcanx2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -aslcanx2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +aslcanx2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) aslcanx2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs aslcanx2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 aslcanx2.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -44569,7 +44569,7 @@ elecrow_crowpanel_7.menu.PartitionScheme.noota_3gffat.upload.maximum_size=104857 elecrow_crowpanel_7.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) elecrow_crowpanel_7.menu.PartitionScheme.huge_app.build.partitions=huge_app elecrow_crowpanel_7.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -elecrow_crowpanel_7.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +elecrow_crowpanel_7.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) elecrow_crowpanel_7.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs elecrow_crowpanel_7.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 @@ -45044,7 +45044,7 @@ codecell.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 codecell.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) codecell.menu.PartitionScheme.huge_app.build.partitions=huge_app codecell.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -codecell.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +codecell.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) codecell.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs codecell.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 codecell.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -45191,7 +45191,7 @@ jczn_2432s028r.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 jczn_2432s028r.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) jczn_2432s028r.menu.PartitionScheme.huge_app.build.partitions=huge_app jczn_2432s028r.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -jczn_2432s028r.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +jczn_2432s028r.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) jczn_2432s028r.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs jczn_2432s028r.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 jczn_2432s028r.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -45419,7 +45419,7 @@ waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.noota_3gffat.upload.max waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_amoled_241.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -45620,7 +45620,7 @@ waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.noota_3gffat.upload.maximum waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_43.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -45816,7 +45816,7 @@ waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.noota_3gffat.upload.maximu waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_43B.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -46017,7 +46017,7 @@ waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.noota_3gffat.upload.maximum_ waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_7.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -46213,7 +46213,7 @@ waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.noota_3gffat.upload.maximum_ waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_5.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -46409,7 +46409,7 @@ waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.noota_3gffat.upload.maximum waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_5B.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -46605,7 +46605,7 @@ waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.noota_3gffat.upload.maximum_ waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_4.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -46830,7 +46830,7 @@ waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.rainmaker_4MB.upload.maxim waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_185.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -46990,7 +46990,7 @@ cezerio_dev_esp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=104857 cezerio_dev_esp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) cezerio_dev_esp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app cezerio_dev_esp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -cezerio_dev_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +cezerio_dev_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) cezerio_dev_esp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs cezerio_dev_esp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 cezerio_dev_esp32c6.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -47160,7 +47160,7 @@ cezerio_mini_dev_esp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1 cezerio_mini_dev_esp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) cezerio_mini_dev_esp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app cezerio_mini_dev_esp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -cezerio_mini_dev_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +cezerio_mini_dev_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) cezerio_mini_dev_esp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs cezerio_mini_dev_esp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 cezerio_mini_dev_esp32c6.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -47407,7 +47407,7 @@ waveshare_esp32_s3_lcd_185.menu.PartitionScheme.rainmaker_4MB.upload.maximum_siz waveshare_esp32_s3_lcd_185.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_lcd_185.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_lcd_185.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_lcd_185.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_lcd_185.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_lcd_185.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_lcd_185.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_lcd_185.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -47644,7 +47644,7 @@ waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.rainmaker_4MB.upload.maxim waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_146.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -47881,7 +47881,7 @@ waveshare_esp32_s3_lcd_146.menu.PartitionScheme.rainmaker_4MB.upload.maximum_siz waveshare_esp32_s3_lcd_146.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_lcd_146.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_lcd_146.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_lcd_146.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_lcd_146.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_lcd_146.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_lcd_146.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_lcd_146.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -48118,7 +48118,7 @@ waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.rainmaker_4MB.upload.m waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_185_box.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -48351,7 +48351,7 @@ waveshare_esp32_s3_lcd_147.menu.PartitionScheme.rainmaker_4MB.upload.maximum_siz waveshare_esp32_s3_lcd_147.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_lcd_147.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_lcd_147.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_lcd_147.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_lcd_147.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_lcd_147.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_lcd_147.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_lcd_147.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -48588,7 +48588,7 @@ waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.rainmaker_4MB.upload.maximu waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_21.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -48825,7 +48825,7 @@ waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.rainmaker_4MB.upload.maximu waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_lcd_28.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -49065,7 +49065,7 @@ waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.rainmaker_4MB.upload.maximum_s waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_relay_6ch.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) @@ -49278,7 +49278,7 @@ waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.noota_3gffat.upload.max waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_amoled_164.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -49475,7 +49475,7 @@ waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.noota_3gffat.upload.max waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_amoled_143.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -49672,7 +49672,7 @@ waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.noota_3gffat.upload.max waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.huge_app.build.partitions=huge_app waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 waveshare_esp32_s3_touch_amoled_191.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -49807,7 +49807,7 @@ Pcbcupid_GLYPH_C3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 Pcbcupid_GLYPH_C3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) Pcbcupid_GLYPH_C3.menu.PartitionScheme.huge_app.build.partitions=huge_app Pcbcupid_GLYPH_C3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -Pcbcupid_GLYPH_C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +Pcbcupid_GLYPH_C3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) Pcbcupid_GLYPH_C3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs Pcbcupid_GLYPH_C3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 Pcbcupid_GLYPH_C3.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -49958,7 +49958,7 @@ Pcbcupid_GLYPH_H2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 Pcbcupid_GLYPH_H2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) Pcbcupid_GLYPH_H2.menu.PartitionScheme.huge_app.build.partitions=huge_app Pcbcupid_GLYPH_H2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -Pcbcupid_GLYPH_H2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +Pcbcupid_GLYPH_H2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) Pcbcupid_GLYPH_H2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs Pcbcupid_GLYPH_H2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 Pcbcupid_GLYPH_H2.menu.PartitionScheme.zigbee=Zigbee 4MB with spiffs @@ -50313,7 +50313,7 @@ yb_esp32s3_amp_v2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 yb_esp32s3_amp_v2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) yb_esp32s3_amp_v2.menu.PartitionScheme.huge_app.build.partitions=huge_app yb_esp32s3_amp_v2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -yb_esp32s3_amp_v2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +yb_esp32s3_amp_v2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) yb_esp32s3_amp_v2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs yb_esp32s3_amp_v2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 yb_esp32s3_amp_v2.menu.PartitionScheme.max_app_8MB=Maximum APP (7.9MB APP No OTA/No FS) @@ -50523,7 +50523,7 @@ yb_esp32s3_amp_v3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 yb_esp32s3_amp_v3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) yb_esp32s3_amp_v3.menu.PartitionScheme.huge_app.build.partitions=huge_app yb_esp32s3_amp_v3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -yb_esp32s3_amp_v3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +yb_esp32s3_amp_v3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) yb_esp32s3_amp_v3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs yb_esp32s3_amp_v3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 yb_esp32s3_amp_v3.menu.PartitionScheme.max_app_8MB=Maximum APP (7.9MB APP No OTA/No FS) @@ -50742,7 +50742,7 @@ yb_esp32s3_eth.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 yb_esp32s3_eth.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) yb_esp32s3_eth.menu.PartitionScheme.huge_app.build.partitions=huge_app yb_esp32s3_eth.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -yb_esp32s3_eth.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +yb_esp32s3_eth.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) yb_esp32s3_eth.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs yb_esp32s3_eth.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 yb_esp32s3_eth.menu.PartitionScheme.custom=Custom @@ -50952,7 +50952,7 @@ yb_esp32s3_drv.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 yb_esp32s3_drv.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) yb_esp32s3_drv.menu.PartitionScheme.huge_app.build.partitions=huge_app yb_esp32s3_drv.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -yb_esp32s3_drv.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +yb_esp32s3_drv.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) yb_esp32s3_drv.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs yb_esp32s3_drv.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 yb_esp32s3_drv.menu.PartitionScheme.max_app_8MB=Maximum APP (7.9MB APP No OTA/No FS) @@ -51475,7 +51475,7 @@ cyobot_v2_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 cyobot_v2_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) cyobot_v2_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app cyobot_v2_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -cyobot_v2_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +cyobot_v2_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) cyobot_v2_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs cyobot_v2_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 cyobot_v2_esp32s3.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) @@ -52133,7 +52133,7 @@ fobe_quill_esp32s3_mesh.menu.PartitionScheme.noota_3gffat.upload.maximum_size=10 fobe_quill_esp32s3_mesh.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) fobe_quill_esp32s3_mesh.menu.PartitionScheme.huge_app.build.partitions=huge_app fobe_quill_esp32s3_mesh.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -fobe_quill_esp32s3_mesh.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +fobe_quill_esp32s3_mesh.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) fobe_quill_esp32s3_mesh.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs fobe_quill_esp32s3_mesh.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 fobe_quill_esp32s3_mesh.menu.PartitionScheme.zigbee_zczr=Zigbee ZCZR 4MB with spiffs @@ -52328,7 +52328,7 @@ twinaiot.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 twinaiot.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) twinaiot.menu.PartitionScheme.huge_app.build.partitions=huge_app twinaiot.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -twinaiot.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +twinaiot.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) twinaiot.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs twinaiot.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 twinaiot.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -52719,7 +52719,7 @@ axiometa_pixie_m1.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 axiometa_pixie_m1.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) axiometa_pixie_m1.menu.PartitionScheme.huge_app.build.partitions=huge_app axiometa_pixie_m1.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -axiometa_pixie_m1.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +axiometa_pixie_m1.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) axiometa_pixie_m1.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs axiometa_pixie_m1.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 axiometa_pixie_m1.menu.PartitionScheme.rainmaker=RainMaker 4MB @@ -52869,7 +52869,7 @@ soldered_nula_mini_esp32c6.menu.PartitionScheme.noota_3gffat.upload.maximum_size soldered_nula_mini_esp32c6.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) soldered_nula_mini_esp32c6.menu.PartitionScheme.huge_app.build.partitions=huge_app soldered_nula_mini_esp32c6.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 -soldered_nula_mini_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +soldered_nula_mini_esp32c6.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) soldered_nula_mini_esp32c6.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs soldered_nula_mini_esp32c6.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 soldered_nula_mini_esp32c6.menu.PartitionScheme.rainmaker=RainMaker 4MB From d1270e54b64729f8e13a9fc43f806999430e5f2e Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Thu, 20 Nov 2025 12:38:48 -0300 Subject: [PATCH 32/38] feat(esp32c61): Add support for ESP32-C61 (#12019) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(esp32c61): Add support for ESP32-C61 Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> * Update CMakeLists.txt Co-authored-by: Sugar Glider * fix(psram): Add missing C61 header * feat(p4): Add rev3 check on supported frequencies * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Co-authored-by: Sugar Glider Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- .github/scripts/find_all_boards.sh | 2 +- .github/workflows/build_component.yml | 11 +- README.md | 2 +- boards.txt | 170 +++++++++++ cores/esp32/Esp.cpp | 21 +- cores/esp32/HardwareSerial.h | 8 +- cores/esp32/chip-debug-report.cpp | 5 +- cores/esp32/esp32-hal-cpu.c | 163 ++++++----- cores/esp32/esp32-hal-cpu.h | 68 +++++ cores/esp32/esp32-hal-gpio.c | 12 +- cores/esp32/esp32-hal-i2c-slave.c | 5 +- cores/esp32/esp32-hal-matrix.c | 2 + cores/esp32/esp32-hal-misc.c | 6 +- cores/esp32/esp32-hal-psram.c | 2 + cores/esp32/esp32-hal-spi.c | 272 +++++++++--------- cores/esp32/esp32-hal-spi.h | 2 +- cores/esp32/esp32-hal.h | 3 +- docs/en/lib_builder.rst | 5 +- idf_component.yml | 10 +- .../Arduino_ESP_Matter_over_OpenThread/ci.yml | 1 + .../ResetReason/ResetReason/ResetReason.ino | 2 + libraries/SPI/src/SPI.cpp | 15 +- platform.txt | 1 + tests/requirements.txt | 8 +- variants/esp32c61/pins_arduino.h | 37 +++ 25 files changed, 587 insertions(+), 246 deletions(-) create mode 100644 variants/esp32c61/pins_arduino.h diff --git a/.github/scripts/find_all_boards.sh b/.github/scripts/find_all_boards.sh index 67b46661ca5..c37d306151e 100755 --- a/.github/scripts/find_all_boards.sh +++ b/.github/scripts/find_all_boards.sh @@ -8,7 +8,7 @@ boards_list=$(grep '.tarch=' boards.txt) while read -r line; do board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1) # skip esp32c2 as we dont build libs for it - if [ "$board_name" == "esp32c2" ]; then + if [ "$board_name" == "esp32c2" ] || [ "$board_name" == "esp32c61" ]; then echo "Skipping 'espressif:esp32:$board_name'" continue fi diff --git a/.github/workflows/build_component.yml b/.github/workflows/build_component.yml index e5c0f244f65..7a11ca768ec 100644 --- a/.github/workflows/build_component.yml +++ b/.github/workflows/build_component.yml @@ -4,13 +4,13 @@ on: workflow_dispatch: inputs: idf_ver: - description: "IDF Versions" - default: "release-v5.3,release-v5.4,release-v5.5" + description: "Comma separated list of IDF branches to build" + default: "release-v5.5" type: "string" required: true idf_targets: - description: "IDF Targets" - default: "esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32c6,esp32h2,esp32p4" + description: "Comma separated list of IDF targets to build" + default: "esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32c5,esp32c6,esp32c61,esp32h2,esp32p4" type: "string" required: false push: @@ -37,6 +37,7 @@ on: - "variants/esp32c3/**" - "variants/esp32c5/**" - "variants/esp32c6/**" + - "variants/esp32c61/**" - "variants/esp32h2/**" - "variants/esp32p4/**" - "variants/esp32s2/**" @@ -125,7 +126,7 @@ jobs: echo "esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32c6,esp32h2,esp32p4" ;; "release-v5.5") - echo "esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32c5,esp32c6,esp32h2,esp32p4" + echo "esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32c5,esp32c6,esp32c61,esp32h2,esp32p4" ;; *) echo "" diff --git a/README.md b/README.md index 51ab98e0af1..e6a0eb2dffb 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Here are the ESP32 series supported by the Arduino-ESP32 project: | ESP32-S3 | Yes | Yes | [ESP32-S3](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf) | > [!NOTE] -> ESP32-C2 is also supported by Arduino-ESP32 but requires using Arduino as an ESP-IDF component or rebuilding the static libraries. +> ESP32-C2 and ESP32-C61 are also supported by Arduino-ESP32 but require using Arduino as an ESP-IDF component or rebuilding the static libraries. > For more information, see the [Arduino as an ESP-IDF component documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/esp-idf_component.html) or the > [Lib Builder documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/lib_builder.html), respectively. diff --git a/boards.txt b/boards.txt index cc8e18a4246..8fdd268ce20 100644 --- a/boards.txt +++ b/boards.txt @@ -986,6 +986,176 @@ esp32c6.menu.ZigbeeMode.zczr_debug.build.zigbee_libs=-lesp_zb_api.zczr.debug -lz ############################################################## +esp32c61.name=ESP32C61 Dev Module +esp32c61.hide=true + +esp32c61.bootloader.tool=esptool_py +esp32c61.bootloader.tool.default=esptool_py + +esp32c61.upload.tool=esptool_py +esp32c61.upload.tool.default=esptool_py +esp32c61.upload.tool.network=esp_ota + +esp32c61.upload.maximum_size=1310720 +esp32c61.upload.maximum_data_size=327680 +esp32c61.upload.flags= +esp32c61.upload.extra_flags= +esp32c61.upload.use_1200bps_touch=false +esp32c61.upload.wait_for_upload_port=false + +esp32c61.serial.disableDTR=false +esp32c61.serial.disableRTS=false + +esp32c61.build.tarch=riscv32 +esp32c61.build.target=esp +esp32c61.build.mcu=esp32c61 +esp32c61.build.core=esp32 +esp32c61.build.variant=esp32c61 +esp32c61.build.board=ESP32C61_DEV +esp32c61.build.bootloader_addr=0x0 + +esp32c61.build.cdc_on_boot=0 +esp32c61.build.f_cpu=160000000L +esp32c61.build.flash_size=4MB +esp32c61.build.flash_freq=80m +esp32c61.build.flash_mode=qio +esp32c61.build.boot=qio +esp32c61.build.partitions=default +esp32c61.build.defines= + +## IDE 2.0 Seems to not update the value +esp32c61.menu.JTAGAdapter.default=Disabled +esp32c61.menu.JTAGAdapter.default.build.copy_jtag_files=0 +esp32c61.menu.JTAGAdapter.builtin=Integrated USB JTAG +esp32c61.menu.JTAGAdapter.builtin.build.openocdscript=esp32c61-builtin.cfg +esp32c61.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +esp32c61.menu.JTAGAdapter.external=FTDI Adapter +esp32c61.menu.JTAGAdapter.external.build.openocdscript=esp32c61-ftdi.cfg +esp32c61.menu.JTAGAdapter.external.build.copy_jtag_files=1 +esp32c61.menu.JTAGAdapter.bridge=ESP USB Bridge +esp32c61.menu.JTAGAdapter.bridge.build.openocdscript=esp32c61-bridge.cfg +esp32c61.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +esp32c61.menu.PSRAM.disabled=Disabled +esp32c61.menu.PSRAM.disabled.build.defines= +esp32c61.menu.PSRAM.enabled=Enabled +esp32c61.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM + +esp32c61.menu.CDCOnBoot.default=Disabled +esp32c61.menu.CDCOnBoot.default.build.cdc_on_boot=0 +esp32c61.menu.CDCOnBoot.cdc=Enabled +esp32c61.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 + +esp32c61.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +esp32c61.menu.PartitionScheme.default.build.partitions=default +esp32c61.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +esp32c61.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +esp32c61.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +esp32c61.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +esp32c61.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +esp32c61.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +esp32c61.menu.PartitionScheme.minimal.build.partitions=minimal +esp32c61.menu.PartitionScheme.no_fs=No FS 4MB (2MB APP x2) +esp32c61.menu.PartitionScheme.no_fs.build.partitions=no_fs +esp32c61.menu.PartitionScheme.no_fs.upload.maximum_size=2031616 +esp32c61.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +esp32c61.menu.PartitionScheme.no_ota.build.partitions=no_ota +esp32c61.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +esp32c61.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +esp32c61.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +esp32c61.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +esp32c61.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +esp32c61.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +esp32c61.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +esp32c61.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +esp32c61.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +esp32c61.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +esp32c61.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +esp32c61.menu.PartitionScheme.huge_app.build.partitions=huge_app +esp32c61.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +esp32c61.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32c61.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +esp32c61.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +esp32c61.menu.PartitionScheme.rainmaker=RainMaker 4MB +esp32c61.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +esp32c61.menu.PartitionScheme.rainmaker.upload.maximum_size=1966080 +esp32c61.menu.PartitionScheme.rainmaker_4MB=RainMaker 4MB No OTA +esp32c61.menu.PartitionScheme.rainmaker_4MB.build.partitions=rainmaker_4MB_no_ota +esp32c61.menu.PartitionScheme.rainmaker_4MB.upload.maximum_size=4038656 +esp32c61.menu.PartitionScheme.rainmaker_8MB=RainMaker 8MB +esp32c61.menu.PartitionScheme.rainmaker_8MB.build.partitions=rainmaker_8MB +esp32c61.menu.PartitionScheme.rainmaker_8MB.upload.maximum_size=4096000 +esp32c61.menu.PartitionScheme.custom=Custom +esp32c61.menu.PartitionScheme.custom.build.partitions= +esp32c61.menu.PartitionScheme.custom.upload.maximum_size=8388608 + +esp32c61.menu.CPUFreq.160=160MHz (WiFi) +esp32c61.menu.CPUFreq.160.build.f_cpu=160000000L +esp32c61.menu.CPUFreq.120=120MHz (WiFi) +esp32c61.menu.CPUFreq.120.build.f_cpu=120000000L +esp32c61.menu.CPUFreq.80=80MHz (WiFi) +esp32c61.menu.CPUFreq.80.build.f_cpu=80000000L +esp32c61.menu.CPUFreq.40=40MHz +esp32c61.menu.CPUFreq.40.build.f_cpu=40000000L +esp32c61.menu.CPUFreq.20=20MHz +esp32c61.menu.CPUFreq.20.build.f_cpu=20000000L +esp32c61.menu.CPUFreq.10=10MHz +esp32c61.menu.CPUFreq.10.build.f_cpu=10000000L + +esp32c61.menu.FlashMode.qio=QIO +esp32c61.menu.FlashMode.qio.build.flash_mode=dio +esp32c61.menu.FlashMode.qio.build.boot=qio +esp32c61.menu.FlashMode.dio=DIO +esp32c61.menu.FlashMode.dio.build.flash_mode=dio +esp32c61.menu.FlashMode.dio.build.boot=dio + +esp32c61.menu.FlashFreq.80=80MHz +esp32c61.menu.FlashFreq.80.build.flash_freq=80m +esp32c61.menu.FlashFreq.40=40MHz +esp32c61.menu.FlashFreq.40.build.flash_freq=40m + +esp32c61.menu.FlashSize.4M=4MB (32Mb) +esp32c61.menu.FlashSize.4M.build.flash_size=4MB +esp32c61.menu.FlashSize.8M=8MB (64Mb) +esp32c61.menu.FlashSize.8M.build.flash_size=8MB +esp32c61.menu.FlashSize.2M=2MB (16Mb) +esp32c61.menu.FlashSize.2M.build.flash_size=2MB + +esp32c61.menu.UploadSpeed.921600=921600 +esp32c61.menu.UploadSpeed.921600.upload.speed=921600 +esp32c61.menu.UploadSpeed.115200=115200 +esp32c61.menu.UploadSpeed.115200.upload.speed=115200 +esp32c61.menu.UploadSpeed.256000.windows=256000 +esp32c61.menu.UploadSpeed.256000.upload.speed=256000 +esp32c61.menu.UploadSpeed.230400.windows.upload.speed=256000 +esp32c61.menu.UploadSpeed.230400=230400 +esp32c61.menu.UploadSpeed.230400.upload.speed=230400 +esp32c61.menu.UploadSpeed.460800.linux=460800 +esp32c61.menu.UploadSpeed.460800.macosx=460800 +esp32c61.menu.UploadSpeed.460800.upload.speed=460800 +esp32c61.menu.UploadSpeed.512000.windows=512000 +esp32c61.menu.UploadSpeed.512000.upload.speed=512000 + +esp32c61.menu.DebugLevel.none=None +esp32c61.menu.DebugLevel.none.build.code_debug=0 +esp32c61.menu.DebugLevel.error=Error +esp32c61.menu.DebugLevel.error.build.code_debug=1 +esp32c61.menu.DebugLevel.warn=Warn +esp32c61.menu.DebugLevel.warn.build.code_debug=2 +esp32c61.menu.DebugLevel.info=Info +esp32c61.menu.DebugLevel.info.build.code_debug=3 +esp32c61.menu.DebugLevel.debug=Debug +esp32c61.menu.DebugLevel.debug.build.code_debug=4 +esp32c61.menu.DebugLevel.verbose=Verbose +esp32c61.menu.DebugLevel.verbose.build.code_debug=5 + +esp32c61.menu.EraseFlash.none=Disabled +esp32c61.menu.EraseFlash.none.upload.erase_cmd= +esp32c61.menu.EraseFlash.all=Enabled +esp32c61.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + esp32s3.name=ESP32S3 Dev Module esp32s3.bootloader.tool=esptool_py diff --git a/cores/esp32/Esp.cpp b/cores/esp32/Esp.cpp index 5f5a7a353e8..023afd80d8b 100644 --- a/cores/esp32/Esp.cpp +++ b/cores/esp32/Esp.cpp @@ -83,6 +83,9 @@ extern "C" { #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/spi_flash.h" #define ESP_FLASH_IMAGE_BASE 0x2000 // Esp32c5 is located at 0x2000 +#elif CONFIG_IDF_TARGET_ESP32C61 +#include "esp32c61/rom/spi_flash.h" +#define ESP_FLASH_IMAGE_BASE 0x0000 // Esp32c61 is located at 0x0000 #else #error Target CONFIG_IDF_TARGET is not supported #endif @@ -365,7 +368,7 @@ uint32_t EspClass::getFlashChipSpeed(void) { } FlashMode_t EspClass::getFlashChipMode(void) { -#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 +#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61 uint32_t spi_ctrl = REG_READ(PERIPHS_SPI_FLASH_CTRL); #elif CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C6 uint32_t spi_ctrl = REG_READ(DR_REG_SPI0_BASE + 0x8); @@ -449,6 +452,22 @@ uint32_t EspClass::magicFlashChipSpeed(uint8_t flashByte) { return 0; } +#elif CONFIG_IDF_TARGET_ESP32C61 + /* + FLASH_FREQUENCY = { + "80m": 0xF, + "40m": 0x0, + "20m": 0x2, + } +*/ + switch (flashByte & 0x0F) { + case 0xF: return (80_MHz); + case 0x0: return (40_MHz); + case 0x2: return (20_MHz); + default: // fail? + return 0; + } + #elif CONFIG_IDF_TARGET_ESP32H2 /* diff --git a/cores/esp32/HardwareSerial.h b/cores/esp32/HardwareSerial.h index 9a4eec5ccb4..7f843fef4c8 100644 --- a/cores/esp32/HardwareSerial.h +++ b/cores/esp32/HardwareSerial.h @@ -164,6 +164,8 @@ typedef enum { #define SOC_RX0 (gpio_num_t)38 #elif CONFIG_IDF_TARGET_ESP32C5 #define SOC_RX0 (gpio_num_t)12 +#elif CONFIG_IDF_TARGET_ESP32C61 +#define SOC_RX0 (gpio_num_t)10 #endif #endif @@ -182,7 +184,7 @@ typedef enum { #define SOC_TX0 (gpio_num_t)24 #elif CONFIG_IDF_TARGET_ESP32P4 #define SOC_TX0 (gpio_num_t)37 -#elif CONFIG_IDF_TARGET_ESP32C5 +#elif CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61 #define SOC_TX0 (gpio_num_t)11 #endif #endif @@ -209,6 +211,8 @@ typedef enum { #define RX1 (gpio_num_t)11 #elif CONFIG_IDF_TARGET_ESP32C5 #define RX1 (gpio_num_t)4 +#elif CONFIG_IDF_TARGET_ESP32C61 +#define RX1 (gpio_num_t)8 #endif #endif @@ -231,6 +235,8 @@ typedef enum { #define TX1 (gpio_num_t)10 #elif CONFIG_IDF_TARGET_ESP32C5 #define TX1 (gpio_num_t)5 +#elif CONFIG_IDF_TARGET_ESP32C61 +#define TX1 (gpio_num_t)29 #endif #endif #endif /* SOC_UART_HP_NUM > 1 */ diff --git a/cores/esp32/chip-debug-report.cpp b/cores/esp32/chip-debug-report.cpp index 753e7346775..f4f29a1e005 100644 --- a/cores/esp32/chip-debug-report.cpp +++ b/cores/esp32/chip-debug-report.cpp @@ -69,9 +69,8 @@ static void printPkgVersion(void) { #elif CONFIG_IDF_TARGET_ESP32P4 uint32_t pkg_ver = REG_GET_FIELD(EFUSE_RD_MAC_SYS_2_REG, EFUSE_PKG_VERSION); chip_report_printf("%lu", pkg_ver); -#elif CONFIG_IDF_TARGET_ESP32C5 - // ToDo: Update this line when EFUSE_PKG_VERSION is available again for ESP32-C5 - uint32_t pkg_ver = 0; //REG_GET_FIELD(EFUSE_RD_MAC_SYS2_REG, EFUSE_PKG_VERSION); +#elif CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61 + uint32_t pkg_ver = REG_GET_FIELD(EFUSE_RD_MAC_SYS2_REG, EFUSE_PKG_VERSION); chip_report_printf("%lu", pkg_ver); #else chip_report_printf("Unknown"); diff --git a/cores/esp32/esp32-hal-cpu.c b/cores/esp32/esp32-hal-cpu.c index e9113da4219..0df00931b02 100644 --- a/cores/esp32/esp32-hal-cpu.c +++ b/cores/esp32/esp32-hal-cpu.c @@ -19,8 +19,7 @@ #include "esp_attr.h" #include "esp_log.h" #include "soc/rtc.h" -#if !defined(CONFIG_IDF_TARGET_ESP32C2) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4) \ - && !defined(CONFIG_IDF_TARGET_ESP32C5) +#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) #include "soc/rtc_cntl_reg.h" #include "soc/syscon_reg.h" #endif @@ -35,24 +34,36 @@ #if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4 #include "xtensa_timer.h" #include "esp32/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "PLL", "8.5M", "APLL"}; #elif CONFIG_IDF_TARGET_ESP32S2 #include "xtensa_timer.h" #include "esp32s2/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "PLL", "8.5M", "APLL"}; #elif CONFIG_IDF_TARGET_ESP32S3 #include "xtensa_timer.h" #include "esp32s3/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "PLL", "17.5M"}; #elif CONFIG_IDF_TARGET_ESP32C2 #include "esp32c2/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "PLL", "17.5M"}; #elif CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "PLL", "17.5M"}; #elif CONFIG_IDF_TARGET_ESP32C6 #include "esp32c6/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "PLL", "17.5M"}; #elif CONFIG_IDF_TARGET_ESP32H2 #include "esp32h2/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "PLL", "8.5M", "FLASH_PLL"}; #elif CONFIG_IDF_TARGET_ESP32P4 #include "esp32p4/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "CPLL", "17.5M"}; #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "17.5M", "PLL_F160M", "PLL_F240M"}; +#elif CONFIG_IDF_TARGET_ESP32C61 +#include "esp32c61/rom/rtc.h" +static const char *clock_source_names[] = {"XTAL", "17.5M", "PLL_F160M"}; #else #error Target CONFIG_IDF_TARGET is not supported #endif @@ -182,77 +193,105 @@ static uint32_t calculateApb(rtc_cpu_freq_config_t *conf) { void esp_timer_impl_update_apb_freq(uint32_t apb_ticks_per_us); //private in IDF #endif -bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz) { - rtc_cpu_freq_config_t conf, cconf; - uint32_t capb, apb; - //Get XTAL Frequency and calculate min CPU MHz -#if (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4) && !defined(CONFIG_IDF_TARGET_ESP32C5)) - rtc_xtal_freq_t xtal = rtc_clk_xtal_freq_get(); +const char *getClockSourceName(uint8_t source) { + if (source < SOC_CPU_CLK_SRC_INVALID) { + return clock_source_names[source]; + } + + return "Invalid"; +} + +const char *getSupportedCpuFrequencyMhz(uint8_t xtal) { + char *supported_frequencies = (char *)calloc(256, sizeof(char)); + int pos = 0; + +#if TARGET_CPU_FREQ_MAX_400 +#if CONFIG_IDF_TARGET_ESP32P4 && CONFIG_ESP32P4_REV_MIN_FULL < 300 + pos += snprintf(supported_frequencies + pos, 256 - pos, "360"); +#else + pos += snprintf(supported_frequencies + pos, 256 - pos, "400"); #endif +#elif TARGET_CPU_FREQ_MAX_240 #if CONFIG_IDF_TARGET_ESP32 - if (xtal > RTC_XTAL_FREQ_AUTO) { - if (xtal < RTC_XTAL_FREQ_40M) { - if (cpu_freq_mhz <= xtal && cpu_freq_mhz != xtal && cpu_freq_mhz != (xtal / 2)) { - log_e("Bad frequency: %u MHz! Options are: 240, 160, 80, %u and %u MHz", cpu_freq_mhz, xtal, xtal / 2); - return false; - } - } else if (cpu_freq_mhz <= xtal && cpu_freq_mhz != xtal && cpu_freq_mhz != (xtal / 2) && cpu_freq_mhz != (xtal / 4)) { - log_e("Bad frequency: %u MHz! Options are: 240, 160, 80, %u, %u and %u MHz", cpu_freq_mhz, xtal, xtal / 2, xtal / 4); - return false; - } - } + if (!REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_RATED) || !REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_LOW)) { + pos += snprintf(supported_frequencies + pos, 256 - pos, "160, 80"); + } else #endif -#if (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4) && !defined(CONFIG_IDF_TARGET_ESP32C5)) - if (cpu_freq_mhz > xtal && cpu_freq_mhz != 240 && cpu_freq_mhz != 160 && cpu_freq_mhz != 120 && cpu_freq_mhz != 80) { - if (xtal >= RTC_XTAL_FREQ_40M) { - log_e("Bad frequency: %u MHz! Options are: 240, 160, 120, 80, %u, %u and %u MHz", cpu_freq_mhz, xtal, xtal / 2, xtal / 4); - } else { - log_e("Bad frequency: %u MHz! Options are: 240, 160, 120, 80, %u and %u MHz", cpu_freq_mhz, xtal, xtal / 2); - } - return false; + { + pos += snprintf(supported_frequencies + pos, 256 - pos, "240, 160, 80"); } +#elif TARGET_CPU_FREQ_MAX_160 + pos += snprintf(supported_frequencies + pos, 256 - pos, "160, 120, 80"); +#elif TARGET_CPU_FREQ_MAX_120 + pos += snprintf(supported_frequencies + pos, 256 - pos, "120, 80"); +#elif TARGET_CPU_FREQ_MAX_96 + pos += snprintf(supported_frequencies + pos, 256 - pos, "96, 64, 48"); +#else + free(supported_frequencies); + return "Unknown"; #endif + + // Append xtal and its dividers only if xtal is nonzero + if (xtal != 0) { + // We'll show as: , , [, ] MHz + pos += snprintf(supported_frequencies + pos, 256 - pos, ", %u, %u", xtal, xtal / 2); + #if CONFIG_IDF_TARGET_ESP32 - //check if cpu supports the frequency - if (cpu_freq_mhz == 240) { - //Check if ESP32 is rated for a CPU frequency of 160MHz only - if (REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_RATED) && REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_LOW)) { - log_e("Can not switch to 240 MHz! Chip CPU frequency rated for 160MHz."); - cpu_freq_mhz = 160; + // Only append xtal/4 if it's > 0 and meaningful for higher-frequency chips (e.g., ESP32 40MHz/4=10) + if (xtal >= RTC_XTAL_FREQ_40M) { + pos += snprintf(supported_frequencies + pos, 256 - pos, ", %u", xtal / 4); } +#endif } + + pos += snprintf(supported_frequencies + pos, 256 - pos, " MHz"); + return supported_frequencies; +} + +bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz) { + rtc_cpu_freq_config_t conf, cconf; + uint32_t capb, apb; + [[maybe_unused]] + uint8_t xtal = 0; + + // ===== Get XTAL Frequency and validate input ===== +#if TARGET_HAS_XTAL_FREQ + xtal = (uint8_t)rtc_clk_xtal_freq_get(); #endif - //Get current CPU clock configuration + + // ===== Get current configuration and check if change is needed ===== rtc_clk_cpu_freq_get_config(&cconf); - //return if frequency has not changed if (cconf.freq_mhz == cpu_freq_mhz) { - return true; + return true; // Frequency already set } - //Get configuration for the new CPU frequency + + // ===== Get configuration for new frequency ===== if (!rtc_clk_cpu_freq_mhz_to_config(cpu_freq_mhz, &conf)) { - log_e("CPU clock could not be set to %u MHz", cpu_freq_mhz); + log_e("CPU clock could not be set to %u MHz. Supported frequencies: %s", cpu_freq_mhz, getSupportedCpuFrequencyMhz(xtal)); return false; } - //Current APB + + // ===== Calculate APB frequencies ===== capb = calculateApb(&cconf); - //New APB apb = calculateApb(&conf); - //Call peripheral functions before the APB change + // ===== Apply frequency change ===== if (apb_change_callbacks) { triggerApbChangeCallback(APB_BEFORE_CHANGE, capb, apb); } - //Make the frequency change + rtc_clk_cpu_freq_set_config_fast(&conf); -#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) + + // Update APB frequency for targets with dynamic APB +#if TARGET_HAS_DYNAMIC_APB if (capb != apb) { - //Update REF_TICK (uncomment if REF_TICK is different than 1MHz) - //if(conf.freq_mhz < 80){ - // ESP_REG(APB_CTRL_XTAL_TICK_CONF_REG) = conf.freq_mhz / (REF_CLK_FREQ / MHZ) - 1; + // Update REF_TICK (uncomment if REF_TICK is different than 1MHz) + // if (conf.freq_mhz < 80) { + // ESP_REG(APB_CTRL_XTAL_TICK_CONF_REG) = conf.freq_mhz / (REF_CLK_FREQ / MHZ) - 1; // } - //Update APB Freq REG rtc_clk_apb_freq_update(apb); - //Update esp_timer divisor + + // ESP32-specific: Update esp_timer divisor #if CONFIG_IDF_TARGET_ESP32 #if defined(LACT_MODULE) && defined(LACT_TICKS_PER_US) timer_ll_set_lact_clock_prescale(TIMER_LL_GET_HW(LACT_MODULE), apb / MHZ / LACT_TICKS_PER_US); @@ -262,34 +301,20 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz) { #endif } #endif - //Update FreeRTOS Tick Divisor -#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 + // Update FreeRTOS Tick Divisor for Xtensa targets +#if TARGET_HAS_XTENSA_TICK uint32_t fcpu = (conf.freq_mhz >= 80) ? (conf.freq_mhz * MHZ) : (apb); _xt_tick_divisor = fcpu / XT_TICK_PER_SEC; #endif - //Call peripheral functions after the APB change + if (apb_change_callbacks) { triggerApbChangeCallback(APB_AFTER_CHANGE, capb, apb); } -#if defined(SOC_CLK_APLL_SUPPORTED) && !defined(CONFIG_IDF_TARGET_ESP32P4) // APLL not yet supported in ESP32-P4 - log_d( - "%s: %u / %u = %u Mhz, APB: %u Hz", - (conf.source == SOC_CPU_CLK_SRC_PLL) ? "PLL" : ((conf.source == SOC_CPU_CLK_SRC_APLL) ? "APLL" : ((conf.source == SOC_CPU_CLK_SRC_XTAL) ? "XTAL" : "8M")), - conf.source_freq_mhz, conf.div, conf.freq_mhz, apb - ); -#elif defined(CONFIG_IDF_TARGET_ESP32C5) - log_d( - "%s: %u / %u = %u Mhz, APB: %u Hz", - (conf.source == SOC_CPU_CLK_SRC_PLL_F240M || conf.source == SOC_CPU_CLK_SRC_PLL_F160M) ? "PLL" : ((conf.source == SOC_CPU_CLK_SRC_XTAL) ? "XTAL" : "8M"), - conf.source_freq_mhz, conf.div, conf.freq_mhz, apb - ); -#else - log_d( - "%s: %u / %u = %u Mhz, APB: %u Hz", (conf.source == SOC_CPU_CLK_SRC_PLL) ? "PLL" : ((conf.source == SOC_CPU_CLK_SRC_XTAL) ? "XTAL" : "17.5M"), - conf.source_freq_mhz, conf.div, conf.freq_mhz, apb - ); -#endif + + // ===== Debug logging ===== + log_d("%s: %u / %u = %u Mhz, APB: %u Hz", getClockSourceName(conf.source), conf.source_freq_mhz, conf.div, conf.freq_mhz, apb); + return true; } diff --git a/cores/esp32/esp32-hal-cpu.h b/cores/esp32/esp32-hal-cpu.h index 59806b460ae..dfae10678a1 100644 --- a/cores/esp32/esp32-hal-cpu.h +++ b/cores/esp32/esp32-hal-cpu.h @@ -23,6 +23,72 @@ extern "C" { #include #include +#include "sdkconfig.h" +#include "soc/soc_caps.h" + +// When adding a new target, update the appropriate group(s) below + +// Targets that support XTAL frequency queries via rtc_clk_xtal_freq_get() +#if (!defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32P4)) +#define TARGET_HAS_XTAL_FREQ 1 +#else +#define TARGET_HAS_XTAL_FREQ 0 +#endif + +// Targets that need dynamic APB frequency updates via rtc_clk_apb_freq_update() +#if (defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)) +#define TARGET_HAS_DYNAMIC_APB 1 +#else +#define TARGET_HAS_DYNAMIC_APB 0 +#endif + +// Xtensa architecture targets that need FreeRTOS tick divisor updates +#if (defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2)) +#define TARGET_HAS_XTENSA_TICK 1 +#else +#define TARGET_HAS_XTENSA_TICK 0 +#endif + +// Targets with APLL support (uses IDF SOC capability macro) +// Note: ESP32-P4 APLL support is not yet fully implemented in IDF +#if (defined(SOC_CLK_APLL_SUPPORTED) && !defined(CONFIG_IDF_TARGET_ESP32P4)) +#define TARGET_HAS_APLL 1 +#else +#define TARGET_HAS_APLL 0 +#endif + +// Targets grouped by maximum CPU frequency support + +#if (defined(CONFIG_IDF_TARGET_ESP32P4)) +#define TARGET_CPU_FREQ_MAX_400 1 +#else +#define TARGET_CPU_FREQ_MAX_400 0 +#endif + +#if (defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C5) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)) +#define TARGET_CPU_FREQ_MAX_240 1 +#else +#define TARGET_CPU_FREQ_MAX_240 0 +#endif + +#if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32C61)) +#define TARGET_CPU_FREQ_MAX_160 1 +#else +#define TARGET_CPU_FREQ_MAX_160 0 +#endif + +#if (defined(CONFIG_IDF_TARGET_ESP32C2)) +#define TARGET_CPU_FREQ_MAX_120 1 +#else +#define TARGET_CPU_FREQ_MAX_120 0 +#endif + +#if (defined(CONFIG_IDF_TARGET_ESP32H2)) +#define TARGET_CPU_FREQ_MAX_96 1 +#else +#define TARGET_CPU_FREQ_MAX_96 0 +#endif + typedef enum { APB_BEFORE_CHANGE, APB_AFTER_CHANGE @@ -40,6 +106,8 @@ bool removeApbChangeCallback(void *arg, apb_change_cb_t cb); // 24, 12 <<< For 24MHz XTAL bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz); +const char *getSupportedCpuFrequencyMhz(uint8_t xtal); +const char *getClockSourceName(uint8_t source); uint32_t getCpuFrequencyMhz(); // In MHz uint32_t getXtalFrequencyMhz(); // In MHz uint32_t getApbFrequency(); // In Hz diff --git a/cores/esp32/esp32-hal-gpio.c b/cores/esp32/esp32-hal-gpio.c index 197f789d94d..4a7fe6d1e75 100644 --- a/cores/esp32/esp32-hal-gpio.c +++ b/cores/esp32/esp32-hal-gpio.c @@ -127,11 +127,15 @@ extern void ARDUINO_ISR_ATTR __pinMode(uint8_t pin, uint8_t mode) { gpiohal.dev = GPIO_LL_GET_HW(GPIO_PORT_0); gpio_config_t conf = { - .pin_bit_mask = (1ULL << pin), /*!< GPIO pin: set with bit mask, each bit maps to a GPIO */ - .mode = GPIO_MODE_DISABLE, /*!< GPIO mode: set input/output mode */ - .pull_up_en = GPIO_PULLUP_DISABLE, /*!< GPIO pull-up */ - .pull_down_en = GPIO_PULLDOWN_DISABLE, /*!< GPIO pull-down */ + .pin_bit_mask = (1ULL << pin), /*!< GPIO pin: set with bit mask, each bit maps to a GPIO */ + .mode = GPIO_MODE_DISABLE, /*!< GPIO mode: set input/output mode */ + .pull_up_en = GPIO_PULLUP_DISABLE, /*!< GPIO pull-up */ + .pull_down_en = GPIO_PULLDOWN_DISABLE, /*!< GPIO pull-down */ +#ifndef CONFIG_IDF_TARGET_ESP32C61 .intr_type = gpiohal.dev->pin[pin].int_type /*!< GPIO interrupt type - previously set */ +#else + .intr_type = gpiohal.dev->pinn[pin].pinn_int_type /*!< GPIO interrupt type - previously set */ +#endif }; if (mode < 0x20) { //io conf.mode = mode & (INPUT | OUTPUT); diff --git a/cores/esp32/esp32-hal-i2c-slave.c b/cores/esp32/esp32-hal-i2c-slave.c index 1f23b7832f7..5c0991c1981 100644 --- a/cores/esp32/esp32-hal-i2c-slave.c +++ b/cores/esp32/esp32-hal-i2c-slave.c @@ -44,7 +44,7 @@ #include "soc/periph_defs.h" #include "hal/i2c_ll.h" #include "hal/i2c_types.h" -#ifndef CONFIG_IDF_TARGET_ESP32C5 +#if !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32C61) #include "hal/clk_gate_ll.h" #endif #include "esp32-hal-log.h" @@ -328,7 +328,8 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t frequency = 100000L; } frequency = (frequency * 5) / 4; -#if !defined(CONFIG_IDF_TARGET_ESP32P4) && !defined(CONFIG_IDF_TARGET_ESP32C5) +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 \ + || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 if (i2c->num == 0) { periph_ll_enable_clk_clear_rst(PERIPH_I2C0_MODULE); #if SOC_HP_I2C_NUM > 1 diff --git a/cores/esp32/esp32-hal-matrix.c b/cores/esp32/esp32-hal-matrix.c index 0d81e979f2b..f609d9e1487 100644 --- a/cores/esp32/esp32-hal-matrix.c +++ b/cores/esp32/esp32-hal-matrix.c @@ -36,6 +36,8 @@ #include "esp32p4/rom/gpio.h" #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/gpio.h" +#elif CONFIG_IDF_TARGET_ESP32C61 +#include "esp32c61/rom/gpio.h" #else #error Target CONFIG_IDF_TARGET is not supported #endif diff --git a/cores/esp32/esp32-hal-misc.c b/cores/esp32/esp32-hal-misc.c index 41e2cf71543..f0195ed1acf 100644 --- a/cores/esp32/esp32-hal-misc.c +++ b/cores/esp32/esp32-hal-misc.c @@ -30,8 +30,7 @@ #endif #include #include "soc/rtc.h" -#if !defined(CONFIG_IDF_TARGET_ESP32C2) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4) \ - && !defined(CONFIG_IDF_TARGET_ESP32C5) +#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) #include "soc/rtc_cntl_reg.h" #include "soc/syscon_reg.h" #endif @@ -59,7 +58,8 @@ #include "esp32p4/rom/rtc.h" #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/rtc.h" - +#elif CONFIG_IDF_TARGET_ESP32C61 +#include "esp32c61/rom/rtc.h" #else #error Target CONFIG_IDF_TARGET is not supported #endif diff --git a/cores/esp32/esp32-hal-psram.c b/cores/esp32/esp32-hal-psram.c index 0d57a67ede4..9b985e81b2a 100644 --- a/cores/esp32/esp32-hal-psram.c +++ b/cores/esp32/esp32-hal-psram.c @@ -31,6 +31,8 @@ #include "esp32p4/rom/cache.h" #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/cache.h" +#elif CONFIG_IDF_TARGET_ESP32C61 +#include "esp32c61/rom/cache.h" #else #error Target CONFIG_IDF_TARGET is not supported #endif diff --git a/cores/esp32/esp32-hal-spi.c b/cores/esp32/esp32-hal-spi.c index 0555dfae095..378ae587858 100644 --- a/cores/esp32/esp32-hal-spi.c +++ b/cores/esp32/esp32-hal-spi.c @@ -26,7 +26,7 @@ #include "soc/io_mux_reg.h" #include "soc/gpio_sig_map.h" #include "soc/rtc.h" -#ifndef CONFIG_IDF_TARGET_ESP32C5 +#if !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32C61) #include "hal/clk_gate_ll.h" #endif #include "esp32-hal-periman.h" @@ -66,6 +66,9 @@ #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/ets_sys.h" #include "esp32c5/rom/gpio.h" +#elif CONFIG_IDF_TARGET_ESP32C61 +#include "esp32c61/rom/ets_sys.h" +#include "esp32c61/rom/gpio.h" #else #error Target CONFIG_IDF_TARGET is not supported #endif @@ -125,18 +128,7 @@ struct spi_struct_t { #define SPI_SS_IDX(p, n) ((p == 0) ? SPI_FSPI_SS_IDX(n) : ((p == 1) ? SPI_HSPI_SS_IDX(n) : 0)) -#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C5 -// ESP32C3 -#define SPI_COUNT (1) - -#define SPI_CLK_IDX(p) FSPICLK_OUT_IDX -#define SPI_MISO_IDX(p) FSPIQ_OUT_IDX -#define SPI_MOSI_IDX(p) FSPID_IN_IDX - -#define SPI_SPI_SS_IDX(n) ((n == 0) ? FSPICS0_OUT_IDX : ((n == 1) ? FSPICS1_OUT_IDX : ((n == 2) ? FSPICS2_OUT_IDX : FSPICS0_OUT_IDX))) -#define SPI_SS_IDX(p, n) SPI_SPI_SS_IDX(n) - -#else +#elif CONFIG_IDF_TARGET_ESP32 // ESP32 #define SPI_COUNT (4) @@ -149,6 +141,17 @@ struct spi_struct_t { #define SPI_VSPI_SS_IDX(n) ((n == 0) ? VSPICS0_OUT_IDX : ((n == 1) ? VSPICS1_OUT_IDX : ((n == 2) ? VSPICS2_OUT_IDX : VSPICS0_OUT_IDX))) #define SPI_SS_IDX(p, n) ((p == 0) ? SPI_SPI_SS_IDX(n) : ((p == 1) ? SPI_SPI_SS_IDX(n) : ((p == 2) ? SPI_HSPI_SS_IDX(n) : ((p == 3) ? SPI_VSPI_SS_IDX(n) : 0)))) +#else +// ESP32C2, C3, C5, C6, C61, H2 +#define SPI_COUNT (1) + +#define SPI_CLK_IDX(p) FSPICLK_OUT_IDX +#define SPI_MISO_IDX(p) FSPIQ_OUT_IDX +#define SPI_MOSI_IDX(p) FSPID_IN_IDX + +#define SPI_SPI_SS_IDX(n) ((n == 0) ? FSPICS0_OUT_IDX : ((n == 1) ? FSPICS1_OUT_IDX : ((n == 2) ? FSPICS2_OUT_IDX : FSPICS0_OUT_IDX))) +#define SPI_SS_IDX(p, n) SPI_SPI_SS_IDX(n) + #endif #if CONFIG_DISABLE_HAL_LOCKS @@ -159,17 +162,13 @@ static spi_t _spi_bus_array[] = { #if CONFIG_IDF_TARGET_ESP32S2 ||CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4 {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), 0, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI3_BASE), 1, -1, -1, -1, -1, false} -#elif CONFIG_IDF_TARGET_ESP32C2 - {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), 0, -1, -1, -1, -1, false} -#elif CONFIG_IDF_TARGET_ESP32C3 - {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), 0, -1, -1, -1, -1, false} -#elif CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C5 - {(spi_dev_t *)(DR_REG_SPI2_BASE), 0, -1, -1, -1, -1, false} -#else +#elif CONFIG_IDF_TARGET_ESP32 {(volatile spi_dev_t *)(DR_REG_SPI0_BASE), 0, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI1_BASE), 1, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), 2, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI3_BASE), 3, -1, -1, -1, -1, false} +#else // ESP32C2, C3, C5, C6, C61, H2 + {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), 0, -1, -1, -1, -1, false} #endif }; // clang-format on @@ -179,22 +178,21 @@ static spi_t _spi_bus_array[] = { } while (xSemaphoreTake(spi->lock, portMAX_DELAY) != pdPASS) #define SPI_MUTEX_UNLOCK() xSemaphoreGive(spi->lock) +// clang-format off static spi_t _spi_bus_array[] = { #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4 - {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 0, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI3_BASE), NULL, 1, -1, -1, -1, -1, false} -#elif CONFIG_IDF_TARGET_ESP32C2 - {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 0, -1, -1, -1, -1, false} -#elif CONFIG_IDF_TARGET_ESP32C3 - {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 0, -1, -1, -1, -1, false} -#elif CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C5 - {(spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 0, -1, -1, -1, -1, false} -#else + {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 0, -1, -1, -1, -1, false}, + {(volatile spi_dev_t *)(DR_REG_SPI3_BASE), NULL, 1, -1, -1, -1, -1, false} +#elif CONFIG_IDF_TARGET_ESP32 {(volatile spi_dev_t *)(DR_REG_SPI0_BASE), NULL, 0, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI1_BASE), NULL, 1, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 2, -1, -1, -1, -1, false}, {(volatile spi_dev_t *)(DR_REG_SPI3_BASE), NULL, 3, -1, -1, -1, -1, false} +#else // ESP32C2, C3, C5, C6, C61, H2 + {(volatile spi_dev_t *)(DR_REG_SPI2_BASE), NULL, 0, -1, -1, -1, -1, false} #endif }; +// clang-format on #endif static bool spiDetachBus(void *bus) { @@ -701,7 +699,7 @@ spi_t *spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_t spi->dev->clk_gate.clk_en = 1; spi->dev->clk_gate.mst_clk_sel = 1; spi->dev->clk_gate.mst_clk_active = 1; -#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32C3) +#if defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) spi->dev->dma_conf.tx_seg_trans_clr_en = 1; spi->dev->dma_conf.rx_seg_trans_clr_en = 1; spi->dev->dma_conf.dma_seg_trans_en = 0; @@ -712,10 +710,10 @@ spi_t *spiStartBus(uint8_t spi_num, uint32_t clockDiv, uint8_t dataMode, uint8_t spi->dev->user.doutdin = 1; int i; for (i = 0; i < 16; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = 0x00000000; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = 0x00000000; +#else + spi->dev->data_buf[i].val = 0x00000000; #endif } SPI_MUTEX_UNLOCK(); @@ -760,10 +758,10 @@ void spiWrite(spi_t *spi, const uint32_t *data, uint8_t len) { spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif for (i = 0; i < len; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = data[i]; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = data[i]; +#else + spi->dev->data_buf[i].val = data[i]; #endif } #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) @@ -787,10 +785,10 @@ void spiTransfer(spi_t *spi, uint32_t *data, uint8_t len) { spi->dev->mosi_dlen.usr_mosi_dbitlen = (len * 32) - 1; spi->dev->miso_dlen.usr_miso_dbitlen = (len * 32) - 1; for (i = 0; i < len; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = data[i]; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = data[i]; +#else + spi->dev->data_buf[i].val = data[i]; #endif } #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) @@ -800,10 +798,10 @@ void spiTransfer(spi_t *spi, uint32_t *data, uint8_t len) { spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); for (i = 0; i < len; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data[i] = spi->dev->data_buf[i].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data[i] = spi->dev->data_buf[i]; +#else + data[i] = spi->dev->data_buf[i].val; #endif } SPI_MUTEX_UNLOCK(); @@ -818,10 +816,10 @@ void spiWriteByte(spi_t *spi, uint8_t data) { #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32 spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) @@ -840,10 +838,10 @@ uint8_t spiTransferByte(spi_t *spi, uint8_t data) { SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 7; spi->dev->miso_dlen.usr_miso_dbitlen = 7; -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -851,10 +849,10 @@ uint8_t spiTransferByte(spi_t *spi, uint8_t data) { #endif spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data = spi->dev->data_buf[0].val & 0xFF; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data = spi->dev->data_buf[0] & 0xFF; +#else + data = spi->dev->data_buf[0].val & 0xFF; #endif SPI_MUTEX_UNLOCK(); return data; @@ -881,10 +879,10 @@ void spiWriteWord(spi_t *spi, uint16_t data) { #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32 spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -905,10 +903,10 @@ uint16_t spiTransferWord(spi_t *spi, uint16_t data) { SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 15; spi->dev->miso_dlen.usr_miso_dbitlen = 15; -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -916,10 +914,10 @@ uint16_t spiTransferWord(spi_t *spi, uint16_t data) { #endif spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data = spi->dev->data_buf[0].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data = spi->dev->data_buf[0]; +#else + data = spi->dev->data_buf[0].val; #endif SPI_MUTEX_UNLOCK(); if (!spi->dev->ctrl.rd_bit_order) { @@ -940,10 +938,10 @@ void spiWriteLong(spi_t *spi, uint32_t data) { #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32 spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -964,10 +962,10 @@ uint32_t spiTransferLong(spi_t *spi, uint32_t data) { SPI_MUTEX_LOCK(); spi->dev->mosi_dlen.usr_mosi_dbitlen = 31; spi->dev->miso_dlen.usr_miso_dbitlen = 31; -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -975,10 +973,10 @@ uint32_t spiTransferLong(spi_t *spi, uint32_t data) { #endif spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data = spi->dev->data_buf[0].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data = spi->dev->data_buf[0]; +#else + data = spi->dev->data_buf[0].val; #endif SPI_MUTEX_UNLOCK(); if (!spi->dev->ctrl.rd_bit_order) { @@ -1014,10 +1012,10 @@ static void __spiTransferBytes(spi_t *spi, const uint8_t *data, uint8_t *out, ui spi->dev->miso_dlen.usr_miso_dbitlen = ((bytes * 8) - 1); for (i = 0; i < words; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = wordsBuf[i]; //copy buffer to spi fifo -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = wordsBuf[i]; //copy buffer to spi fifo +#else + spi->dev->data_buf[i].val = wordsBuf[i]; //copy buffer to spi fifo #endif } @@ -1031,10 +1029,10 @@ static void __spiTransferBytes(spi_t *spi, const uint8_t *data, uint8_t *out, ui if (out) { for (i = 0; i < words; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - wordsBuf[i] = spi->dev->data_buf[i].val; //copy spi fifo to buffer -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 wordsBuf[i] = spi->dev->data_buf[i]; //copy spi fifo to buffer +#else + wordsBuf[i] = spi->dev->data_buf[i].val; //copy spi fifo to buffer #endif } memcpy(out, bytesBuf, bytes); //copy buffer to output @@ -1172,10 +1170,10 @@ void ARDUINO_ISR_ATTR spiWriteByteNL(spi_t *spi, uint8_t data) { #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32 spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -1191,10 +1189,10 @@ uint8_t spiTransferByteNL(spi_t *spi, uint8_t data) { } spi->dev->mosi_dlen.usr_mosi_dbitlen = 7; spi->dev->miso_dlen.usr_miso_dbitlen = 7; -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -1202,10 +1200,10 @@ uint8_t spiTransferByteNL(spi_t *spi, uint8_t data) { #endif spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data = spi->dev->data_buf[0].val & 0xFF; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data = spi->dev->data_buf[0] & 0xFF; +#else + data = spi->dev->data_buf[0].val & 0xFF; #endif return data; } @@ -1221,10 +1219,10 @@ void ARDUINO_ISR_ATTR spiWriteShortNL(spi_t *spi, uint16_t data) { #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32 spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -1243,10 +1241,10 @@ uint16_t spiTransferShortNL(spi_t *spi, uint16_t data) { } spi->dev->mosi_dlen.usr_mosi_dbitlen = 15; spi->dev->miso_dlen.usr_miso_dbitlen = 15; -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -1254,10 +1252,10 @@ uint16_t spiTransferShortNL(spi_t *spi, uint16_t data) { #endif spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data = spi->dev->data_buf[0].val & 0xFFFF; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data = spi->dev->data_buf[0] & 0xFFFF; +#else + data = spi->dev->data_buf[0].val & 0xFFFF; #endif if (!spi->dev->ctrl.rd_bit_order) { MSB_16_SET(data, data); @@ -1276,10 +1274,10 @@ void ARDUINO_ISR_ATTR spiWriteLongNL(spi_t *spi, uint32_t data) { #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32 spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -1298,10 +1296,10 @@ uint32_t spiTransferLongNL(spi_t *spi, uint32_t data) { } spi->dev->mosi_dlen.usr_mosi_dbitlen = 31; spi->dev->miso_dlen.usr_miso_dbitlen = 31; -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -1309,10 +1307,10 @@ uint32_t spiTransferLongNL(spi_t *spi, uint32_t data) { #endif spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data = spi->dev->data_buf[0].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data = spi->dev->data_buf[0]; +#else + data = spi->dev->data_buf[0].val; #endif if (!spi->dev->ctrl.rd_bit_order) { MSB_32_SET(data, data); @@ -1340,10 +1338,10 @@ void spiWriteNL(spi_t *spi, const void *data_in, uint32_t len) { spi->dev->miso_dlen.usr_miso_dbitlen = 0; #endif for (size_t i = 0; i < c_longs; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = data[i]; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = data[i]; +#else + spi->dev->data_buf[i].val = data[i]; #endif } #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) @@ -1379,18 +1377,18 @@ void spiTransferBytesNL(spi_t *spi, const void *data_in, uint8_t *data_out, uint spi->dev->miso_dlen.usr_miso_dbitlen = (c_len * 8) - 1; if (data) { for (size_t i = 0; i < c_longs; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = data[i]; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = data[i]; +#else + spi->dev->data_buf[i].val = data[i]; #endif } } else { for (size_t i = 0; i < c_longs; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = 0xFFFFFFFF; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = 0xFFFFFFFF; +#else + spi->dev->data_buf[i].val = 0xFFFFFFFF; #endif } } @@ -1403,16 +1401,16 @@ void spiTransferBytesNL(spi_t *spi, const void *data_in, uint8_t *data_out, uint if (result) { if (c_len & 3) { for (size_t i = 0; i < (c_longs - 1); i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - result[i] = spi->dev->data_buf[i].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 result[i] = spi->dev->data_buf[i]; +#else + result[i] = spi->dev->data_buf[i].val; #endif } -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - uint32_t last_data = spi->dev->data_buf[c_longs - 1].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 uint32_t last_data = spi->dev->data_buf[c_longs - 1]; +#else + uint32_t last_data = spi->dev->data_buf[c_longs - 1].val; #endif uint8_t *last_out8 = (uint8_t *)&result[c_longs - 1]; uint8_t *last_data8 = (uint8_t *)&last_data; @@ -1421,10 +1419,10 @@ void spiTransferBytesNL(spi_t *spi, const void *data_in, uint8_t *data_out, uint } } else { for (size_t i = 0; i < c_longs; i++) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - result[i] = spi->dev->data_buf[i].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 result[i] = spi->dev->data_buf[i]; +#else + result[i] = spi->dev->data_buf[i].val; #endif } } @@ -1463,10 +1461,10 @@ void spiTransferBitsNL(spi_t *spi, uint32_t data, uint32_t *out, uint8_t bits) { spi->dev->mosi_dlen.usr_mosi_dbitlen = (bits - 1); spi->dev->miso_dlen.usr_miso_dbitlen = (bits - 1); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[0].val = data; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[0] = data; +#else + spi->dev->data_buf[0].val = data; #endif #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) spi->dev->cmd.update = 1; @@ -1474,10 +1472,10 @@ void spiTransferBitsNL(spi_t *spi, uint32_t data, uint32_t *out, uint8_t bits) { #endif spi->dev->cmd.usr = 1; while (spi->dev->cmd.usr); -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - data = spi->dev->data_buf[0].val; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 data = spi->dev->data_buf[0]; +#else + data = spi->dev->data_buf[0].val; #endif if (out) { *out = data; @@ -1515,30 +1513,30 @@ void ARDUINO_ISR_ATTR spiWritePixelsNL(spi_t *spi, const void *data_in, uint32_t if (msb) { if (l_bytes && i == (c_longs - 1)) { if (l_bytes == 2) { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - MSB_16_SET(spi->dev->data_buf[i].val, data[i]); -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 MSB_16_SET(spi->dev->data_buf[i], data[i]); +#else + MSB_16_SET(spi->dev->data_buf[i].val, data[i]); #endif } else { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = data[i] & 0xFF; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = data[i] & 0xFF; +#else + spi->dev->data_buf[i].val = data[i] & 0xFF; #endif } } else { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - MSB_PIX_SET(spi->dev->data_buf[i].val, data[i]); -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 MSB_PIX_SET(spi->dev->data_buf[i], data[i]); +#else + MSB_PIX_SET(spi->dev->data_buf[i].val, data[i]); #endif } } else { -#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5 - spi->dev->data_buf[i].val = data[i]; -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 spi->dev->data_buf[i] = data[i]; +#else + spi->dev->data_buf[i].val = data[i]; #endif } } diff --git a/cores/esp32/esp32-hal-spi.h b/cores/esp32/esp32-hal-spi.h index 0284fea8829..b83d199c54d 100644 --- a/cores/esp32/esp32-hal-spi.h +++ b/cores/esp32/esp32-hal-spi.h @@ -32,7 +32,7 @@ extern "C" { #define HSPI 2 //SPI 2 bus normally mapped to pins 12 - 15, but can be matrixed to any pins #define VSPI 3 //SPI 3 bus normally attached to pins 5, 18, 19 and 23, but can be matrixed to any pins #else -#define FSPI 0 // ESP32C2, C3, C6, H2, S2, S3, P4 - SPI 2 bus +#define FSPI 0 // ESP32C2, C3, C5, C6, C61, H2, S2, S3, P4 - SPI 2 bus #define HSPI 1 // ESP32S2, S3, P4 - SPI 3 bus #endif diff --git a/cores/esp32/esp32-hal.h b/cores/esp32/esp32-hal.h index 84c73577d3e..e3a1f6e4dde 100644 --- a/cores/esp32/esp32-hal.h +++ b/cores/esp32/esp32-hal.h @@ -63,7 +63,8 @@ extern "C" { #if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 static const uint8_t BOOT_PIN = 0; -#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C61 +#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32C61 || CONFIG_IDF_TARGET_ESP32H2 \ + || CONFIG_IDF_TARGET_ESP32C61 static const uint8_t BOOT_PIN = 9; #elif CONFIG_IDF_TARGET_ESP32P4 static const uint8_t BOOT_PIN = 35; diff --git a/docs/en/lib_builder.rst b/docs/en/lib_builder.rst index a8126c18edc..6c0693420ad 100644 --- a/docs/en/lib_builder.rst +++ b/docs/en/lib_builder.rst @@ -153,7 +153,9 @@ This build command will build for the ESP32-S3 target. You can specify other tar * esp32 * esp32c2 * esp32c3 +* esp32c5 * esp32c6 +* esp32c61 * esp32h2 * esp32p4 * esp32s2 @@ -211,7 +213,8 @@ Pre-Configuring the UI The UI can be pre-configured using command line arguments. The following arguments are available: - ``-t, --target ``: Comma-separated list of targets to be compiled. - Choose from: *all*, *esp32*, *esp32s2*, *esp32s3*, *esp32c2*, *esp32c3*, *esp32c6*, *esp32h2*. Default: all except *esp32c2*; + Choose from: *all*, *esp32*, *esp32c2*, *esp32c3*, *esp32c5*, *esp32c6*, *esp32c61*, *esp32h2*, *esp32s2*, *esp32s3*. + Default: all except *esp32c2* and *esp32c61*; - ``--copy, --no-copy``: Enable/disable copying the compiled libraries to ``arduino-esp32``. Enabled by default; - ``-c, --arduino-path ``: Path to ``arduino-esp32`` directory. Default: OS dependent; - ``-A, --arduino-branch ``: Branch of the ``arduino-esp32`` repository to be used. Default: set by the build script; diff --git a/idf_component.yml b/idf_component.yml index 5d52c8f8c8f..3e376391af2 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -7,6 +7,7 @@ targets: - esp32c3 - esp32c5 - esp32c6 + - esp32c61 - esp32h2 - esp32p4 - esp32s2 @@ -20,6 +21,7 @@ files: - "variants/esp32c3/**/*" - "variants/esp32c5/**/*" - "variants/esp32c6/**/*" + - "variants/esp32c61/**/*" - "variants/esp32h2/**/*" - "variants/esp32p4/**/*" - "variants/esp32s2/**/*" @@ -57,16 +59,16 @@ dependencies: version: "==1.6.4" # compatible with esp-zigbee-lib 1.6.8 require: public rules: - - if: "target not in [esp32c2, esp32p4]" + - if: "target not in [esp32c2, esp32c61, esp32p4]" espressif/esp-zigbee-lib: version: "==1.6.8" require: public rules: - - if: "target not in [esp32c2, esp32p4]" + - if: "target not in [esp32c2, esp32c61, esp32p4]" espressif/esp-dsp: version: "^1.3.4" rules: - - if: "target != esp32c2" + - if: "target not in [esp32c2, esp32c61]" # RainMaker Start (Fixed versions, because Matter supports only Insights 1.0.1) espressif/network_provisioning: version: "1.0.2" @@ -132,4 +134,4 @@ dependencies: examples: - path: ./idf_component_examples/hello_world - path: ./idf_component_examples/hw_cdc_hello_world - - path: ./idf_component_examples/esp_matter_light + - path: ./idf_component_examples/Arduino_ESP_Matter_over_OpenThread diff --git a/idf_component_examples/Arduino_ESP_Matter_over_OpenThread/ci.yml b/idf_component_examples/Arduino_ESP_Matter_over_OpenThread/ci.yml index 8fde8e9096c..b826c20507e 100644 --- a/idf_component_examples/Arduino_ESP_Matter_over_OpenThread/ci.yml +++ b/idf_component_examples/Arduino_ESP_Matter_over_OpenThread/ci.yml @@ -2,6 +2,7 @@ targets: esp32s2: false esp32s3: false esp32c2: false + esp32c61: false esp32p4: false requires: - CONFIG_OPENTHREAD_ENABLED=y diff --git a/libraries/ESP32/examples/ResetReason/ResetReason/ResetReason.ino b/libraries/ESP32/examples/ResetReason/ResetReason/ResetReason.ino index ca7e15bf479..fe047b242e1 100644 --- a/libraries/ESP32/examples/ResetReason/ResetReason/ResetReason.ino +++ b/libraries/ESP32/examples/ResetReason/ResetReason/ResetReason.ino @@ -30,6 +30,8 @@ #include "esp32p4/rom/rtc.h" #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/rtc.h" +#elif CONFIG_IDF_TARGET_ESP32C61 +#include "esp32c61/rom/rtc.h" #else #error Target CONFIG_IDF_TARGET is not supported #endif diff --git a/libraries/SPI/src/SPI.cpp b/libraries/SPI/src/SPI.cpp index 6229f887553..673301a8e15 100644 --- a/libraries/SPI/src/SPI.cpp +++ b/libraries/SPI/src/SPI.cpp @@ -79,22 +79,21 @@ bool SPIClass::begin(int8_t sck, int8_t miso, int8_t mosi, int8_t ss) { } if (sck == -1 && miso == -1 && mosi == -1 && ss == -1) { -#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 +#if CONFIG_IDF_TARGET_ESP32 + _sck = (_spi_num == VSPI) ? SCK : 14; + _miso = (_spi_num == VSPI) ? MISO : 12; + _mosi = (_spi_num == VSPI) ? MOSI : 13; + _ss = (_spi_num == VSPI) ? SS : 15; +#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 _sck = (_spi_num == FSPI) ? SCK : -1; _miso = (_spi_num == FSPI) ? MISO : -1; _mosi = (_spi_num == FSPI) ? MOSI : -1; _ss = (_spi_num == FSPI) ? SS : -1; -#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32P4 \ - || CONFIG_IDF_TARGET_ESP32C5 +#else _sck = SCK; _miso = MISO; _mosi = MOSI; _ss = SS; -#else - _sck = (_spi_num == VSPI) ? SCK : 14; - _miso = (_spi_num == VSPI) ? MISO : 12; - _mosi = (_spi_num == VSPI) ? MOSI : 13; - _ss = (_spi_num == VSPI) ? SS : 15; #endif } else { _sck = sck; diff --git a/platform.txt b/platform.txt index f346d385b90..9d5184d92eb 100644 --- a/platform.txt +++ b/platform.txt @@ -85,6 +85,7 @@ build.extra_flags.esp32c6=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build. build.extra_flags.esp32h2=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} build.extra_flags.esp32p4=-DARDUINO_USB_MODE={build.usb_mode} -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} -DARDUINO_USB_MSC_ON_BOOT={build.msc_on_boot} -DARDUINO_USB_DFU_ON_BOOT={build.dfu_on_boot} build.extra_flags.esp32c5=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} +build.extra_flags.esp32c61=-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} # This can be overriden in boards.txt build.zigbee_mode= diff --git a/tests/requirements.txt b/tests/requirements.txt index bf7b600352e..93d4ec88208 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,8 +1,8 @@ cryptography==44.0.1 --only-binary cryptography pytest-cov==5.0.0 -pytest-embedded-serial-esp==2.1.2 -pytest-embedded-arduino==2.1.2 -pytest-embedded-wokwi==2.1.2 -pytest-embedded-qemu==2.1.2 +pytest-embedded-serial-esp==2.4.0 +pytest-embedded-arduino==2.4.0 +pytest-embedded-wokwi==2.4.0 +pytest-embedded-qemu==2.4.0 esptool==5.1.0 diff --git a/variants/esp32c61/pins_arduino.h b/variants/esp32c61/pins_arduino.h new file mode 100644 index 00000000000..dd25d0e53e7 --- /dev/null +++ b/variants/esp32c61/pins_arduino.h @@ -0,0 +1,37 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define PIN_RGB_LED 8 +// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() +#define RGB_BUILTIN LED_BUILTIN +#define RGB_BRIGHTNESS 64 + +static const uint8_t TX = 11; +static const uint8_t RX = 10; + +static const uint8_t SDA = 23; +static const uint8_t SCL = 22; + +static const uint8_t SS = 25; +static const uint8_t MOSI = 26; +static const uint8_t MISO = 27; +static const uint8_t SCK = 28; + +static const uint8_t A0 = 0; +static const uint8_t A1 = 1; +static const uint8_t A2 = 2; +static const uint8_t A3 = 3; + +// LP I2C Pins are fixed on ESP32-C61 +#define WIRE1_PIN_DEFINED +static const uint8_t SDA1 = 6; +static const uint8_t SCL1 = 7; + +#endif /* Pins_Arduino_h */ From d027ba16f1e4d3b56d674175549c3252a06f563b Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:25:45 -0300 Subject: [PATCH 33/38] tests(wifi): Fix argument passing --- .github/scripts/tests_run.sh | 2 -- .gitlab/workflows/hw_test_template.yml | 2 +- tests/validation/wifi/test_wifi.py | 4 ++-- tests/validation/wifi/wifi.ino | 19 ++++++++++++++++++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/scripts/tests_run.sh b/.github/scripts/tests_run.sh index 21590ef31df..e56518e9745 100755 --- a/.github/scripts/tests_run.sh +++ b/.github/scripts/tests_run.sh @@ -92,7 +92,6 @@ function run_test { if [[ -f "$sketchdir/diagram.$target.json" ]]; then extra_args+=("--wokwi-diagram" "$sketchdir/diagram.$target.json") fi - elif [ $platform == "qemu" ]; then PATH=$HOME/qemu/bin:$PATH extra_args=("--embedded-services" "qemu" "--qemu-image-path" "$build_dir/$sketchname.ino.merged.bin") @@ -161,7 +160,6 @@ while [ -n "$1" ]; do platform="qemu" ;; -W ) - shift if [[ -z $WOKWI_CLI_TOKEN ]]; then echo "Wokwi CLI token is not set" exit 1 diff --git a/.gitlab/workflows/hw_test_template.yml b/.gitlab/workflows/hw_test_template.yml index 5196291a453..f0fddebcd0e 100644 --- a/.gitlab/workflows/hw_test_template.yml +++ b/.gitlab/workflows/hw_test_template.yml @@ -12,13 +12,13 @@ include: hw-test-template: stage: test image: python:3.12-bookworm + timeout: 5h rules: - when: on_success variables: RUNNER_SCRIPT_TIMEOUT: 4h - RUNNER_AFTER_SCRIPT_TIMEOUT: 2h DEBIAN_FRONTEND: "noninteractive" TEST_TYPE: $TEST_TYPE TEST_CHIP: $TEST_CHIP diff --git a/tests/validation/wifi/test_wifi.py b/tests/validation/wifi/test_wifi.py index 0bd3444a51b..39ec154ffdc 100644 --- a/tests/validation/wifi/test_wifi.py +++ b/tests/validation/wifi/test_wifi.py @@ -15,11 +15,11 @@ def test_wifi(dut, wifi_ssid, wifi_pass): dut.expect_exact("Send SSID:") LOGGER.info(f"Sending WiFi credentials: SSID={wifi_ssid}") - dut.write(f"{wifi_ssid}") + dut.write(f"{wifi_ssid}\n") dut.expect_exact("Send Password:") LOGGER.info(f"Sending WiFi password: Password={wifi_pass}") - dut.write(f"{wifi_pass or ''}") + dut.write(f"{wifi_pass or ''}\n") # Verify credentials were received dut.expect_exact(f"SSID: {wifi_ssid}") diff --git a/tests/validation/wifi/wifi.ino b/tests/validation/wifi/wifi.ino index 768c85a04d0..4f33b1524a4 100644 --- a/tests/validation/wifi/wifi.ino +++ b/tests/validation/wifi/wifi.ino @@ -89,6 +89,12 @@ void WiFiGotIP(WiFiEvent_t event, WiFiEventInfo_t info) { void readWiFiCredentials() { Serial.println("Waiting for WiFi credentials..."); + + // Flush any existing data in serial buffer + while (Serial.available()) { + Serial.read(); + } + Serial.println("Send SSID:"); // Wait for SSID @@ -100,11 +106,17 @@ void readWiFiCredentials() { delay(100); } + // Flush any remaining data from SSID input + while (Serial.available()) { + Serial.read(); + } + Serial.println("Send Password:"); // Wait for password (allow empty password) bool password_received = false; - while (!password_received) { + unsigned long timeout = millis() + 10000; // 10 second timeout + while (!password_received && millis() < timeout) { if (Serial.available()) { password = Serial.readStringUntil('\n'); password.trim(); @@ -113,6 +125,11 @@ void readWiFiCredentials() { delay(100); } + // Flush any remaining data + while (Serial.available()) { + Serial.read(); + } + Serial.print("SSID: "); Serial.println(ssid); Serial.print("Password: "); From 228acb8c08654dea67cc27ef6ab0759057fe822b Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Sat, 22 Nov 2025 10:09:37 -0300 Subject: [PATCH 34/38] feat(flash_args): Add file with flash parameters for the built image (#12056) * feat(flash_args): Add file with flash parameters for the built image * fix(ci): Fix paths order --- .github/workflows/build_component.yml | 2 +- .github/workflows/push.yml | 4 ++-- platform.txt | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_component.yml b/.github/workflows/build_component.yml index 7a11ca768ec..f69532d021d 100644 --- a/.github/workflows/build_component.yml +++ b/.github/workflows/build_component.yml @@ -26,7 +26,6 @@ on: - "idf_component_examples/**" - "idf_component.yml" - "Kconfig.projbuild" - - "CMakeLists.txt" - ".github/workflows/build_component.yml" - ".github/scripts/check-cmakelists.sh" - ".github/scripts/on-push-idf.sh" @@ -45,6 +44,7 @@ on: - "!*.md" - "!*.txt" - "!*.properties" + - "CMakeLists.txt" permissions: contents: read diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 67ae7505c04..0dd76135dd9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -32,8 +32,6 @@ on: - "libraries/**/ci.yml" - "package/**" - "tools/get.*" - - "platform.txt" - - "programmers.txt" - "package.json" - ".github/workflows/push.yml" - ".github/scripts/install-*" @@ -51,6 +49,8 @@ on: - "!*.md" - "!*.txt" - "!*.properties" + - "platform.txt" + - "programmers.txt" concurrency: group: build-${{github.event.pull_request.number || github.ref}} diff --git a/platform.txt b/platform.txt index 9d5184d92eb..4bab878172a 100644 --- a/platform.txt +++ b/platform.txt @@ -182,6 +182,10 @@ recipe.hooks.objcopy.postobjcopy.2.pattern.windows=cmd /c if exist "{build.path} recipe.hooks.objcopy.postobjcopy.3.pattern_args=--chip {build.mcu} merge-bin -o "{build.path}/{build.project_name}.merged.bin" --pad-to-size {build.flash_size} --flash-mode keep --flash-freq keep --flash-size keep {build.bootloader_addr} "{build.path}/{build.project_name}.bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x10000 "{build.path}/{build.project_name}.bin" recipe.hooks.objcopy.postobjcopy.3.pattern="{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.hooks.objcopy.postobjcopy.3.pattern_args} +# Generate flash_args file +recipe.hooks.objcopy.postobjcopy.4.pattern=/usr/bin/env bash -c "echo '--flash-mode {build.flash_mode} --flash-freq {build.img_freq} --flash-size {build.flash_size}' > '{build.path}/flash_args' && echo '{build.bootloader_addr} {build.project_name}.bootloader.bin' >> '{build.path}/flash_args' && echo '0x8000 {build.project_name}.partitions.bin' >> '{build.path}/flash_args' && echo '0xe000 boot_app0.bin' >> '{build.path}/flash_args' && echo '0x10000 {build.project_name}.bin' >> '{build.path}/flash_args'" +recipe.hooks.objcopy.postobjcopy.4.pattern.windows=cmd /c echo --flash-mode {build.flash_mode} --flash-freq {build.img_freq} --flash-size {build.flash_size} > "{build.path}\flash_args" && echo {build.bootloader_addr} {build.project_name}.bootloader.bin >> "{build.path}\flash_args" && echo 0x8000 {build.project_name}.partitions.bin >> "{build.path}\flash_args" && echo 0xe000 boot_app0.bin >> "{build.path}\flash_args" && echo 0x10000 {build.project_name}.bin >> "{build.path}\flash_args" + ## Save bin recipe.output.tmp_file={build.project_name}.bin recipe.output.save_file={build.project_name}.{build.variant}.bin From 0055aed2f771c7832c8d77a3237b9eef55726540 Mon Sep 17 00:00:00 2001 From: Oros Date: Sat, 22 Nov 2025 23:49:57 +0100 Subject: [PATCH 35/38] Fix size of rssi in toString() (#12058) --- libraries/BLE/src/BLEAdvertisedDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/BLE/src/BLEAdvertisedDevice.cpp b/libraries/BLE/src/BLEAdvertisedDevice.cpp index 8a9f7349d0f..9fe330933c3 100644 --- a/libraries/BLE/src/BLEAdvertisedDevice.cpp +++ b/libraries/BLE/src/BLEAdvertisedDevice.cpp @@ -605,7 +605,7 @@ String BLEAdvertisedDevice::toString() { res += val; } if (haveRSSI()) { - char val[4]; + char val[5]; snprintf(val, sizeof(val), "%i", getRSSI()); res += ", rssi: "; res += val; From 1a0c4b3f29edc655d15854a657365b3387371460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20=C5=A0imun=20Ku=C4=8Di?= <131808461+JosipKuci@users.noreply.github.com> Date: Mon, 24 Nov 2025 08:55:22 +0100 Subject: [PATCH 36/38] feat(board): add support for Soldered NULA DeepSleep ESP32S3 (#12048) * feat(board): add support for Soldered NULA DeepSleep ESP32S3 - Add board configuration to `boards.txt` - Add pin definitions to 'variants/soldered_nula_deepsleep_esp32s3' * fix(board): remove unsupported partition scheme - Remove unsupported partition scheme which exceeds the boards flash size * fix(board): Limit custom partition scheme to 8MB - Limit the partition scheme from 16MB to 8MB * fix(board): fix flash size and Minimal SPIFFS partitions scheme - Set flash size to MB instead of 4MB - Update the partition size of the Minimal SPIFFS to 128KB --- boards.txt | 228 ++++++++++++++++++ .../pins_arduino.h | 56 +++++ 2 files changed, 284 insertions(+) create mode 100644 variants/soldered_nula_deepsleep_esp32s3/pins_arduino.h diff --git a/boards.txt b/boards.txt index 8fdd268ce20..77a0f6f5d4a 100644 --- a/boards.txt +++ b/boards.txt @@ -52965,6 +52965,234 @@ axiometa_pixie_m1.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api.zczr -lzbo ############################################################## +soldered_nula_deepsleep_esp32s3.name=Soldered NULA DeepSleep ESP32S3 + +soldered_nula_deepsleep_esp32s3.bootloader.tool=esptool_py +soldered_nula_deepsleep_esp32s3.bootloader.tool.default=esptool_py + +soldered_nula_deepsleep_esp32s3.upload.tool=esptool_py +soldered_nula_deepsleep_esp32s3.upload.tool.default=esptool_py +soldered_nula_deepsleep_esp32s3.upload.tool.network=esp_ota + +soldered_nula_deepsleep_esp32s3.upload.maximum_size=1310720 +soldered_nula_deepsleep_esp32s3.upload.maximum_data_size=327680 +soldered_nula_deepsleep_esp32s3.upload.flags= +soldered_nula_deepsleep_esp32s3.upload.extra_flags= +soldered_nula_deepsleep_esp32s3.upload.use_1200bps_touch=false +soldered_nula_deepsleep_esp32s3.upload.wait_for_upload_port=false + +soldered_nula_deepsleep_esp32s3.serial.disableDTR=false +soldered_nula_deepsleep_esp32s3.serial.disableRTS=false + +soldered_nula_deepsleep_esp32s3.build.tarch=xtensa +soldered_nula_deepsleep_esp32s3.build.bootloader_addr=0x0 +soldered_nula_deepsleep_esp32s3.build.target=esp32s3 +soldered_nula_deepsleep_esp32s3.build.mcu=esp32s3 +soldered_nula_deepsleep_esp32s3.build.core=esp32 +soldered_nula_deepsleep_esp32s3.build.variant=soldered_nula_deepsleep_esp32s3 +soldered_nula_deepsleep_esp32s3.build.board=NULA_DEEPSLEEP + +soldered_nula_deepsleep_esp32s3.build.usb_mode=1 +soldered_nula_deepsleep_esp32s3.build.cdc_on_boot=0 +soldered_nula_deepsleep_esp32s3.build.msc_on_boot=0 +soldered_nula_deepsleep_esp32s3.build.dfu_on_boot=0 +soldered_nula_deepsleep_esp32s3.build.f_cpu=240000000L +soldered_nula_deepsleep_esp32s3.build.flash_size=8MB +soldered_nula_deepsleep_esp32s3.build.flash_freq=80m +soldered_nula_deepsleep_esp32s3.build.flash_mode=dio +soldered_nula_deepsleep_esp32s3.build.boot=qio +soldered_nula_deepsleep_esp32s3.build.boot_freq=80m +soldered_nula_deepsleep_esp32s3.build.partitions=default +soldered_nula_deepsleep_esp32s3.build.defines= +soldered_nula_deepsleep_esp32s3.build.loop_core= +soldered_nula_deepsleep_esp32s3.build.event_core= +soldered_nula_deepsleep_esp32s3.build.psram_type=opi +soldered_nula_deepsleep_esp32s3.build.memory_type={build.boot}_{build.psram_type} + +## IDE 2.0 Seems to not update the value +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.default=Disabled +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.default.build.copy_jtag_files=0 +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.builtin=Integrated USB JTAG +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1 +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.external=FTDI Adapter +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.external.build.copy_jtag_files=1 +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.bridge=ESP USB Bridge +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg +soldered_nula_deepsleep_esp32s3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 + +soldered_nula_deepsleep_esp32s3.menu.PSRAM.enabled=OPI PSRAM +soldered_nula_deepsleep_esp32s3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +soldered_nula_deepsleep_esp32s3.menu.PSRAM.enabled.build.psram_type=opi +soldered_nula_deepsleep_esp32s3.menu.PSRAM.disabled=disabled +soldered_nula_deepsleep_esp32s3.menu.PSRAM.disabled.build.defines= + +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio=QIO 80MHz +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio.build.flash_mode=dio +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio.build.boot=qio +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio.build.boot_freq=80m +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio.build.flash_freq=80m +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio120=QIO 120MHz +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio120.build.flash_mode=dio +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio120.build.boot=qio +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio120.build.boot_freq=120m +soldered_nula_deepsleep_esp32s3.menu.FlashMode.qio120.build.flash_freq=80m +soldered_nula_deepsleep_esp32s3.menu.FlashMode.dio=DIO 80MHz +soldered_nula_deepsleep_esp32s3.menu.FlashMode.dio.build.flash_mode=dio +soldered_nula_deepsleep_esp32s3.menu.FlashMode.dio.build.boot=dio +soldered_nula_deepsleep_esp32s3.menu.FlashMode.dio.build.boot_freq=80m +soldered_nula_deepsleep_esp32s3.menu.FlashMode.dio.build.flash_freq=80m +soldered_nula_deepsleep_esp32s3.menu.FlashMode.opi=OPI 80MHz +soldered_nula_deepsleep_esp32s3.menu.FlashMode.opi.build.flash_mode=dout +soldered_nula_deepsleep_esp32s3.menu.FlashMode.opi.build.boot=opi +soldered_nula_deepsleep_esp32s3.menu.FlashMode.opi.build.boot_freq=80m +soldered_nula_deepsleep_esp32s3.menu.FlashMode.opi.build.flash_freq=80m + +soldered_nula_deepsleep_esp32s3.menu.FlashSize.8M=8MB (64Mb) +soldered_nula_deepsleep_esp32s3.menu.FlashSize.8M.build.flash_size=8MB + +soldered_nula_deepsleep_esp32s3.menu.LoopCore.1=Core 1 +soldered_nula_deepsleep_esp32s3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +soldered_nula_deepsleep_esp32s3.menu.LoopCore.0=Core 0 +soldered_nula_deepsleep_esp32s3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +soldered_nula_deepsleep_esp32s3.menu.EventsCore.1=Core 1 +soldered_nula_deepsleep_esp32s3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +soldered_nula_deepsleep_esp32s3.menu.EventsCore.0=Core 0 +soldered_nula_deepsleep_esp32s3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +soldered_nula_deepsleep_esp32s3.menu.USBMode.hwcdc=Hardware CDC and JTAG +soldered_nula_deepsleep_esp32s3.menu.USBMode.hwcdc.build.usb_mode=1 +soldered_nula_deepsleep_esp32s3.menu.USBMode.default=USB-OTG (TinyUSB) +soldered_nula_deepsleep_esp32s3.menu.USBMode.default.build.usb_mode=0 + +soldered_nula_deepsleep_esp32s3.menu.CDCOnBoot.default=Disabled +soldered_nula_deepsleep_esp32s3.menu.CDCOnBoot.default.build.cdc_on_boot=0 +soldered_nula_deepsleep_esp32s3.menu.CDCOnBoot.cdc=Enabled +soldered_nula_deepsleep_esp32s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 + +soldered_nula_deepsleep_esp32s3.menu.MSCOnBoot.default=Disabled +soldered_nula_deepsleep_esp32s3.menu.MSCOnBoot.default.build.msc_on_boot=0 +soldered_nula_deepsleep_esp32s3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +soldered_nula_deepsleep_esp32s3.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +soldered_nula_deepsleep_esp32s3.menu.DFUOnBoot.default=Disabled +soldered_nula_deepsleep_esp32s3.menu.DFUOnBoot.default.build.dfu_on_boot=0 +soldered_nula_deepsleep_esp32s3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +soldered_nula_deepsleep_esp32s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +soldered_nula_deepsleep_esp32s3.menu.UploadMode.default=UART0 / Hardware CDC +soldered_nula_deepsleep_esp32s3.menu.UploadMode.default.upload.use_1200bps_touch=false +soldered_nula_deepsleep_esp32s3.menu.UploadMode.default.upload.wait_for_upload_port=false +soldered_nula_deepsleep_esp32s3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +soldered_nula_deepsleep_esp32s3.menu.UploadMode.cdc.upload.use_1200bps_touch=true +soldered_nula_deepsleep_esp32s3.menu.UploadMode.cdc.upload.wait_for_upload_port=true + +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.default.build.partitions=default +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.minimal.build.partitions=minimal +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.no_fs=No FS 4MB (2MB APP x2) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.no_fs.build.partitions=no_fs +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.no_fs.upload.maximum_size=2031616 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.no_ota.build.partitions=no_ota +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.huge_app.build.partitions=huge_app +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS) +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker=RainMaker 4MB +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker.upload.maximum_size=1966080 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker_4MB=RainMaker 4MB No OTA +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker_4MB.build.partitions=rainmaker_4MB_no_ota +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker_4MB.upload.maximum_size=4038656 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker_8MB=RainMaker 8MB +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker_8MB.build.partitions=rainmaker_8MB +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.rainmaker_8MB.upload.maximum_size=4096000 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.zigbee_zczr=Zigbee ZCZR 4MB with spiffs +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.zigbee_zczr.build.partitions=zigbee_zczr +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.zigbee_zczr.upload.maximum_size=1310720 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.zigbee_zczr_8MB=Zigbee ZCZR 8MB with spiffs +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.zigbee_zczr_8MB.build.partitions=zigbee_zczr_8MB +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.zigbee_zczr_8MB.upload.maximum_size=3407872 +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.custom=Custom +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.custom.build.partitions= +soldered_nula_deepsleep_esp32s3.menu.PartitionScheme.custom.upload.maximum_size=8388608 + +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.240=240MHz (WiFi) +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.240.build.f_cpu=240000000L +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.160=160MHz (WiFi) +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.160.build.f_cpu=160000000L +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.80=80MHz (WiFi) +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.80.build.f_cpu=80000000L +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.40=40MHz +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.40.build.f_cpu=40000000L +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.20=20MHz +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.20.build.f_cpu=20000000L +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.10=10MHz +soldered_nula_deepsleep_esp32s3.menu.CPUFreq.10.build.f_cpu=10000000L + +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.921600=921600 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.921600.upload.speed=921600 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.115200=115200 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.115200.upload.speed=115200 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.256000.windows=256000 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.256000.upload.speed=256000 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.230400.windows.upload.speed=256000 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.230400=230400 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.230400.upload.speed=230400 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.460800.linux=460800 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.460800.macosx=460800 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.460800.upload.speed=460800 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.512000.windows=512000 +soldered_nula_deepsleep_esp32s3.menu.UploadSpeed.512000.upload.speed=512000 + +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.none=None +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.none.build.code_debug=0 +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.error=Error +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.error.build.code_debug=1 +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.warn=Warn +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.warn.build.code_debug=2 +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.info=Info +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.info.build.code_debug=3 +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.debug=Debug +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.debug.build.code_debug=4 +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.verbose=Verbose +soldered_nula_deepsleep_esp32s3.menu.DebugLevel.verbose.build.code_debug=5 + +soldered_nula_deepsleep_esp32s3.menu.EraseFlash.none=Disabled +soldered_nula_deepsleep_esp32s3.menu.EraseFlash.none.upload.erase_cmd= +soldered_nula_deepsleep_esp32s3.menu.EraseFlash.all=Enabled +soldered_nula_deepsleep_esp32s3.menu.EraseFlash.all.upload.erase_cmd=-e + +soldered_nula_deepsleep_esp32s3.menu.ZigbeeMode.default=Disabled +soldered_nula_deepsleep_esp32s3.menu.ZigbeeMode.default.build.zigbee_mode= +soldered_nula_deepsleep_esp32s3.menu.ZigbeeMode.default.build.zigbee_libs= +soldered_nula_deepsleep_esp32s3.menu.ZigbeeMode.zczr=Zigbee ZCZR (coordinator/router) +soldered_nula_deepsleep_esp32s3.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR +soldered_nula_deepsleep_esp32s3.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api.zczr -lzboss_stack.zczr -lzboss_port.remote + +############################################################## + soldered_nula_mini_esp32c6.name=Soldered NULA Mini ESP32C6 soldered_nula_mini_esp32c6.bootloader.tool=esptool_py diff --git a/variants/soldered_nula_deepsleep_esp32s3/pins_arduino.h b/variants/soldered_nula_deepsleep_esp32s3/pins_arduino.h new file mode 100644 index 00000000000..9819aa4f10b --- /dev/null +++ b/variants/soldered_nula_deepsleep_esp32s3/pins_arduino.h @@ -0,0 +1,56 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303a +#define USB_PID 0x82fc + +#define PIN_RGB_LED 2 +// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() +#define RGB_BUILTIN LED_BUILTIN +#define RGB_BRIGHTNESS 64 + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 8; +static const uint8_t SCL = 9; + +static const uint8_t SS = 10; +static const uint8_t MOSI = 11; +static const uint8_t MISO = 13; +static const uint8_t SCK = 12; + +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +#endif /* Pins_Arduino_h */ From 56be13bd1bbe2e0743f51a2e805337aa2891c38c Mon Sep 17 00:00:00 2001 From: IAMLIUBO Date: Mon, 24 Nov 2025 15:56:31 +0800 Subject: [PATCH 37/38] feat(nesso-n1): add comprehensive battery management API (#12052) Signed-off-by: imliubo Implement full NessoBattery class with: - AW32001 charger control (charge current/voltage, UVLO, watchdog, Hi-Z mode) - BQ27220 fuel gauge telemetry (voltage, current, power, temperature, cycle count) - Register enums and named constants replacing magic numbers - Datasheet references for all ICs --- variants/arduino_nesso_n1/expander.cpp | 236 ++++++++++++++++++++++- variants/arduino_nesso_n1/pins_arduino.h | 70 ++++++- 2 files changed, 296 insertions(+), 10 deletions(-) diff --git a/variants/arduino_nesso_n1/expander.cpp b/variants/arduino_nesso_n1/expander.cpp index d905cad44ca..e8a6cdbfa25 100644 --- a/variants/arduino_nesso_n1/expander.cpp +++ b/variants/arduino_nesso_n1/expander.cpp @@ -8,7 +8,10 @@ static bool wireInitialized = false; -// From https://www.diodes.com/datasheet/download/PI4IOE5V6408.pdf +// IO expander datasheet from https://www.diodes.com/datasheet/download/PI4IOE5V6408.pdf +// Battery charger datasheet from https://www.awinic.com/en/productDetail/AW32001ACSR +// battery gauge datasheet from https://www.ti.com/product/BQ27220 + static void writeRegister(uint8_t address, uint8_t reg, uint8_t value) { WireInternal.beginTransmission(address); WireInternal.write(reg); @@ -85,37 +88,252 @@ int digitalRead(ExpanderPin pin) { return readBitRegister(pin.address, 0xF, pin.pin); } +void NessoBattery::begin(uint16_t current, uint16_t voltage, UnderVoltageLockout uvlo, uint16_t dpm_voltage, uint8_t timeout) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + + setChargeCurrent(current); + setChargeVoltage(voltage); + setWatchdogTimer(timeout); + setBatUVLO(uvlo); + setVinDPMVoltage(dpm_voltage); + setHiZ(false); + setChargeEnable(true); +} + void NessoBattery::enableCharge() { - // AW32001E - address 0x49 - // set CEB bit low (charge enable) + setChargeEnable(true); +} + +void NessoBattery::setChargeEnable(bool enable) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + // bit 3 set charge enable + writeBitRegister(AW32001_I2C_ADDR, AW3200_POWER_ON_CFG, 3, !enable); +} + +void NessoBattery::setVinDPMVoltage(uint16_t voltage) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + if (voltage < 3880) { + voltage = 3880; + } + if (voltage > 5080) { + voltage = 5080; + } + uint8_t reg_value = readRegister(AW32001_I2C_ADDR, AW3200_INPUT_SRC); + // bits 7-4 set Vin DPM voltage + reg_value &= ~0b01111000; + reg_value |= ((voltage - 3880) / 80) << 4; + writeRegister(AW32001_I2C_ADDR, AW3200_INPUT_SRC, reg_value); +} + +void NessoBattery::setIinLimitCurrent(uint16_t current) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + if (current < 50) { + current = 50; + } + if (current > 500) { + current = 500; + } + uint8_t reg_value = readRegister(AW32001_I2C_ADDR, AW3200_INPUT_SRC); + // bits 3-0 set Iin limit current + reg_value &= ~0b00001111; + reg_value |= ((current - 50) / 30) & 0b00001111; + writeRegister(AW32001_I2C_ADDR, AW3200_INPUT_SRC, reg_value); +} + +void NessoBattery::setBatUVLO(UnderVoltageLockout uvlo) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + uint8_t reg_value = readRegister(AW32001_I2C_ADDR, AW3200_POWER_ON_CFG); + // bits 2-0 set UVLO + reg_value &= ~0b00000111; + reg_value |= (uvlo & 0b00000111); + writeRegister(AW32001_I2C_ADDR, AW3200_POWER_ON_CFG, reg_value); +} + +void NessoBattery::setChargeCurrent(uint16_t current) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + if (current < 8) { + current = 8; + } + if (current > 456) { + current = 456; + } + uint8_t reg_value = readRegister(AW32001_I2C_ADDR, AW3200_CHG_CURRENT); + // bits 5-0 set charge current + reg_value &= ~0b00111111; + reg_value |= ((current - 8) / 8) & 0b00111111; + writeRegister(AW32001_I2C_ADDR, AW3200_CHG_CURRENT, reg_value); +} + +void NessoBattery::setDischargeCurrent(uint16_t current) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + if (current < 200) { + current = 200; + } + if (current > 3200) { + current = 3200; + } + uint8_t reg_value = readRegister(AW32001_I2C_ADDR, AW3200_TERM_CURRENT); + // bits 7-4 set discharge current + reg_value &= ~0b11110000; + reg_value |= (((current - 200) / 200) & 0b00001111) << 4; + writeRegister(AW32001_I2C_ADDR, AW3200_TERM_CURRENT, reg_value); +} + +void NessoBattery::setChargeVoltage(uint16_t voltage) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + if (voltage < 3600) { + voltage = 3600; + } + if (voltage > 4545) { + voltage = 4545; + } + uint8_t reg_value = readRegister(AW32001_I2C_ADDR, AW3200_CHG_VOLTAGE); + // bits 7-2 set charge voltage + reg_value &= ~0b11111100; + reg_value |= ((voltage - 3600) / 15) << 2; + writeRegister(AW32001_I2C_ADDR, AW3200_CHG_VOLTAGE, reg_value); +} + +void NessoBattery::setWatchdogTimer(uint8_t sec) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + + uint8_t reg_value = readRegister(AW32001_I2C_ADDR, AW3200_TIMER_WD); + uint8_t bits = 0; + switch (sec) { + case 0: + bits = 0b00; // disable watchdog + break; + case 40: bits = 0b01; break; + case 80: bits = 0b10; break; + case 160: bits = 0b11; break; + default: bits = 0b11; break; + } + // bits 6-5 set watchdog timer + reg_value &= ~(0b11 << 5); + reg_value |= (bits << 5); + writeRegister(AW32001_I2C_ADDR, AW3200_TIMER_WD, reg_value); +} + +void NessoBattery::feedWatchdog() { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + // bit 6 set feed watchdog + writeBitRegister(AW32001_I2C_ADDR, AW3200_CHG_CURRENT, 6, true); +} + +void NessoBattery::setShipMode(bool en) { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + // bit 5 set ship mode + writeBitRegister(AW32001_I2C_ADDR, AW3200_MAIN_CTRL, 5, en); +} + +NessoBattery::ChargeStatus NessoBattery::getChargeStatus() { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + uint8_t status = readRegister(AW32001_I2C_ADDR, AW3200_SYS_STATUS); + // bits 4-3 set charge status + uint8_t charge_status = (status >> 3) & 0b11; + return static_cast(charge_status); +} + +void NessoBattery::setHiZ(bool enable) { if (!wireInitialized) { WireInternal.begin(SDA, SCL); wireInitialized = true; } - writeBitRegister(0x49, 0x1, 3, false); + // bit 4 set Hi-Z mode + writeBitRegister(AW32001_I2C_ADDR, AW3200_POWER_ON_CFG, 4, enable); } float NessoBattery::getVoltage() { - // BQ27220 - address 0x55 if (!wireInitialized) { WireInternal.begin(SDA, SCL); wireInitialized = true; } - uint16_t voltage = (readRegister(0x55, 0x9) << 8) | readRegister(0x55, 0x8); + uint16_t voltage = (readRegister(BQ27220_I2C_ADDR, BQ27220_VOLTAGE + 1) << 8) | readRegister(BQ27220_I2C_ADDR, BQ27220_VOLTAGE); return (float)voltage / 1000.0f; } +float NessoBattery::getCurrent() { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + int16_t current = (readRegister(BQ27220_I2C_ADDR, BQ27220_CURRENT + 1) << 8) | readRegister(BQ27220_I2C_ADDR, BQ27220_CURRENT); + return (float)current / 1000.0f; +} + uint16_t NessoBattery::getChargeLevel() { - // BQ27220 - address 0x55 if (!wireInitialized) { WireInternal.begin(SDA, SCL); wireInitialized = true; } - uint16_t current_capacity = readRegister(0x55, 0x11) << 8 | readRegister(0x55, 0x10); - uint16_t total_capacity = readRegister(0x55, 0x13) << 8 | readRegister(0x55, 0x12); + uint16_t current_capacity = readRegister(BQ27220_I2C_ADDR, BQ27220_REMAIN_CAPACITY + 1) << 8 | readRegister(BQ27220_I2C_ADDR, BQ27220_REMAIN_CAPACITY); + uint16_t total_capacity = readRegister(BQ27220_I2C_ADDR, BQ27220_FULL_CAPACITY + 1) << 8 | readRegister(BQ27220_I2C_ADDR, BQ27220_FULL_CAPACITY); return (current_capacity * 100) / total_capacity; } +int16_t NessoBattery::getAvgPower() { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + int16_t avg_power = readRegister(BQ27220_I2C_ADDR, BQ27220_AVG_POWER + 1) << 8 | readRegister(BQ27220_I2C_ADDR, BQ27220_AVG_POWER); + return avg_power; +} + +float NessoBattery::getTemperature() { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + uint16_t temp = readRegister(BQ27220_I2C_ADDR, BQ27220_TEMPERATURE + 1) << 8 | readRegister(BQ27220_I2C_ADDR, BQ27220_TEMPERATURE); + return ((float)temp / 10.0f) - 273.15f; +} + +uint16_t NessoBattery::getCycleCount() { + if (!wireInitialized) { + WireInternal.begin(SDA, SCL); + wireInitialized = true; + } + uint16_t cycle_count = readRegister(BQ27220_I2C_ADDR, BQ27220_CYCLE_COUNT + 1) << 8 | readRegister(BQ27220_I2C_ADDR, BQ27220_CYCLE_COUNT); + return cycle_count; +} + ExpanderPin LORA_LNA_ENABLE(5); ExpanderPin LORA_ANTENNA_SWITCH(6); ExpanderPin LORA_ENABLE(7); diff --git a/variants/arduino_nesso_n1/pins_arduino.h b/variants/arduino_nesso_n1/pins_arduino.h index fc1414b361d..30ccb527d33 100644 --- a/variants/arduino_nesso_n1/pins_arduino.h +++ b/variants/arduino_nesso_n1/pins_arduino.h @@ -51,10 +51,78 @@ class ExpanderPin { class NessoBattery { public: + static constexpr uint8_t AW32001_I2C_ADDR = 0x49; + static constexpr uint8_t BQ27220_I2C_ADDR = 0x55; + + enum AW32001Reg : uint8_t { + AW3200_INPUT_SRC = 0x00, + AW3200_POWER_ON_CFG = 0x01, + AW3200_CHG_CURRENT = 0x02, + AW3200_TERM_CURRENT = 0x03, + AW3200_CHG_VOLTAGE = 0x04, + AW3200_TIMER_WD = 0x05, + AW3200_MAIN_CTRL = 0x06, + AW3200_SYS_CTRL = 0x07, + AW3200_SYS_STATUS = 0x08, + AW3200_FAULT_STATUS = 0x09, + AW3200_CHIP_ID = 0x0A, + }; + + enum BQ27220Reg : uint8_t { + BQ27220_VOLTAGE = 0x08, + BQ27220_CURRENT = 0x0C, + BQ27220_REMAIN_CAPACITY = 0x10, + BQ27220_FULL_CAPACITY = 0x12, + BQ27220_AVG_POWER = 0x24, + BQ27220_TEMPERATURE = 0x28, + BQ27220_CYCLE_COUNT = 0x2A, + }; + + enum ChargeStatus { + NOT_CHARGING = 0, + PRE_CHARGE = 1, + CHARGING = 2, + FULL_CHARGE = 3, + }; + + enum UnderVoltageLockout { + UVLO_2430mV = 0, + UVLO_2490mV = 1, + UVLO_2580mV = 2, + UVLO_2670mV = 3, + UVLO_2760mV = 4, + UVLO_2850mV = 5, + UVLO_2940mV = 6, + UVLO_3030mV = 7, + }; + NessoBattery(){}; - void enableCharge(); // enable charging + void begin( + uint16_t current = 256, uint16_t voltage = 4200, UnderVoltageLockout uvlo = UVLO_2580mV, uint16_t dpm_voltage = 4520, uint8_t timeout = 0 + ); // default: charge current 256mA, battery 4200mV, uvlo 2580mV, DMP 4520mV, disable watchdog + + // AW32001 functions + void enableCharge(); // enable charging + void setChargeEnable(bool enable); // charge control + void setVinDPMVoltage(uint16_t voltage); // set input voltage limit, 3880mV ~ 5080mV(step 80mV, default 4520mV) + void setIinLimitCurrent(uint16_t current); // set input current limit, 50mA ~ 500mA(step 30mA, default 500mA) + void setBatUVLO(UnderVoltageLockout uvlo); // set battery under voltage lockout(2430mV, 2490mV, 2580mV, 2670mV, 2760mV, 2850mV, 2940mV, 3030mV) + void setChargeCurrent(uint16_t current); // set charging current, 8mA ~ 456mA(step 8mA, default 128mA) + void setDischargeCurrent(uint16_t current); // set discharging current, 200mA ~ 3200mA(step 200mA, default 2000mA) + void setChargeVoltage(uint16_t voltage); // set charging voltage, 3600mV ~ 4545mV(step 15mV, default 4200mV) + void setWatchdogTimer(uint8_t sec); // set charge watchdog timeout(0s, 40s, 80s, 160s, default 160s, 0 to disable) + void feedWatchdog(); // feed watchdog timer + void setShipMode(bool en); // set ship mode + ChargeStatus getChargeStatus(); // get charge status + void setHiZ(bool enable); // set Hi-Z mode, true: USB -x-> SYS, false: USB -> SYS + + // BQ27220 functions float getVoltage(); // get battery voltage in Volts + float getCurrent(); // get battery current in Amperes uint16_t getChargeLevel(); // get battery charge level in percents + int16_t getAvgPower(); // get average power in mWatts, can be negative + float getTemperature(); // get battery temperature in Celsius + uint16_t getCycleCount(); // get battery cycle count }; extern ExpanderPin LORA_LNA_ENABLE; From e7df08a65241930b188a48ffa0cac9551029db6a Mon Sep 17 00:00:00 2001 From: Piotr Gniado Date: Mon, 24 Nov 2025 23:25:36 +0100 Subject: [PATCH 38/38] fix(wifi): Fix printDiag() when WiFi not initialized (#12062) --- libraries/WiFi/src/WiFi.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/WiFi/src/WiFi.cpp b/libraries/WiFi/src/WiFi.cpp index 7fb0ed16459..2db8dba9ed6 100644 --- a/libraries/WiFi/src/WiFi.cpp +++ b/libraries/WiFi/src/WiFi.cpp @@ -45,13 +45,13 @@ extern "C" { * @param p Print interface */ void WiFiClass::printDiag(Print &p) { - const char *modes[] = {"NULL", "STA", "AP", "STA+AP"}; + const char *modes[] = {"NULL", "STA", "AP", "STA+AP", "NAN"}; - wifi_mode_t mode; + wifi_mode_t mode = WIFI_MODE_NULL; esp_wifi_get_mode(&mode); - uint8_t primaryChan; - wifi_second_chan_t secondChan; + uint8_t primaryChan = 0; + wifi_second_chan_t secondChan = WIFI_SECOND_CHAN_NONE; esp_wifi_get_channel(&primaryChan, &secondChan); p.print("Mode: "); @@ -67,7 +67,7 @@ void WiFiClass::printDiag(Print &p) { p.println(wifi_station_get_connect_status()); */ - wifi_config_t conf; + wifi_config_t conf = {0}; esp_wifi_get_config((wifi_interface_t)WIFI_IF_STA, &conf); const char *ssid = reinterpret_cast(conf.sta.ssid);