Reputation: 65
What would be an example of how to set the Arduino to have a static IP address?
I am looking for a function similar to the statement below from the Ethernet Library.
Ethernet.begin(MACadr, IPaddr);
I using a Wi-Fi shield.
Upvotes: 2
Views: 3616
Reputation: 11
What I did in my situation was to set a Reservation on my router for this MAC address. This makes the code simple. For some reason, the MAC address that my WiFi shield was supposed to use isn't what it actually uses. I was able to look at the DHCP table on the router and find the MAC address it was using and create a reservation and we are good to go...
Upvotes: 0
Reputation: 36
"WiFi.config() allows you to configure a static IP address as well as change the DNS, gateway, and subnet addresses on the WiFi shield."
You can read more about this here: http://arduino.cc/en/Reference/WiFiConfig
Upvotes: 1
Reputation: 4150
Sorry, this is not possible. The reference for this claim is here.
Basically, all the DHCP stuff (the code that assigns the dynamic IP address) is baked-in to the firmware for the WiFi shield, and this code is not open, so you cannot update it.
Upvotes: 2