Arduino WIFI


I´m new to Arduino.

I try to get my Arduino and Arduino wifi shield to work correctly without any progress. When I run the the code to do a setup for WAP with SSID and PSW I enter SSID and PSW into the code as it says.

I then run serial monitor and get a IP for my Arduino wifi. However when I then try to connect to it with TouchOSC or Arduino Manager through my iPhone it does not seem to find the Arduino wifi IP.

I am probably missing some basic input or modification to make this work.

Can some one please bring me some feedback of what i am missing or doing wrong? My computer is a MAC.

Cheers/ R

I am afraid you've bitten off a bit more than you can chew at the moment, but don't despair.

You are missing a whole lot more than a few basics and I can say that because I've made this work and had to learn a few things the hard(ware) way.

My current state of knowledge about the Arduino WiFi shield, or better the current set of libraries do not yet support the UDP protocol and there have been a numer of posts about this unfortuante fact on the forum. But that may be different now. That is important because the OSC protocol generally is based on UDP and ArdOSC is no exception.

If the Arduino WiFi shield does support UDP, you have another few hurdles to take. ArdOSC makes use of some lower level functions of the original Ethernet shield library that talk directly to the W5100 Ethernet chip on the Ethenet Shield through SPI. You'd have to rewrite these functions for the specific hardware of the Arduino Wifi Shield.

The above are most of the hardware limitations. There is one more that has to do with the memory requirements of the involved software libraries so an Arduino version with more memory, e.g. a Mega would work if you need space for your own code.

However, you can deal with all of the above if you are not shy of getting different hardware. E.g. Get an Ethernet shield, so you can work with ArdOSC right out of the box. If you want WiFi, then connect a little pocket router to it. I've used a TP-Link TL WR703n and a 702n. I'd recommend the 702n as it has a English user interface (if you buy it through regular US sales channels) the interface for the 703n is all Chinese. You can get the Ethenet shield on eBay for about $20. As long as it has a W5100 chip on it you should be OK. The router will set you back about $25. Together, IMHO that provides you with a lot more mature functionality than any of the WiFi shield currntly available at a much petter price point.

The next thing you are missing is that the reason services show up in TouchOSC is because these are services that are announced through Bonjour For TouchOSC to pick the Arduino up, you need to use the Arduino Bonjour library to register a service on the WiFi network that your iDevice is connected to.

BTW, the Bonjour Library also makes use of some lower level functions of the Ethernet shield library!

In my LED lighting systems instead of an Arduino I use the Arduino compatible Teensy++2 a WIZ812MJ Ethenet module and adapter also from PJRC. Together, including the router, all that is less expensive than the Arduino WiFi shield alone!

So, if I have not severely scared the crap out of you and you still want to go ahead with your project and are not afraid of occasionally pulling out your hair and are ready for a few setbacks, in that case you are in the right ace here and I'd be glad to help you along. Once it starts working its actually pretty darned cool!!!

Perhaps start with what you actually want to achieve as an end result and we'll go from there.

I Re- read your post. It appears that you had problems even for the iPhone to pick up the Arduino WiFi shield. This may also be an outdated statement but at least in the past the Arduino WiFi shield relied on ceiling an IP adds through DHCP from an existing WiFi router and then you could connect to the WiFishield through the router.

The Ethernet <-> TP-Link router does not have that problem. The router comes configured as an AP (Access Point). You plug it in and can connect to it right away with the iDevice of your choice!

Thx for the awakening information. :astonished:

I now see this is far from ready to use shield.
Ok let´s take 8 steps back and begin digging deep into this matter cause I need this.

What I want to achieve is this:
Be able to wirelessly through the ( for the moment) TouchOSC and Arduino Manager, control a rotary input and turn a stepper motor.
Be able to have a on-off switch function for controlling a LED.
Be able to run a DC motor cw ccw through a two button switch like “up” and “down”.

