Page 2 of 2

Re: Adding DHCP, AutoIP and IGMP to LWIP support

Posted: Fri Dec 13, 2013 11:19 am
by Adam
Hi all!

I can“t get to work multicast communication. DHCP is already working. AUTOIP is unwanted.
Problem:

Code: Select all

err = netconn_join_leave_group(conn2, &mcast_addr, &thisif_ptr->ip_addr, NETCONN_JOIN);
still waits for semaphore. Nothing is catched.

My steps for IGMP config:
added into lwipopts.h:

Code: Select all

//LWIP_IGMP==1: Turn on IGMP module. 
#ifndef LWIP_IGMP
#define LWIP_IGMP                       1
#define LWIP_RAND() ((uint32_t)rand())
#endif

added into lwipthread.c:
in low_level_init();

Code: Select all

  netif->flags |= NETIF_FLAG_IGMP;


in lwipthread();

Code: Select all

  
netifapi_dhcp_start(&thisif);
igmp_init();
igmp_start(&thisif);


and then in lwipthread main cycle added:

Code: Select all

 igmp_tmr(); 

added into in mysrc.c:

Code: Select all

ETH->MACFFR    = ETH_MACFFR_PAM;


Is there something what i doing wrong, or something configuration is missing? I dont want use any timers and autoip.

Thank you.

Re: Adding DHCP, AutoIP and IGMP to LWIP support

Posted: Mon Dec 16, 2013 2:42 pm
by Adam
I have already found my mistake... A setted up the MAC filter too early than I could. For others: Disable MAC filter after initialization of network stuffs. Disable MAC filter near before using netconn_recv.

Adam