-->
Page 1 of 2

A Simple mDNS Responder.

PostPosted: Tue Apr 14, 2015 12:35 pm
by Kevin Uhlir (N0BEL)
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

Re: A Simple mDNS Responder.

PostPosted: Wed Apr 22, 2015 3:04 am
by Patriko
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

Re: A Simple mDNS Responder.

PostPosted: Wed Apr 22, 2015 7:12 pm
by LEDAero
Kevin Uhlir (N0BEL) wrote:A Simple mDNS Responder for the esp8266 and their SDK Version 0.9.3 and above.

Working on a adding a module to nodemcu, too.

/Kevin
http://n0bel.net


You're a star!

That would be fantastic.

Re: A Simple mDNS Responder.

PostPosted: Thu Apr 23, 2015 2:15 am
by Patriko
LEDAero, did you got it working?