I was able to run the “Arduino Manager” and get some feedback from my ArdWiFi this morning but only temporary.
I have installed the Ethernet library and Bonjour library as you suggested.
But when I look at the code the IOSControllerWiFi.h and the EthernetBonjour.h they are in a different font color.
Does it mean they are not supported?

#include <SPI.h>
#include <WiFi.h>
#include <SD.h>
#include <Servo.h>
#include <IOSControllerWiFi.h>
#include <Ethernet.h>
#include <EthernetBonjour.h>

Thx once again for the help.

Somehow you missed at least half of what I wrote :~ I am not familiar with the ArdWiFi shield. Are you speaking about this device : ?

It looks to me that the WiFi module on that shield does NOT employ the WizNet W5100 WiFi chip from WizNet. So in essence, you''ll have to retire the ArdWiFi at least until you have a good bit more Arduino experience. Instead you need to get an Arduino Ethernet Shield. This one: You can get these relatively cheap at eBay for $20. A new original shield from Sparkfun will be about $45.

Then you need to obtain a TP-Link TL WR702n wireless router: for example at Amazon

As an alternative if it has to be a WiFi shield you could get the WiFly shield from Sparkfun Through two libraries - namely WiFly HQ and Ad=rdOSC for WiFly HQ this may support OSC but I have no personal experience with this hardware and cannot vouch for its function.

Once you have these devices (Ethernet Shield and router), let's continue the conversation.

The Ethernet library is !very! unlikely to work with your particular WiFi shield. It is meant to work directly with the original Arduino Ethernet shield that I've linked to above. The Arduino Bonjour library (that you can actually live without) relies directly on lower level functions of the Ethernet library. Any response you may have gotten from your WiFi shield does not involve any of these two libraries as they are hardware dependent on the presence of the WizNet W5100 chip.

Both, the ArdOSC library and the iOSCController library require the Ethernet library/shield.


You´re right I will pause this WiFi idé for now.
I need to get some more experience with the Arduino concept.

Thx and have a happy Ester.

Cheers/ R

OK. It sounds like you in a bit over your head. I’m working on a semi-similar project, but I’m using an easier route to do it.

I need web based access to both data and control from several devices simultaneously. I don’t want a full computer involved though.

My solution is an Arduino board with a Ethernet shield on it, that plugs directly into my router. The router provides the wifi, web access etc. The Arduino is the web interface and pulling data from the other devices. (It is also running some RGB lights nearby)

The base Arduino is also equipped with a NRF24L01+ based module, as are the sub units. This provides a simple, easy to use channel back to the base unit. The NRF24L01+ is easy to interface with and use, and has a reasonable range. If I wanted more, I might also add a 433Mhz unit with a proper antenna, which would work up to maybe 500m+

I’m not sure exactly how much complexity you need, but this might work out an easier solution for you.

Sorry to interupt but I m kind in the same situation :P I have created a sketch that works perfectly if I connect directly the ethernet shield to my computer. I have bought a TL-WR703N and flushed a modified english firmware to be able to use it properly. I set it up as a client and connected it to my computer and configured it to connect to my Home Router to be able to access the internet. I disabled my laptop's wifi card and only by using the WR703N as a client I was able to access the internet. Then I assigned a static IP address to the WR703N from my main Home Router and port forwared TCP-UDP ports from 80-5881 for the specific static IP. Then I plugged the WR703N to arduino and tried to reach the server locally but I couldn't. The WR703N was pingable at the local IP but I just couldn't reach the arduinos server. What did I miss?


I am doing a project in which we need to send the analog input values on arduino to web server via ethernet shield + WR702N router. I have problems connecting the router to the ethernet shield. Can you please help in this regard?

hamzalgs: I am doing a project in which we need to send the analog input values on arduino to web server via ethernet shield + WR702N router. I have problems connecting the router to the ethernet shield. Can you please help in this regard?

You may want to start a new discussion concerning your project.