WiFi Shield - Can't set IP Address

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.

Reading material

https://www.google.com/search?hl=en&as_q=WiFi+IP+Address&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=http%3A%2F%2Farduino.cc%2Fforum&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=

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 TP-Link wr702n - Google Search seems promising. Now I just have to get the DC/DC converter to power this from a DC battery source.

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 :wink:

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?

Thanks.

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:

http://arduino.cc/forum/index.php/topic,126817.0.html

:frowning:

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?
XD

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?