cancel
Showing results for 
Search instead for 
Did you mean: 

Free-RTOS and mDNS

JDWBE
Associate II

Hello Community!

I'm busy with a project that needs support for mDNS, after a long search i can't find any documentation howto implement mDNS on a Free-RTOS system. The examples provided by ST are not aware of any OS (I Think).

Can someone share some information please?

2 REPLIES 2
Pavel A.
Evangelist III

Here: https://www.freertos.org/Documentation/03-Libraries/02-FreeRTOS-plus/02-FreeRTOS-plus-TCP/02-Networking-basics/21-mDNS

FreeRTOS+ TCP supports mDNS. Why you prefer LwIP over FreeRTOS+ TCP?

LwIP does support mDNS as well:  https://www.nongnu.org/lwip/2_1_x/group__mdns.html

 

JDWBE
Associate II

Hello

 

Many thanks for your post.

When m i add this line in this way (right after lwip init, i use static ip):

  static void srv_txt(struct mdns_service *service, void *txt_userdata)
   {
     res = mdns_resp_add_service_txtitem(service, "path=/", 6);
     LWIP_ERROR("mdns add service txt failed\n", (res == ERR_OK), return);
   }

//Inside Default Thread
....
// Init LWIP

LOCK_TCPIP_CORE();
mdns_resp_add_service(&gnetif, "myweb", "_http", DNSSD_PROTO_TCP, 80, 3600, srv_txt, NULL);
UNLOCK_TCPIP_CORE();

I Get this error on the terminal (When running):

Assertion "mdns_resp_add_service: Not an mdns netif" failed at line 2202 ... Middlewares/Third_Party/LwIP/src/apps/mdns/mdns.c

Maybe i forgot something to enable or i understand the implementation wrong?

 

I got exactly one ping back from the board, then it is dead. When i remove the mDNS stuff, the board works fine.