A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By Kevin Uhlir (N0BEL)
#14497 A Simple mDNS Responder for the esp8266 and their SDK Version 0.9.3 and above.

mDNS aka Bonjour, avahi, etc.

Helps with resolving .local to IP addresses on your local network.

It allows multiple host names and ip resolution (up to 5). It utilizes one (1) UDP connection (out of the 4 that the SDK supports)

https://github.com/n0bel/esp8266-mDNSResponder

Working on a adding a module to nodemcu, too.

/Kevin
http://n0bel.net
User avatar
By Patriko
#15262 Hi Kevin!

When I try to compile it I got:

Code: Select alluser/mDNSresp.c: In function 'encodeResp':
user/mDNSresp.c:94:9: error: implicit declaration of function 'pvPortZalloc' [-Werror=implicit-function-declaration]
         unsigned char *data = (unsigned char *)os_zalloc(*len);
         ^
user/mDNSresp.c: In function 'decodeQuery':
user/mDNSresp.c:210:4: error: implicit declaration of function 'vPortFree' [-Werror=implicit-function-declaration]
    os_free(name);
    ^
user/mDNSresp.c: In function 'mDNSresp_addhost':
user/mDNSresp.c:262:2: error: implicit declaration of function 'ets_strlen' [-Werror=implicit-function-declaration]
  h->hostname = (char *)os_zalloc(os_strlen(hn)+1);
  ^
user/mDNSresp.c:263:2: error: implicit declaration of function 'ets_strcpy' [-Werror=implicit-function-declaration]
  os_strcpy(h->hostname,hn);
  ^
user/mDNSresp.c: In function 'mDNSresp_init':
user/mDNSresp.c:315:2: error: implicit declaration of function 'ets_timer_disarm' [-Werror=implicit-function-declaration]
  os_timer_disarm(&bc_timer);
  ^
user/mDNSresp.c:318:3: error: implicit declaration of function 'ets_timer_setfn' [-Werror=implicit-function-declaration]
   os_timer_setfn(&bc_timer, (os_timer_func_t *)broadcast, (void *)0);
   ^
user/mDNSresp.c:319:3: error: implicit declaration of function 'ets_timer_arm_new' [-Werror=implicit-function-declaration]
   os_timer_arm(&bc_timer, bctime*1000, 1);
   ^
cc1.exe: all warnings being treated as errors
C:/Espressif/examples/esphttpd/Makefile:419: recipe for target 'build/user/mDNSresp.o' failed
mingw32-make.exe: *** [build/user/mDNSresp.o] Error 1


SDK version is sdk 1.0. What can be the reason?

Thanks!:)
Patriko