Hi Carlos,
Thanks for the link, I had already found that on Google already. I will try to hit up their forums to see what I can find. I am just wondering if this is a Kinetis specific problem.
Here is what I have done in the past few days to try to get this working. To simplify I am working inside of the example project of projects provided with KSDK 1.2:
C:\Freescale\KSDK_1.2.0\examples\twrk60d100m\demo_apps\lwip\lwip_udpecho_demo\udpecho_rtos\udpecho_mqx\kds\lwip_udpecho_demo_mqx.wsd
-imported this into a blank workspace.
-everything compiles as usual.
-I can ping the tower board and send UDP packets which are echoed as expected.
I then reconfigured this example to receive multicast messages:
-Added the following line to the udpecho_thread function in main.c:
err = netconn_join_leave_group(conn, &multicast_ip_address, &local_ip_address, NETCONN_JOIN);
-Calling this requires that LWIP_IGMP be defined as 1
-Also we must define LWIP_RAND()be defined so we added the following in main.c:
#define LWIP_RAND get_random_value
uint32_t get_random_value(void)
{
uint32_t num;
uint8_t seed_value = 17;
srand(seed_value);
num = rand();
return num;
}
Everything seems to work fine and looking at the debug dialog and wireshark we are successful at broadcasting the multicast join message.
However, we could still not receive messages.
I temporarily enabled promiscuous mode (ENET_RCR[PROM]) and this works, messages come through as expected.
So I guess my question at this point is how to implement the function to filter MAC address to allow the multicast messages through?
I am specifically talking about the area in igmp.c, around line 500:
/* If first use of the group, allow the group at the MAC level */
if ((group->use==0) && (netif->igmp_mac_filter != NULL)) {
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup: igmp_mac_filter(ADD "));
ip_addr_debug_print(IGMP_DEBUG, groupaddr);
LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", netif));
netif->igmp_mac_filter(netif, groupaddr, IGMP_ADD_MAC_FILTER);
}
Any ideas?
Thanks,
David