The WIZ750SR firmware does not support multicast.
For multicast communication, you must set Multicast IP and port in Destination IP and port and set Sn_MR [7] = 1 before opening socket.
So I prepared a bin file for you.
I added multicast configuration to v1.2.4 firmware as shown below.
Thanks for the fast response!
I made a quick test and it looks like it works.
On the firmware I guess I should check if the destination IP is a multicast IP and only then apply the changes you made (so that a unicast IP still works).
I finally had some time to test the new multicast feature, but had some problems if working with two or more devices (wiznet module + serial device). The problem is that each device receives the outgoing traffic of all other devices, i.e. not only the remote host (linux machine) which joins the multicast group receives the udp packets, but all other devices too.
What I’m trying to achieve:
Each device sends Uart-Udp data to multicast IP address.
Each device listens for Uart-Udp data using local IP address and NOT joining multicast group.
Example configuration:
Device A:
Operation mode: UDP
Local IP: 192.168.11.11
Subnet mask: 255.255.255.0
Remote host: 239.1.1.11
Device B:
Operation mode: UDP
Local IP: 192.168.11.12
Subnet mask: 255.255.255.0
Remote host: 239.1.1.11
Remote host:
Local IP: 192.168.11.100
Opens Udp Multicast socket and joins multicast group at 239.1.1.11
Sends data to device A and B using their local IP addresses (192.168.11.11 and 192.168.11.12)
Is device A and deviceB WIZ750SR and Server is Linux?
In multicast socket, WIZ750SR can receive unicast data, but can not send to unicast address.
WIZ750SR in default setting receive unicast data in multicast mode.
So it is not WIZ750SR, the actions you said are possible without modification.
In multicast socket, I want that WIZ750SR sends data to multicast IP and ONLY receives data on local unicast IP. I do not want that WIZ750SR receives multicast data.
The problem is, that WIZ750SR joins the multicast group and therefore receives multicast data sent from other WIZ750SR modules.
I used Wireshark to analyse the network traffic and saw that each WIZ750SR joins the multicast group and sends IGMPv2 Membership Report messages.
Is it possible to use multicast socket without joining the multicast group?
Unfortunately there is no function to block multicast packets in multicast mode.
If not, it seems that you have to open and close a socket every time you send data to a multicast group.
EX)
Unicast socket open
unicast socket close-multicast socket open-data send-multicast socket close-unicast socket open
Seems to have to repeat.
In this case, an IGMP leave packet is sent whenever the socket is closed.
is it OK?
It is possible, but Multicast join packet is not transmitted.
I tested it like this:
192.168.0.5 is W7500, open socket with Unicast, and send data to multicast address when receiving data.
1.Transfer data to 192.168.0.5 via Hercules
2. The W7500 receives the data and sends it to 234.5.6.7 (multicast).
3. Check the data sent by the W7500 with the Multicast Test Tool Receiver.
The Multicast Test Tool I used received the data the W7500 sent without a join packet. I think you should check this on your Server.
I tested this with WIZ750SR firmware version 1.2.4 but could not get any output, i.e. WIZ750SR did not send any multicast packet (I checked with Wireshark and had an UDP multicast socket join the multicast group).
Could you tell me your exact configuration (port, subnet, …)? And did you use a different firmware version?
I use DHCP funcion but you should add code to send data to multicast mac address.
So i used mac send command because sendto() in ioLibrary use send command.
I attach the modified bin file and modified project . W7500x_S2E_App.bin (99.9 KB) WIZ750SR-forlooki.zip (2.6 MB)
I commented “for looki” on the edit. This is in the seg.c.
please check it.
One (hopefully) last request: Would it be possible to add an if/else statement to check if the remote IP is unicast or multicast and only apply this modifications if remote IP is multicast?
if remote IP is multicast: use the modifications you made
if remote IP is unicast: use sendto() as in previous firmware version
Again, thanks a lot for your help and fast responses!