-
Notifications
You must be signed in to change notification settings - Fork 7.8k
-
Related area
Arduino Library
Hardware specification
All Boards
Is your feature request related to a problem?
The Matter specification has been released, and there has been IDF support for quite some time. At one level is would be good to see examples of using these APIs from the Arduino environment. At another level it would be great if there was a higher level Arduino library created that leveraged these APIs and provided examples for both implementing and controlling a Matter device.
Describe the solution you'd like
It would be great if there was a higher level Arduino library created that leveraged the IDF Matter APIs and provided examples for both implementing and controlling a Matter device.
Describe alternatives you've considered
There are some other people outside of this project starting to experiment with this, but they are not fully open source nor sponsored by Espressif.
Additional context
For the Espressif platform to dominate in the market for Matter devices it could be engaging the Arduino developers better.
I have checked existing list of Feature requests and the Contribution Guide
- I confirm I have checked existing list of Feature requests and Contribution Guide.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 5
Replies: 84 comments 2 replies
-
Why does this need to be part of the core? It can be handled in a 3rd party library.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello @Humancell,
thanks for opening this feature Request.
I'm adding this to next major milestone 3.0.0 and we will evaluate it.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello,
Thank you for considering this!
@lbernstone I can understand your question, but I see this no differently from all of the other libraries that are already a part of core. We already have Bluetooth, HTTP, DNS, Webserver, NetBIOS, RainMaker and many more. Just as many of these are built on the esp-protocols, this - it seems - would be built on https://github.com/espressif/esp-matter .
It is a protocol layer provided by Espressif in the IDF, and besides the technical reasons I believe by exposing it to Arduino developers it could assist the ESP32 in becoming an even more powerful platform for the development of Matter controllers and devices.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
-
You can try library I have created few days ago https://github.com/jakubdybczak/esp32-arduino-matter
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello,
You can try library I have created few days ago https://github.com/jakubdybczak/esp32-arduino-matter
I did see this library, but from my understanding you have not made this 100% open source, which is a problem for us. We can not use any closed source code in our projects.
If I am incorrect, and this really is 100% open source then we could take a look.
Beta Was this translation helpful? Give feedback.
All reactions
-
@Humancell
Why do you think that this one is not open-source?
arduino-esp32 also contains precompiled libraries and scripts that do this are in esp32-arduino-lib-builder repo.
Same with esp32-arduino-matter, you can find scripts used to build it there esp32-arduino-matter-builder.
Beta Was this translation helpful? Give feedback.
All reactions
-
We will consider this request for next releases in 2023... please be patient.
Beta Was this translation helpful? Give feedback.
All reactions
-
I have done an initial effort to build Matter and Arduino as Component.
The steps are here:
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi all
Is there any progress for supporting Matter to the Arduino core?
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 2
-
@HamzaHajeir - We are currently working to release OpenThread as an Arduino Library. This shall be done later this month.
Next step is to work on releasing Matter as an Arduino Library.
I believe that it will be done by the end of this year.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
-
About Matter Library implementation for Arduino Core 3.0.x:
- We will initially implement it to be supported within WiFi. In the future also within Thread Protocol.
- WiFi Matter will be supported for ESP32, ESP32-C3, ESP32-S3, ESP32-S2 and ESP32-C6. No support for ESP32-H2 and ESP32-P4, which have no WiFi radio. ESP32-S2 has no BLE, it won't have Matter Device BLE advertising service.
- Thread Network Protocol will be supported for the ESP32-C6 and ESP32-H2. Both have also BLE, therefore, BLE Commissionable discovery is also available.
- Commissionable discovery will be done through BLE (whenever available in the SoC), WiFi SoftAP (future feature), DNS-SD for Thread Border Routers (future feature).
- Commissioning will follow Matter standard, including QR Code generated from a URL printed in the log output.
- ESP32 Matter implementation for BLE Commissionable discovery is based on NimBLE. Therefore, it won't be compatible with ESP32 BLE Arduino Library that uses Bluedroid instead. This means that there may be issues when using both together in the same Arduino Sketch. This will be a limitation. We are planning to move ESP32 Arduino BLE Library to use NimBLE as well in the future, which may solve this incompatibility problem.
- ESP32 Matter Arduino implementation will make available all possible Matter 1.0 device types as Arduino Classes: Lighting, Smart Plugs, Switches and Controls, Sensors, Closures and HVACs. Each Device Type Class will have necessary implementation of the device data model, endpoints, roles, clusters, commands and events.
- The current implementation is only for Matter Device. No plans for Matter Controllers or Matter Commissioner library.
- This implementation will use testing and development Matter Vendor ID (0xFFF1..4), therefore valid for CSA for testing purpose only. In case you need your own VID, please follow CSA processes and add certificates as necessary to your code, on your own.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 10
-
About Matter Library implementation for Arduino Core 3.0.x:
- We will initially implement it to be supported within WiFi. In the future also within Thread Protocol.
- WiFi Matter will be supported for ESP32, ESP32-C3, ESP32-S3, ESP32-S2 and ESP32-C6. No support for ESP32-H2 and ESP32-P4, which have no WiFi radio. ESP32-S2 has no BLE, it won't have Matter Device BLE advertising service.
- Thread Network Protocol will be supported for the ESP32-C6 and ESP32-H2. Both have also BLE, therefore, BLE Commissionable discovery is also available.
- Commissionable discovery will be done through BLE (whenever available in the SoC), WiFi SoftAP (future feature), DNS-SD for Thread Border Routers (future feature).
- Commissioning will follow Matter standard, including QR Code generated from a URL printed in the log output.
- ESP32 Matter implementation for BLE Commissionable discovery is based on NimBLE. Therefore, it won't be compatible with ESP32 BLE Arduino Library that uses Bluedroid instead. This means that there may be issues when using both together in the same Arduino Sketch. This will be a limitation. We are planning to move ESP32 Arduino BLE Library to use NimBLE as well in the future, which may solve this incompatibility problem.
- ESP32 Matter Arduino implementation will make available all possible Matter 1.0 device types as Arduino Classes: Lighting, Smart Plugs, Switches and Controls, Sensors, Closures and HVACs. Each Device Type Class will have necessary implementation of the device data model, endpoints, roles, clusters, commands and events.
- The current implementation is only for Matter Device. No plans for Matter Controllers or Matter Commissioner library.
- This implementation will use testing and development Matter Vendor ID (0xFFF1..4), therefore valid for CSA for testing purpose only. In case you need your own VID, please follow CSA processes and add certificates as necessary to your code, on your own.
Glad to hear that's coming support of Matter in the Arduino core. I have just some questions and comments:
- ESP-IDF identifies several tools related to setup Matter device (as esp-matter-mfg-tool), are these included also?
- Per Commissioning, please consider On-Network commisioning method, in which some could have his own device on the network previously, by either Ethernet or custom implementation of WiFi-AP.
- Therefore, I think it's okay to have ESP32-S2 supported with respect to such user responsibility (or even with the feature of WiFiAP commissioning).
- Is it available for some to build a custom device using matter data and interaction model?
With thanks,
Hamza Hajeir
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
@HamzaHajeir - Thanks for the comments.
ESP-IDF identifies several tools related to setup Matter device (as esp-matter-mfg-tool), are these included also?
Not as part of the tools that ESP32 Arduino would provide.
These tools, as the CHIP tools, or any other Python tools, can be used independently of the ESP32 SDK used to build Matter Applications. These tools can be used while using IDF, Rust or Arduino Frameworks for Matter development.
Per Commissioning, please consider On-Network commisioning method, in which some could have his own device on the network previously, by either Ethernet or custom implementation of WiFi-AP.
Commissioning will always be done on-network.
The device must be already on the network and WiFi/Thread credentials shall be already in place.
Ethernet must have the cable connected.
In all cases, the device must have a valid IP address (DHCP or Static IP).
Therefore, On-Network Commissioning method will be included.
Therefore, I think it's okay to have ESP32-S2 supported with respect to such user responsibility (or even with the feature of WiFiAP commissioning).
Yes, correct.
Is it available for some to build a custom device using matter data and interaction model?
We may consider it for future feature. At first, we'll focus on the Matter 1.0 device types as described above.
But given that ESP32 Arduino is based on IDF and ESP-Matter, it is always possible to add code from those two to an Arduino Sketch and We may consider it for future feature. At first, we'll focus on the Matter 1.0 device types as described above.
But given that ESP32 Arduino is based on IDF and ESP-Matter, it is always possible to add code from those two to an Arduino Sketch and create custom devices, as well as custom interaction models.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
@SuGlider Nice, that explains all, I was mixing between commissioning discovery and commissioning process, seems two different operations.
However, it seems that all Factory Data Providers would be 'custom' in Arduino, correct?
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
However, it seems that all Factory Data Providers would be 'custom' in Arduino, correct?
Arduino will set the Matter Device as a Testing unit using a VIDs allocated by the CSA for testing purposes.
https://developers.home.google.com/matter/get-started#vendor_id
No Real Provider information would be used within Arduino.
Commissioning will happen as defined in the description from https://developers.home.google.com/matter/primer/commissioning
Discovery may be done using BLE and/or WiFi AP, as described here: https://developers.home.google.com/matter/primer/commissionable-and-operational-discovery
Beta Was this translation helpful? Give feedback.
All reactions
-
Good day! If it's not a secret, tell me how to use PSRAM with Matter?
Beta Was this translation helpful? Give feedback.
All reactions
-
Good day! If it's not a secret, tell me how to use PSRAM with Matter?
For ESP32 Arduino, it is transparent.
When dynamic memory allocation, using malloc() or new, over 4KB is done, it is automatically allocated into PSRAM.
If the Sketch or the Matter Library "mallocs" more than 4KB, it will use PSRAM as well.
This feature comes from IDF configuration used in Arduino (sdkconfig):
CONFIG_SPIRAM_USE_MALLOC=y
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello! Thanks for the answer!
esp32, Arduino 1.8.12, core 3.2.0.
I specially soldered the psRam PSRAM64(H) memory, it starts, is used by json buffers without errors, ESP.getFreeHeap() returns a decrease in memory of less than 70 kb; I tried to forcibly allocate memory for Matter endpoints, the memory is allocated, but when the point starts, it reboots. Kernel 3.2.0 and 3.1.2 behave the same. I do not get any benefit from psram with Matter, the console says that ESP.getPsramSize()-ESP.getFreePsram()=2180 used bytes at rest. When using the web and websocket, the PSRAM memory is used, but when the heap is reduced by ESP.getFreeHeap() less than 60 kb, the web may not load images and the page. Debug mode does not display errors on PSRAM memory. So I think that I'm doing something wrong. I'm not a professional, more of a newbie. Thanks for your help and your work!!!
psramReport.txt
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello! Thanks for the answer! esp32, Arduino 1.8.12, core 3.2.0. I specially soldered the psRam PSRAM64(H) memory, it starts, is used by json buffers without errors, ESP.getFreeHeap() returns a decrease in memory of less than 70 kb; I tried to forcibly allocate memory for Matter endpoints, the memory is allocated, but when the point starts, it reboots. Kernel 3.2.0 and 3.1.2 behave the same. I do not get any benefit from psram with Matter, the console says that ESP.getPsramSize()-ESP.getFreePsram()=2180 used bytes at rest. When using the web and websocket, the PSRAM memory is used, but when the heap is reduced by ESP.getFreeHeap() less than 60 kb, the web may not load images and the page. Debug mode does not display errors on PSRAM memory. So I think that I'm doing something wrong. I'm not a professional, more of a newbie. Thanks for your help and your work!!! psramReport.txt
A bit hard to see what could be the issue here based on the report.
It may not be related to Matter.
It sounds like the Arduino Libraries used in this project may be allocating memory in a different way. It would require you to read its code and understand how it works. This may not be easy for a beginner.
Note that some IDF components may be using HEAP directly. It is possible for IDF to manage which memory sapce to use when allocating memory. I think that it will be better to change your project to use Arduino as IDF Component and then you will be able to tune IDF Components to use the memory the best way for your application. IDF has menuconfig oprtion for changing its settings for each component. BUT... this is not a beginner procedure.
Good luck!
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you!!!
I think there are two ways, wait or start the transition. The growth rate of RAM costs is very high, kernel 1.0.2 on my code 180kb of free memory, on 3.1.2 already 102kb free, and on 3.2.0 there are 84kb left and this is without launching Matter))). At this rate, PSRam will soon become simply necessary))).
From the tests I understood that everything that is more than 4096 is allocated as expected, but only to those components that began to be created after the initialization of PSRam. All dynamic variables created earlier receive memory from the heap without using PSRam.
In Arduino, unfortunately, there is no menuconfig support.
class MatterColorLight does not contain onChangeBrightness call, when using the device, the brightness control scale is there but does not work.
Thank you for your efforts!!!
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you!!! I think there are two ways, wait or start the transition. The growth rate of RAM costs is very high, kernel 1.0.2 on my code 180kb of free memory, on 3.1.2 already 102kb free, and on 3.2.0 there are 84kb left and this is without launching Matter))). At this rate, PSRam will soon become simply necessary))). From the tests I understood that everything that is more than 4096 is allocated as expected, but only to those components that began to be created after the initialization of PSRam. All dynamic variables created earlier receive memory from the heap without using PSRam. In Arduino, unfortunately, there is no menuconfig support.
class MatterColorLight does not contain onChangeBrightness call, when using the device, the brightness control scale is there but does not work.
Thank you for your efforts!!!
Yes, mostly, your observations are correct.
- core 1.0.2 is quite old and mostly directly poking the MCU registry. More memory left for the application. But fewer feature and a very old IDF version with some potential bugs of the past.
- core 3.1 is recent, it has more memory allocation because its strucure is way different from version 1.x. It uses newer IDF 5.
- PSRAM is not allocated within DATA and BSS (RAM Global Variables), such space has grown from Core 1.x to 3.x, therefore, there is less space left in RAM for user application. But if the application uses C
malloc()or C/CPPnewand it is over 4096, it will allocate it from PSRAM, always when it is available. - Matter Library may not use plain C
malloc(), but instead it may use CPP STD functions which, I'm not sure if it may use PSRAM.
My suggestion would be moving the project to Arduino as IDF Component in order to change sdkconfig settings for the best possible performance and memory allocation necessary. This settings can be changed using idf.py menuconfig command.
It may be possible to change Matter configuration to use PSRAM (I've not investigated it, but it may be possible).
It is also possible to change the 4096 limit to lower or higher using menuconfig.
When the application reaches the MCU peripherals limits, it may require better tools, tunning the configuration, planning the resources and even changing the development framework.
Arduino is designed for simple applications, targeting beginners that want to learn how to create MCU application using a very simple API. It has a cost in memory and processor time (lower performance) in order to make it easy to use and user mistake proof.
Beta Was this translation helpful? Give feedback.
All reactions
-
With the community Platformio fork pioarduino you can easily use Arduino as an component of IDF. There is a Matter IDF Arduino example here https://github.com/pioarduino/platform-espressif32/tree/main/examples/espidf-arduino-matter-light
In this setup IDF menuconfig can be used to tune sdkconfig settings for your use case.
For sure there is a learning curve ;-)
When your OS is Windows use WSL(2). Since it is a big project it is impossible to build with Windows and pioarduino! And even when it would work, compiling under Windows is horrible slow...
Beta Was this translation helpful? Give feedback.
All reactions
-
Once again, thank you very much!!!
I think this information will be very useful for those who write on Arduino and decided to use PsRam in their projects. Obviously, a lot of time will be saved. The right direction will be clear.
I have been writing my projects for a long time, in my free winter time, this is more of a hobby, that's why Arduino. I have already started preparing the ground for the transition, but before the transition I got stuck on optimizing the memory in the project. I want to bring everything to perfection, while I remember everything well. If I started with IDF it would be better, because I consider it a habit. In any case, my transition will not happen before next winter, when there will be enough time.
In Arduino, you also can't allocate memory in psram for a task, allocating memory leads to a reboot). So Arduino and psram are quite incompatible concepts, it is configured very strangely menuconfig.
Thank you!!!
Beta Was this translation helpful? Give feedback.
All reactions
-
In Arduino, you also can't allocate memory in psram for a task, allocating memory leads to a reboot). So Arduino and psram are quite incompatible concepts, it is configured very strangely menuconfig.
@ValdayMl - Please describe it. I'd like to better understand this problem.
Beta Was this translation helpful? Give feedback.
All reactions
-
Good day! Yes, of course.
`
StaticTask_t xTaskBuffer_loop_15s;
StackType_t *xStack_loop_15s;
xStack_loop_15s=(uint8_t*)malloc(4124);
loop_15s_in_0_core=xTaskCreateStaticPinnedToCore(loop_15s_in_0_core_f,"15 sec loop",4124,NULL,1,xStack_loop_15s,&xTaskBuffer_loop_15s,1);
SPIRAM Memory Info:
07:20:10.242 -> ------------------------------------------
07:20:10.242 -> Total Size : 4194304 B (4096.0 KB)
07:20:10.242 -> Free Bytes : 4192124 B (4093.9 KB)
07:20:10.242 -> Allocated Bytes : 0 B ( 0.0 KB)
07:20:10.242 -> Minimum Free Bytes: 4192124 B (4093.9 KB)
07:20:10.295 -> Largest Free Block: 4128756 B (4032.0 KB)
07:20:10.295 -> Bus Mode : QSPI
07:20:10.295 -> ------------------------------------------
Compile Date/Time : Apr 14 2025 07:13:20
07:20:01.279 -> Compile Host OS : windows
07:20:01.279 -> ESP-IDF Version : v5.3.2-584-g489d7a2b3a-dirty
07:20:01.279 -> Arduino Version : 3.1.3
07:20:01.333 -> Board Info:
07:20:01.333 -> ------------------------------------------
07:20:01.333 -> Arduino Board : ESP32_DEV
07:20:01.333 -> Arduino Variant : esp32
07:20:01.333 -> Arduino FQBN : esp32:esp32:esp32:JTAGAdapter=default,PSRAM=enabled,PartitionScheme=default_8MB,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=debug,EraseFlash=none,ZigbeeMode=default
07:20:01.333 -> ============ Before Setup End ============
07:20:01.534 -> 4194304 bytes
07:20:08.593 -> 93860psram used bytes
07:20:08.593 -> create my static task
07:20:08.593 ->
07:20:08.593 -> assert failed: xTaskCreateStaticPinnedToCore freertos_tasks_c_additions.h:298 (xPortcheckValidStackMem(puxStackBuffer))
07:20:08.593 ->
07:20:08.593 ->
07:20:08.593 -> Backtrace: 0x40082b9d:0x3ffb1f90 0x400905c1:0x3ffb1fb0 0x40096de6:0x3ffb1fd0 0x40093f3e:0x3ffb2100 0x400ff8ba:0x3ffb2150 0x4012b063:0x3ffb2270 0x4009133e:0x3ffb2290
07:20:08.593 ->
Decoding stack results
0x40082b9d: panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c line 463
0x400905c1: esp_system_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/esp_system_chip.c line 92
0x40096de6: __assert_func at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/assert.c line 80
0x40093f3e: xTaskCreateStaticPinnedToCore at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/esp_additions/freertos_tasks_c_additions.h line 299
0x400ff8ba: setup() at C:\DATA\Arduino_3\testRenew\piro_motion_vkl_rgb_minimum_rgb_esp32_ir/piro_motion_vkl_rgb_minimum_rgb_esp32_ir.ino line 415
0x4012b063: loopTask(void*) at C:\Users\VML\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.1.3\cores\esp32\main.cpp line 59
0x4009133e: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c line 139
`
`
xStack_loop_15s=(uint8_t*)heap_caps_calloc(1, 51024, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT | MALLOC_CAP_32BIT);
loop_15s_in_0_core=xTaskCreateStaticPinnedToCore(loop_15s_in_0_core_f,"15 sec loop",51024,NULL,1,xStack_loop_15s,&xTaskBuffer_loop_15s,1);
7:33:43.785 -> 93860 psram used bytes
07:33:43.785 -> create my static task
07:33:43.832 ->
07:33:43.832 -> assert failed: xTaskCreateStaticPinnedToCore freertos_tasks_c_additions.h:298 (xPortcheckValidStackMem(puxStackBuffer))
07:33:43.832 ->
07:33:43.832 ->
07:33:43.832 -> Backtrace: 0x40082b9d:0x3ffb1f90 0x400905c1:0x3ffb1fb0 0x40096de6:0x3ffb1fd0 0x40093f3e:0x3ffb2100 0x400ff8c2:0x3ffb2150 0x4012b06b:0x3ffb2270 0x4009133e:0x3ffb2290
07:33:43.832 ->
Decoding stack results
0x40082b9d: panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c line 463
0x400905c1: esp_system_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/esp_system_chip.c line 92
0x40096de6: __assert_func at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/assert.c line 80
0x40093f3e: xTaskCreateStaticPinnedToCore at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/esp_additions/freertos_tasks_c_additions.h line 299
0x400ff8c2: setup() at C:\DATA\Arduino_3\testRenew\piro_motion_vkl_rgb_minimum_rgb_esp32_ir/piro_motion_vkl_rgb_minimum_rgb_esp32_ir.ino line 415
0x4012b06b: loopTask(void*) at C:\Users\VML\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.1.3\cores\esp32\main.cpp line 59
0x4009133e: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c line 139
`
Beta Was this translation helpful? Give feedback.
All reactions
-
Core 3.2.0
Software Info:
08:20:38.850 -> ------------------------------------------
08:20:38.850 -> Compile Date/Time : Apr 14 2025 08:15:42
08:20:38.897 -> Compile Host OS : windows
08:20:38.897 -> ESP-IDF Version : v5.4.1-1-g2f7dcd862a-dirty
08:20:38.897 -> Arduino Version : 3.2.0
08:20:38.897 -> ------------------------------------------
08:20:38.897 -> Board Info:
08:20:38.897 -> ------------------------------------------
08:20:38.897 -> Arduino Board : ESP32_DEV
08:20:38.897 -> Arduino Variant : esp32
08:20:38.897 -> Arduino FQBN : esp32:esp32:esp32:JTAGAdapter=default,PSRAM=enabled,PartitionScheme=default_8MB,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=16M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=debug,EraseFlash=none,ZigbeeMode=default
08:20:38.944 -> ============ Before Setup End ============
08:20:46.170 -> 95388 psram used bytes
08:20:46.170 -> create my static task
08:20:46.170 ->
08:20:46.170 -> assert failed: xTaskCreateStaticPinnedToCore freertos_tasks_c_additions.h:299 (xPortcheckValidStackMem(puxStackBuffer))
08:20:46.170 ->
08:20:46.170 ->
08:20:46.170 -> Backtrace: 0x40082c5c:0x3ffb1f80 0x40090345:0x3ffb1fa0 0x40096b61:0x3ffb1fc0 0x40093d1b:0x3ffb2100 0x400fe65a:0x3ffb2150 0x4012a27f:0x3ffb2270 0x4009106a:0x3ffb2290
08:20:46.170 ->
Decoding stack results
0x40082c5c: panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c line 454
0x40090345: esp_system_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/esp_system_chip.c line 87
0x40096b61: __assert_func at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/assert.c line 80
0x40093d1b: xTaskCreateStaticPinnedToCore at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/esp_additions/freertos_tasks_c_additions.h line 300
0x400fe65a: setup() at C:\DATA\Arduino_3\testRenew\piro_motion_vkl_rgb_minimum_rgb_esp32_ir/piro_motion_vkl_rgb_minimum_rgb_esp32_ir.ino line 415
0x4012a27f: loopTask(void*) at C:\Users\VML\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.2.0\cores\esp32\main.cpp line 59
0x4009106a: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c line 139
Beta Was this translation helpful? Give feedback.
All reactions
-
Psram sometimes uses ESPAsyncWebServer.
Nobody uses it automatically anymore.
String.reserve(4128) also allocates memory without problems.
There is a problem with char buffer, memory has to be allocated before PSRamEsp32TrueLoad=psramInit(); otherwise I got a crash on 3.1.3.
I haven't tried it on other versions.
If you allocate memory before starting psramInit()
`xStack_loop_15s=(uint8_t*)heap_caps_calloc(1, 5*1024, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT | MALLOC_CAP_32BIT);
PSRaMEsp32TrueLoad=psramInit();`
Memory is allocated, but the same error occurs when used.
I suspect the problem lies in the menuconfig settings of the arduino.
Beta Was this translation helpful? Give feedback.
All reactions
-
@SuGlider what's the milestone (if already set) for Bluetooth commissionable discovery ? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
-
@SuGlider what's the milestone (if already set) for Bluetooth commissionable discovery ? Thanks!
This is ready for the Arduino Core 3.3.x release.
It can already be tested using release/v3.3.x branch.
https://github.com/espressif/arduino-esp32/tree/release/v3.3.x
The examples are using BLE for WiFi or Thread commissioning.
WiFi: ESP32-S3, ESP32-C3, ESP2-C6
Thread: ESP32-H2, ESP32-C5
WiFi, but no BLE Comissioning:
ESP32-S2 : this SoC has no BLE radio.
ESP32: this SoC has Bluedroid BLE for Classic Bluetooth and no NimBLE, which is necessary for Matter commissioning.
ESP32 can use NimBLE, and therefore, use Matter with BLE Commssioning, but the project shall be built using Arduino as IDF Component with the correct sdkconfig to enable NimBLE and CHIPoBLE.
Beta Was this translation helpful? Give feedback.
All reactions
-
@SuGlider With availability of Matter over Thread, could we implement the isThreadConnected method? Probably using chip::DeviceLayer::ConnectivityMgr().IsThreadAttached()?
arduino-esp32/libraries/Matter/src/Matter.cpp
Lines 178 to 182 in fc8ce8f
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
-
Yes, this was left behind. I'll take a look and test it.
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 2
-
This is implemented by #12140
I have tested it with the provided example in the PR using the ESP32-H2 (Thread).
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 1