I'm using 3 Arduino Uno boards with Ethernet shields. Each is connected to my home Internet switch with an Ethernet cable. I assigned a different local IP address to each Arduino and gave each board a different MAC Address.
Each Uno is collecting temperature/humidity for a bedroom in my house. The data is sent to a MySQL Database using PHP/HTML.
They work fine for a while (5 minutes) and then they conflict each other. If I use one Arduino at a time it works fine, but I can't get them to work together.
Any idea how to solve the problem?
-
1Did you set the MAC address from the Shield? Or set it to an unique MAC address?Flovdis– Flovdis2014年10月21日 21:48:01 +00:00Commented Oct 21, 2014 at 21:48
-
Where is the conflict? On the network? In your router? In the Database?Passerby– Passerby2014年10月21日 21:52:39 +00:00Commented Oct 21, 2014 at 21:52
-
1post the ethernet set-up code. And perhaps an Admin should migrate this to the Arduino stack exchangeKyranF– KyranF2014年10月21日 22:16:25 +00:00Commented Oct 21, 2014 at 22:16
-
How do you know where the conflict is? Are you assigning IP address in the DHCP range? If so, it might be conflicting with other devices on your network.Matt Clark– Matt Clark2014年10月22日 22:38:15 +00:00Commented Oct 22, 2014 at 22:38
-
Well I create 3 sketches and put different IP Addresses to each one 192.168.0.177; 192.168.0.178 and 192.168.0.179. They work fine for a while without conflicts but after lets say 5 minutes the website become unavailable and it timed out. Its hard to explain and frustrating.Alfredo– Alfredo2014年10月23日 14:46:01 +00:00Commented Oct 23, 2014 at 14:46
1 Answer 1
It would be most helpful to see the code you're using and to know more about the configuration of your network and the symptoms of the conflict – for example where is the web site running?
Some things to try:
Simplify your network. Eliminate everything but the Arduinos and the web server. See if that changes anything.
Run the command
arp -a
(assuming you've got a machine running something UNIXish). It will show you the MAC and IP addresses of hosts on your network. Look to see if the Arudinos are still there and if there are any devices that conflict with them.Try to
ping
the Arudinos. Do they respond?Use
WireShark
ortcpdump
to monitor traffic on the network. Look for traffic to or from the Arudinos (by IP addresses and by MAC addresses).Add some debug code to the Arduino sketch so that you can watch what they are doing (send it out the serial monitor). See if what goes on the wire matches what you expect (monitoring with
tcpdump
).
Explore related questions
See similar questions with these tags.