The code just hangs at “Getting IP…”
I’ve checked Ethernet Cables, restarted the router. It was working last night. I load the same code into another Mega and ethernet board and it comes right up.
After about 10 minutes I get “DHCP Failed” same router, same board configuration.
Ideas?
Thanks in advance!
Jim-
I don’t know anything about your specific project, but the error you describe makes it sound like there may be a problem with your router or other device that assigns IP addresses using DHCP. Your other board that works successfully may have already been previously assigned an IP address. If you try to bring a brand new device, of any type, to your network, does it successfully get assigned an IP address?
One thing to be aware of is that no two devices on your network can have the same MAC address.
Arduino Ethernet shields (is that what you’re using?) aren’t assigned a unique MAC address during the manufacturing process, instead you can assign it in the code.
If you’re using the standard Blynk sketches then no MAC address is specified or used in the connection string, so presumably some sort of default MAC is used, which could presumably be conflicting with some other device on your network.
I would disconnect everything from the router (and reboot it in the process - I assume you’ve tried this already?) and turn off WiFi then try again with an Ethernet cable connecting your device directly to the router. If it connects then also connect your PC to the network and run an IP scanner utility (Advanced IP scanner is my favourite) and make a note of the MAC address that the board is using.
If it doesn’t connect with just the one device connected to your router, but other devices are connecting okay via DHCP then my guess is that your Ethernet shield has died.
Pete.
Thanks to all.
For whatever reason it just started working. Somewhere in the numerous router resets, re-cablin and sighs of exasperation I guess the DHCP decided to work.
(I did also try to nail the IP address. That didn’t work either.)
I’m glad it’s working but I wish I knew why…
Thanks again everyone.
Jim-