Adding DHCP, AutoIP and IGMP to LWIP support

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
Adam
Posts: 18
Joined: Thu Sep 05, 2013 1:53 pm

Re: Adding DHCP, AutoIP and IGMP to LWIP support

Postby Adam » Fri Dec 13, 2013 11:19 am

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.

Adam
Posts: 18
Joined: Thu Sep 05, 2013 1:53 pm

Re: Adding DHCP, AutoIP and IGMP to LWIP support

Postby Adam » Mon Dec 16, 2013 2:42 pm

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


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 9 guests