-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
Hello!
I notice that mdns.h
is included in espidf.h
and wanted to try it out. I'll admit that I'm not very literate with C, but through some poking around I was able to find the function I wanted, which was a simple mDNS query.
import espidf
ip_addr = espidf.ip_addr_t()
q = espidf.mdns_query_a("myhost.local", 2000, ip_addr)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SyntaxError: Can't convert ip_addr_t to ip4_addr_t!
Ok. I guess this was expected because I didn't hand it a ip4_addr_t
, but that's not in the espidf
module. So, maybe it needs to be included in espidf.h
? Ok. Yeah. Let's try that. I added #include "lwip/ip4_addr.h"
to espidf.h
and recompiled, expecting gen_mpy
to take care of the rest, which it doesn't.
So, my questions are:
- Why is
mdns.h
included in the first place? - Why isn't
gen_mpy
adding the types fromlwip/ip4_addr.h
? - Can you provide an example of using the ESP-IDF's mDNS functions, as provided by
gen_mpy
, in uPy? Maybe I'm just doing this all wrong.
Any help would be very much appreciated.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels