Hi, it's my first post about Arduino, and sorry for my bad English...
Now, I make a project consists of three Arduino Megas, and each of them have Ethernet Shield. Well, I want to make a simple send and receive procedure between them using UDP. Each of Arduino, say it Arduino 1,2 and 3, have IP Address, as you can see below:
Arduino 1 : 22.214.171.124
Arduino 2 : 126.96.36.199
Arduino 3 : 188.8.131.52
int portUDP 9600;
From this IP Address configuration, for example, I want to send string "gH" from Arduino 1 by using write() one by one to each Arduino. The result is each Arduino (2 and 3) can't receive this string. When I using broadcast method (send to 184.108.40.206), that is by using:
IPAddress broadcast 220.127.116.11;
Arduino 2 can receive the string, even though Arduino 3 still can't receive it because it have different subnet (perhaps).
I am sorry, I still noob about networking etc., but how can I solve this problems, at least I can send and also receive this simple string from one Arduino to another Arduino?
And, in my setup, I only set for Ethernet begin statement like this:
Ethernet.begin(mac, ip); //ip Arduino 1, 2 or 3
Is it necessary for me to set other configuration like dns, gateway and subnet mask? Do you have any recommend setting so it can be work as I expected?