1. Download the WiShield library that has been optimized and fixed by users:
2. Rename the folder to WiShield and put it into Arduino_sketch_folder/libraries
You might notice that just running a sketch with the WiShield library will generate errors like:
3. In order to get rid of these error you need to change the corresponding names in the following files:
clock-arch.c
Replace #include “wiring.h” with #include “Arduino.h”
WiShield.cpp
Replace #include “WProgram.h” to #include “Arduino.h”
WiServer.cpp
Replace #include “WProgram.h” to #include “Arduino.h”
Replace void Server::write(uint8_t.. to be size_t Server::write(uint8_t..
WiServer.h
Replace virtual void write(uint8_t); to virtual size_t write(uint8_t);








David 18:21 on February 24, 2012 Permalink
Great tip!
However, to make it work with my yellowjacket board, I had to take the regular WiShield github branch. The Wishield_user_contrib branch may have been forked before something was fixed. But I took the newest files from the user_contrib (WiServer.cpp, apps-conf.h, g2100.c and uip.c) to get advantage of their fixes too, and then made your modifications, and it is working fine now!
Thanks!
Tommy Thorn 02:09 on March 12, 2012 Permalink
I wonder why we get a different result. The latest Arduino IDE I see is 1.0. When I installed on my mac and I apply the changes you suggest I get
In file included from webserver.c:38:
/Volumes/tommy/Documents/Arduino/libraries/WiShield/webserver.h:43: error: conflicting types for ‘uip_tcp_appstate_t’
/Volumes/tommy/Documents/Arduino/libraries/WiShield/server.h:65: error: previous declaration of ‘uip_tcp_appstate_t’ was here
I notice that the Rugged Circuits Version 1.3.1 gives me the same result, so
what am I missing? Thanks.
Tom Ashe 19:40 on March 19, 2012 Permalink
Tommy… This is what you are missing, if you have not found it already. The errors you are getting are caused by the apps-config.h file. It has a series of #defines that are supposed to be commented out and uncommented for the sketch you want to run.
The file comes with the APP_WISERVER uncommented. This causes the errors you are getting.
The fix: comment this out and uncomment APP_WEBSERVER and the errors will disappear. Nothing else is required, if you downloaded 1.3.1 from Rugged Circuits.
Pedro 22:13 on March 25, 2012 Permalink
i have the same issu when i try to compile and example.
Can anybody tell me what i am doing wrong plz.
orcuthe 15:42 on April 2, 2012 Permalink
Worked fine with Wifi Bee.
Thanks a lot.
Ron 18:33 on April 9, 2012 Permalink
Same here? all the above changes where done…
In file included from /Users/dvdrony/Documents/Arduino/libraries/WiShield/request.cpp:32:
/Users/dvdrony/Documents/Arduino/libraries/WiShield/WiServer.h:198: error: conflicting return type specified for ‘virtual void Server::write(uint8_t)’
/Users/dvdrony/Desktop/~Arduino/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h:48: error: overriding ‘virtual size_t Print::write(uint8_t)’
Thanks!
Ellen 15:07 on April 13, 2012 Permalink
@Ron You need to change the return type to size_t in WiServer.h in order for Print.h do follow the interface.