|
From: | Ricardo Schoof |
Subject: | [lwip-users] LWIP + IGMP |
Date: | Tue, 7 Apr 2015 16:33:27 +0200 |
Dear all, I want to receive UDP-packets from a multicast message. The system currently can receive unicast messages. To receive multicast messages I’ve set the following settings in lwipopts.h #define LWIP_IGMP 1 #define MEMP_NUM_IGMP_GROUP 8 Also in the initialize function I’ve set the right flag netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_UP | NETIF_FLAG_IGMP | NETIF_FLAG_ETHERNET; The initializing of the IGMP-group is as follows uint16 port; ip_addr_t groupAddress; getParamatersFromTransmissionGroup (group, &port, &groupAddress); __udpSocket = udp_new (); MF_ASSERT (__udpSocket != NULL); err_t err = udp_bind (__udpSocket, IP_ADDR_ANY, port); MF_ASSERT (err == ERR_OK); err = igmp_joingroup (&localAddr, &groupAddress); MF_ASSERT (err == ERR_OK); udp_recv (__udpSocket, data_received, this); When I send data directly to the IP address assigned in LWIP I get to the breakpoint in data_received. However when I change the destination IP address to the one configured in groupAddress, I get no data at all. I’ve made some tests in Wireshark where I captured the packets. The test system consists of three devices 192.168.172.1 > Router 192.168.172.20 > Computer with Wireshark 192.168.172.113 > LWIP Device I’ve attached the capturefile done in Wireshark, In this file you can see the LWIP device responds to a query. If you need any more information, please reply to this mail. Met vriendelijke groet, Best regards, Ricardo Schoof | R&D Engineer |
capture.pcapng
Description: capture.pcapng
[Prev in Thread] | Current Thread | [Next in Thread] |