UDP Multicast support
General
No replies yet. Be the first to reply.
Join the discussion.
General
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: UDP Multicast support
by scarlet ·
Currently, there are no examples provided by Wiznet. You have to implement it yourself using the basic UDP example.
– UDP multicast refrence–
– UDP example –
from machine import Pin, SPI, UART
import network
import usocket as socket
spi = SPI(0, 2_000_000, mosi=Pin(19), miso=Pin(16), sck=Pin(18))
nic = network.WIZNET5K(spi, Pin(17), Pin(20))
nic.active(True)
nic.ifconfig((‘192.168.11.106’, ‘255.255.255.0’, ‘192.168.11.1’, ‘8.8.8.8’))
UDPServer_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
UDPServer_socket.bind((‘192.168.11.106’, 8888))
while True:
data,addr= UDPServer_socket.recvfrom(30)
print(data, addr)
RE: RE: UDP Multicast support
by Miki1 ·
Thank you @scarlet. In my view, the key advantage of UDP multicast is that it eliminates the need to set up the IP of each individual device.
However, this example assigns an IP to the device prior to setting up the listener.
The devices can simply listen to a MULTICAST_GROUP/PORT without any initial configuration. This makes UDP suitable for device discovery and remote network setup.
Can you point me to a different example that illustrates the use of UDP multicast listening without explicitly setting the IP of the device?
Can you at least confirm that W5100S supports the feature?
RE: UDP Multicast support
by scarlet ·
Hello, @Miki1
It’s been a while, but I have written a UDP multicast example for a personal project. Please refer to the GitHub link below:
I apologize for not being able to provide support sooner. I hope this helps, even if it’s a bit late.
Thank you.
RE: RE: UDP Multicast support
by Miki1 ·
Thanks for the heads up. Quick question, is it possible to listen to a multicast group without setting the ip of the device? I looked at the examples provided and it does not seem clear.
Best regards.