WIZnet Developer Forum

[WIZ750SR] Multicast problem

Hi,

I am working with Wiz750SR (firmware version: 1.2.4).
Could you share some information about sending multicast UDP packets from WIZ750SR?

I tried the following, but it did not work:
Operation mode: UDP
Local IP: 192.168.11.11
Subnet mask: 255.255.255.0
Remote host: 239.1.1.11

If I change the remote host to 192.168.11.3 (unicast) it works, but I would need multicast support.

Thanks

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.

W7500x_S2E_App_1.2.4_multicast.bin (41.1 KB)

This can be modified from the link 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 updated the firmware version to v1.2.5.
You can download bin file on github.
It check if the destination IP is a multicast IP as you say.


Thank you for your opinion

1 Like

Hi Becky,

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)

I hope you can help me with this matter.

Best,
Lukas

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.

Yes.

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)

  1. Unicast socket open
  2. 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?

I’m afraid that is not possible for my use case.

  1. What about using only unicast socket but sending to a multicast IP?
  2. What about using multicast socket but not joining multicast group?

Anyway, thanks for your help and fast replies.

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 think this is exactly what I am looking for!

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?

Thanks again

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.


image

Hi Becky,

I tested the modified firmware and it worked :slight_smile:

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!

Here are that.:grinning:
It’s good that it helped.

W7500x_S2E_App.bin (99.9 KB)

1 Like

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.