Go Down

Topic: WiFi Shield - Can't set IP Address (Read 7545 times) previous topic - next topic


I just purchased the official Arduino Wifi shield for a project. The purpose of the project is to have a standalone Arduino running and have the ability to interact with it from my phone. Using a webserver on the Arduino side and the browser in my iphone seemed like a good way to do this.
      "Standalone" = Arduino system running by itself, with no connection to any other computer, taking in analog / digital inputs, and then broadcasting that data via 802.11.

Now that I have the shield, and using it, it seems that the only way for the Wifi shield to function as a server, is that it must first get an IP address assigned from a DHCP server, and then the phone (external browser) can contact the Wifi shield using the assigned IP address assigned. I got this to work with my iphone, but the s/w requires the Arduino Wifi shield to phone home to the router in my house and get an IP address assigned.   However,  this won't work for a standalone - i.e., no DHCP server - application.

IMHO, this is a huge shortcoming for a device (Arduino) which is often used in a standalone application.   Requiring that an external DHCP server be used is a big problem for many applications where the Arduino will be used by itself.  For the USD 85.00 which I paid to Sparkfun for this board - plus the extra Uno I bought to work with it for my project - this is very disappointing.

1) Does anyone know if there is a fix in the works for this in the shield / library software?   
2) Does anyone have a work around for this?

Thanx, JG


The WiFi shield allows the Arduino to join a network, not BE a network. If you expected the Wifi shield to create a network, I'd afraid you had incorrect expectations.
The art of getting good answers lies in asking good questions.


Reading material

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


Thanks for the reading material - I had seen several of those postings before I submitted my post (I always try to search before I create a new topic).

The status of the situation - the Wifi shield can't respond to client requests without first joining another network - is clear.  However, my question is whether this is a satisfactory situation and whether this will change in the future.   In my relatively short experience with the Arduino, they seem very suitable for real world situations where they can operate by themselves - WITHOUT the need to depend on an external computer / router / etc..   Program them up, provide them with battery power and we're off to the races.  It's disappointing to see that this "official" Arduino shield apparently can't operate in this fashion.

I've done a couple projects using the LCD shield and buttons for my HMI interface, which works, but.....   Now I want to go to the next level and interact with them using my iphone.   

From the posts, it would appear that the only good way to do this is to use some sort of external router - this one https://www.google.com/search?q=TP-Link+wr702n&aq=f&oq=TP-Link+wr702n&sugexp=chrome,mod=4&sourceid=chrome&ie=UTF-8    seems promising.   Now I just have to get the DC/DC converter to power this from a DC battery source.


Dec 23, 2012, 07:43 pm Last Edit: Dec 23, 2012, 07:47 pm by Headroom Reason: 1
The solution with the little TP-Link router works quite nicely. I've done it in two projects. It's also less costly as an Ethernet shield + Router together are less costly than the Arduino WiFi shield.

If you can find a battery  power source that is close enough to 5V you can run the TP-Link directly off of the Arduino as the router is powered through a USB cable and actually comes with a little 5v USB wall wart.

If yu are located in the US, make sure you get the rout through a US source so you can avoid having to mess with an all Chinese user interface for set-up. It comes pre-configured as an Access Point, but if you want to integrate it into an existing network having an English user interface makes things easier ;-)



I was going to start a new topic asking this precise question. But I assume it would be better to add it to this existing thread.

I need my WiFi shield to use a fixed IP address on my network. I need to be able to set the shield's IP address, subnet and gateway prior to setting the SSID and password. The Ethernet shield allows for this directly in its .begin() function. I went through the WiFi library and can't find any way to do this.

I am sure I'm missing something as I can't imagine any reason why the Ethernet shield would be able to create a network client connection and the WiFi shield would not...

Any ideas anyone?



I might be answering my own question... according to this thread, going back to October, it is not possible to set a static IP address on the WiFi shield even though it is possible on the Ethernet shield:




Best wishes for 2013!

Same situation here, I wanted to access a simple web server runnning on my newly acquired Uno / WiFi shield sitting on my home network from the internet, and this won't work. Until a new version of the WiFi library comes out?


Bonne année Pat !


Same situation here, I wanted to access a simple web server runnning on my newly acquired Uno / WiFi shield sitting on my home network from the internet, and this won't work. Until a new version of the WiFi library comes out?

You might want to take a look at the DHCP setup on your router. Many routers allow you to attribute a static IP address, coming from the DHCP system, by the unique MAC address of the client. In this way you could be able to tell your router to always give a given IP address to your Uno/WiFi based on its MAC address which will always be the same.

It might be worth a try?

Go Up