Hi
I have an ARDUINO Due continuously sending data packets through UDP to another ARDUINO Due. This works fine at a speed of close to one magabytes/sec.
I would like this data to be received simultaneously by 2 additional receivers.
Does anybody have an idea how to implement this application? managing ports/Ips...?
Thanks in advance
I looked in this reference and got quite confused, maybe because I am not so familiar with the internet terminology.
All I need is to transmit packets of data to 2 to 3 recipients in parallel.
Within the local net, there are no other internet users: only one Arduino Due transmitting data and 2-3 recipients to receive this same data. There is no requirement for data flowing back from the recipients to the sender.
There must be some simple solution, besides MULTI-CASTING.
Thanks for any assistance.
Have you considered sending the UDP packet to the broadcast address?
MDNARD10:
IThere must be some simple solution, besides MULTI-CASTING.
What makes you think multicast is not simple and there should be a simpler solution?
Multicast is supported by ethernet directly and is the most efficient way to send to a group of targets.
Broadcast is a little simpler - no special enable neccessary -,
but with broadcast all node would be forced to receive the traffic.
Whandall:
Broadcast is a little simpler - no special enable neccessary -,
but with broadcast all node would be forced to receive the traffic.
Only nodes that are listening to that port.
Broadcasts will be received always by the hardware, regardless of the port. IIRC
Filtering for protocols/port is normally done in software.
Technically that is true for all localnet traffic.
Thank you gentlemen for trying to help.
If I use broadcasting with a destination address of (255,255,255,255) do I understand correct if I say that the IPs of the receivers are not relevant? (They are needed in the Ethernet.begin statement in the receivers code). Also, do I need more than one port for the parallel communication between transmitter and receivers ( to be defined in transmitter and receivers code)?
Thanks
Use the localnet broadcast IP. If the IP of your device is 192.168.0.2 and the subnet mask is 255.255.255.0, then the localnet broadcast IP is 192.168.0.255.
The devices are not actually connected to any external network. There is an Ethernet switch with Ethernet cables to the transmitter and each receiver. In this case, Is there any meaning to subnet and gateway?
The subnet affects the broadcast IP. The broadcast IP is the highest IP in the localnet. If you want, I guess if you set the subnet to 0.0.0.0, you could use 255.255.255.255 as the broadcast address.
Conclusion, solved:
One transmitter, 3 recipients.
Any IP can be assigned to devices.
Transmitter destination address: the broadcast address (255,255,255,255).
Using Due with DMA, Broadcast working up to 1 Mbytes/sec speed, tested through monitoring of received data.
Thank you very much for your assistance.