Pages: [1]   Go Down
Author Topic: WiFi Shield - Can't set IP Address  (Read 2779 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49310
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Tesla Member
***
Karma: 143
Posts: 9593
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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=
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ;-)
« Last Edit: December 23, 2012, 01:47:55 pm by Headroom » Logged


Asnieres sur Seine - France
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Asnieres sur Seine - France
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

 smiley-sad
Logged

Meylan, France
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Hello World
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
 smiley-lol
Logged

Asnieres sur Seine - France
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Bonne année Pat !

Quote
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?
Logged

Pages: [1]   Go Up
Jump to: