W5300 UDP Multicast Join/Report

For some reasion I don’t get the IGMP join/report message by init a socket to udp Multicast. Sometimes the same code on another device work 100% fine. In everycase the transmitting messages will be sent to the ethernet but because the missing join/report not forwarded by every switch.

Also I am missing a join/report after disconnecting the lan cable and reconnecting it to another switch for example.

my code:
setSn_DHAR( s, multicastMac );
setSn_DIPR( s, multicastIp );
setSn_DPORTR( s, multicastPort );

IINCHIP_WRITE(Sn_PORTR(s),multicastPort ); // Same Port for both to handle receive and transmit in one socket
setSn_CR(s, Sn_CR_OPEN);

If it is proven you must check what is the difference. MAC address?

Some time ago I was playing with multicast to find out that it does not work (disabled/not configured) over internet.

Would be good if you share network logs.

I have two device with the same firmware to use the UDP Multicast group.

The one that is working fine does have the IP
The not working does have the IP

the IGMP message of the …58

one of the multicast messages of…58

one of the multicast messages of…10

the IGMP Message is missing for that device.

Because the missing IGMP Join/Report one of my switches (DGS-1008D) does not forward the multicast messages to this device.

Ok, can you compare messages to fin dout what is different other than IP address?

The only difference are MAC, IP and Data. Thats why I am so irritated to this.
I already changed the IGMPv from 1 to 2. But nothing.

And what is the difference exactly? Did you perform analysis of differences?

What you mean exactly with


I have a third hardware that is making my irritation perfect. This device sends the IGMP message only every second boot. It seams to be not a software bug. Any Idea

But i never get a join/report after disconnecting the lan cable and reconnecting it to another switch. Is that normal? Does i have to reinit the socket for that functionality?

The sending process is only dependent on the chip. If it does not really send the message then there’s something wrong in the driving code. However “not received by another host” and “not sent from here” are different matters. You must watch for messages being sent on the device directly connected to the W5300 (e.g. in bridge mode) ensuring it does not perform any filtering. If there’s a switch or anything else in between contents of the packets may be altered, or packets can simply be discarded.

I am directy connected to the W5300 device with a seperate ethernet card of my PC, to look for the IGMP messages.
And to look to more then one device at the same time I use a HUB (Netgear DS106) and no switch between the devices and my PC.
To trace the ethernet data I use Wireshark with an empty filter.

Is it maybe possible that my Init of one socket to the multicast is that quiek after power up the device, that the w5300 interface is already active but the connection to the physical ethernet is still not working?
The W5300 is thinking he sends the IGMP message but it will not be received from the PC/Hub/Switch on the other side of cable?

Not sure I understand the topology. W5300 is having only one ethernet port, and if it is connected to your PC then your PC must forward packets to outer world.

Only direct connect will give you guarantee.

I tried both. With Hub and directly.

[W5300]---------[PC with Wireshark]

[W5300]-----[HUB]-----[PC with Wireshark]

It seems to be a bootup problem. In case of closing and connecting again to the multicast group while running, everything is working fine.
I have to look to my Init and to do the connecting a bit later. (hopefully)

Still open issue:

But i never get a join/report after disconnecting the lan cable and reconnecting it to another switch. Is that normal? Does i have to reinit the socket for that functionality?

Any ideas?

No idea… does it send anything when opening socket in multicast mode? If yes, then you will have to reopen socket.

When plugging cable into another switch you may need to wait some time until it will finish training the line and get logical link up. If you disconnect and reconnect to same PC, does it continue working?

If I do the opening again, a IGMP report will be send. That i can do periodically and that works. But this solution is not that smart. How can I get the Link-Status? I don’t find any register for that information .

Many thanks for your help.

Register 0x2E “PHYCFGR”, bit 0.

Wrong statement, see below…

The documentation is telling me in chapter Multicast (Page 108)

After opening SOCKET, “Report” message is automatically & periodically transmitted.

Is that an error? Or do I have to activate this?