esp-matter
esp-matter copied to clipboard
Determining the optimal CHIP Task and MDNS task priorities in custom application (CON-713)
It was observed that by default Esp-Matter SDK configures Chip task priority to a value of 0 (Low Priority) and MDNS Task priority to a value of 1.
My project had a few more application tasks to connect to the internet HTTP/MQTT task based on callback events of Wi-Fi connectivity interface change. In this case, CHIP and MDNS task priorities need to be elevated to a higher priority than the application task, or can we leave it to default values? I would like to hear some recommendations/suggestions regarding determining of the optimal priority setting in general.
I have kept the priority as below
MDNS Task Prio > CHIP Task Prio > HTTP/MQTT task Prio
@aggaddam the CHIP_TASK_PRIORITY and MDNS_TASK_PRIORITY have default value of 1 in the esp-mater sdk.
Basicaly there are two flavours of mdns i.e minimal mdns and platform mdns which are set based on the config option CONFIG_USE_MINIMAL_MDNS.
If you are using minimal mdns,then here is no mdns task as the mdns packet(which is also UDP packet) is received by the lwip task, post to matter task and then it will be handled in matter task.
If you are using platform mdns then a separate mdns task will be started to handle the mdns packets.