Hi,
I am have an IoT application to develop on the ESP32. The device will advertise using mDNS, host a webserver etc etc.
There is an mDNS component in the ESP library which would be awesome to use.
I am puzzled though as the ESP component uses both a FreeRTOS thread and the LwIP raw UDP API (pbufs etc).
I had understood that the LwIP raw api was not reentrant. Perhaps the example works because only the mDNS component uses LwIP?
Is the mDNS component going to work when I add other tasks; webserver, MQTT etc?
Has anyone used the mDNS component with other tasks and IP activity?
mDNS component's real time safety
mDNS component's real time safety
& I also believe that IDF CAN should be fixed.
Re: mDNS component's real time safety
Howdy and welcome to the forum. I haven't looked inside the mDNS component's implementation but my belief is that the internals of such a component are free to use whichever technology/implementations that makes sense to them as long as the result satisfies the contract of usage. I haven't seen anywhere a statement that using the mDNS component precludes using the other networking APIs such as WiFi and sockets.
There appears to be a sample of using the mDNS component found here:
https://github.com/espressif/esp-idf/bl ... ple_main.c
There appears to be a sample of using the mDNS component found here:
https://github.com/espressif/esp-idf/bl ... ple_main.c
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: mDNS component's real time safety
Thanks.
Looking into this deeper and there are semaphores controlling Ethernet buffer access within emac_main.c
I am not sure though; although pbuf() allocation seems to be controlled pbuf chaining does not appear to be controlled.
Anyone able to confirm and/or provide reference (I know the LwIP reference that raw api is not thread safe)?
Looking into this deeper and there are semaphores controlling Ethernet buffer access within emac_main.c
I am not sure though; although pbuf() allocation seems to be controlled pbuf chaining does not appear to be controlled.
Anyone able to confirm and/or provide reference (I know the LwIP reference that raw api is not thread safe)?
& I also believe that IDF CAN should be fixed.
Re: mDNS component's real time safety
mDNS indeed was initially written on top of non thread safe raw API. Thread safety was implemented in https://github.com/espressif/esp-idf/pull/733 later.
Re: mDNS component's real time safety
mdns has been rewritten since that commit and the current init and deinit are done in API calls but write is not.
Re: mDNS component's real time safety
Cool, that really helps a lot. I did not spot tcpip_api_call() in the API documentation (is it documented?).
Easy enough now to modify this and other thread unsafe examples.
Weird that they undid the RT safety on the write though.
Easy enough now to modify this and other thread unsafe examples.
Weird that they undid the RT safety on the write though.
& I also believe that IDF CAN should be fixed.
Who is online
Users browsing this forum: Gaston1980 and 119 guests