Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18599

Re: UDP with local loopback

$
0
0

Thanks Clay!

I tried to replace ARDUINO_ETH to "lo" and it proved to be working. The other link you added is very helpful.

 

One thing I noticed is that the line `Udp.begin(localPort);` needs to use a different port number than the target port in `Udp.beginPacket(ip, targetPort);`, when both sending and receiving are in the same device. It's probably a very stupid error but it took me quite some time to figure out.

 

And adding another ip address to the eth0 interface seems to be a really good idea(As mentioned by Marclll in the linked post). This way I don't need to change the defined network interface in Arduino library, while still achieving the goal. I'm currently going this way.


Viewing all articles
Browse latest Browse all 18599

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>