This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NetError when using netUDP_Send() multicast with different IP-Ranges

Hello, first at all, sorry if I ask a question that is solved here in the past. The search function in the forum seems to do not work…

My problem is to send a UDP-Multicast from a PC (10.1.2.3/255.255.0.0) to a STM32-Board with an IP away from its range. For Example 132.0.6.30/255.255.0.0.

If I use the same configured UDP-Socket, but with a remote IP of 132.0.6.20 it works. Also a remote configuration of 132.0.1.19 works.

At my knowledge, I expect that in case of UDP-Multicast the IP-Range of the Clients do not take care when both clients are in the same multicast-group.
Are there any checks inside the netUDP_Send()-Function they returns “NetError” if the IP-Ranges of host and remote is too far away from each other?

An overview of my configuration:
PC-side:
10.1.2.3(255.255.0.0)

STM32:
MDK Network Component V 7.10.0
netIGMP_Join(0, sgroup); // sgroup = 224.0.5.128
netUDP_SetOption(socket, netUDP_OptionTTL, 2); // socket = 2
sendbuf = netUDP_GetBuffer(rply_len);
netUDP_Send(socket, remoteAddr, sendbuf, rply_len); // remoteAddr = PC-IP-Address

Thanks a lot for all advice!

Parents
  • When a device joins a multicast group, the host can receive packets in this group.

    So, if you join the 224.0.5.128, you can accept UDP packets for this address. When you leave 224.0.5.128, you will stop receiving packets for this group. That's all.

    If you send a packet to 132.0.6.30, it's not multicast, but unicast. Unfortunately, this is a different network than your computer's network. This way, the PC will redirect the packet to the default gateway to reach another network.

Reply
  • When a device joins a multicast group, the host can receive packets in this group.

    So, if you join the 224.0.5.128, you can accept UDP packets for this address. When you leave 224.0.5.128, you will stop receiving packets for this group. That's all.

    If you send a packet to 132.0.6.30, it's not multicast, but unicast. Unfortunately, this is a different network than your computer's network. This way, the PC will redirect the packet to the default gateway to reach another network.

Children