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.
Todd 12:36 on May 6, 2012 Permalink
Thank you, just what I was looking for.
Alexander 10:48 on May 10, 2012 Permalink
Hi, i’m an Italian Student and i have some problem to compile my first wifi arduino application.
The ide write this error:
SimpleServer:15: error: conflicting declaration ‘const prog_char ssid []‘
config.h:43: error: ’ssid’ has a previous declaration as ‘char ssid []‘
how i can fix this?
thanks to all…
NelsonConect 01:38 on May 13, 2012 Permalink
Its work for me, but the wishield with flash dont work.
Ellen 08:45 on May 31, 2012 Permalink
Hi Nelson!
How is your setup with wishield with flash?
Pozza 23:23 on May 31, 2012 Permalink
Alexander
I had a similar problem with conflicting declarations. It was due to me having 2 versions of the same file, as the board I used, had it’s own version of the file.
remove one, and that fixed it for me.
Hope this helps.
Ady 22:31 on June 14, 2012 Permalink
In file included from D:\download\arduino-0023\libraries\wifilib/apps-conf.h:46,
from D:\download\arduino-0023\libraries\wifilib/uip-conf.h:141,
from D:\download\arduino-0023\libraries\wifilib/uipopt.h:104,
from D:\download\arduino-0023\libraries\wifilib/socketapp.h:41,
from socketapp.c:46:
D:\download\arduino-0023\libraries\wifilib/webserver.h:46: error: two or more data types in declaration specifiers
Ady 22:31 on June 14, 2012 Permalink
pls help me!!!
matt 16:17 on June 20, 2012 Permalink
Hi Ellen,
following the posts on (Ellen 17:22 on February 17, 2012 | 14) and (Tom Ashe 19:40 on March 19, 2012 ), i got the WebServer example to upload and work,
then i tried to get the TinyREST server to work and started getting:
TinyREST_mpb20120619b:17: error: conflicting declaration ‘const prog_char ssid []‘
/Users/matt/Documents/Arduino/libraries/WiShield/config.h:44: error: ’ssid’ has a previous declaration as ‘char ssid []‘
where are (Pozza 23:23 on May 31, 2012 ) multiple versions hiding?
i have deleted Arduino 1.0.1 on my Mac and i still get the same errors.
i went back to the WebServer and it also is giving me the same error now, even though it had uploaded and worked,
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=101 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard -I/Users/matt/Documents/Arduino/libraries/WiShield /tmp/build6266653682354258881.tmp/WebServer_mpb20120617.cpp -o /tmp/build6266653682354258881.tmp/WebServer_mpb20120617.cpp.o
WebServer_mpb20120617.cpp:19: warning: only initialized variables can be placed into program memory area
WebServer_mpb20120617:15: error: conflicting declaration ‘const prog_char ssid []‘
/Users/matt/Documents/Arduino/libraries/WiShield/config.h:44: error: ’ssid’ has a previous declaration as ‘char ssid []‘
WebServer_mpb20120617.cpp:24: warning: only initialized variables can be placed into program memory area
WebServer_mpb20120617.cpp:28: warning: only initialized variables can be placed into program memory area
WebServer_mpb20120617.cpp:49: warning: only initialized variables can be placed into program memory area
Youmna 03:21 on June 25, 2012 Permalink
THANKS!!@
Brian Ballsun-Stanton 19:31 on July 11, 2012 Permalink
Matt, I made, in config.h, char ssid to prog_char, and in the demo, removed the constant.
Chrigu 12:53 on October 27, 2012 Permalink
God thank you soo much Ellen! I spent already hours trying to fix things!
Christian 23:00 on November 7, 2012 Permalink
Hi Ellen, I just got one error now: /Applications/Arduino.app/Contents/Resources/Java/libraries/WiShield/clock-arch.c:44:10: error: #include expects “FILENAME” or This is pointing on: #include “Arduino.h” which seems strange? Can you pls help?
Poledust 20:33 on November 25, 2012 Permalink
I have made the changes that you have suggested here and it did allow me to load to the mega 2560 but the Wishield 2.0 still will not light up and I cant see the Wishield over wifi. In case I am in the wrong place I am using a Arduino mega 2560 with a Wishield 2.0 I have found several blogs and or sites with so many different solutions to this problem and I have tried all of them and still it doesnt work I dont know much about this stuff to get to deep on my own. I would appriciate any help!
liuxy 05:52 on January 19, 2013 Permalink
help me !!
void udpapp_init(void)
{
uip_ipaddr_t addr;
struct uip_udp_conn *c;
uip_ipaddr(&addr, 192,168,1,100);
c = uip_udp_new(&addr, HTONS(0));
if(c != NULL) {
uip_udp_bind(c, HTONS(12344));
}
s.state = STATE_INIT;
PT_INIT(&s.pt);
}
udpapp.c: In function ‘udpapp_init’:
udpapp.c:58: error: dereferencing pointer to incomplete type
Links to make the Diamondback wifi chip work properly. | NCCapstone 03:25 on February 2, 2013 Permalink
[...] http://www.sundh.com/blog/2012/02/make-wishield-work-in-latest-arduino-ide/ This entry was posted in Uncategorized by admin. Bookmark the permalink. [...]
Dave 06:43 on February 27, 2013 Permalink
How do I go about opening and modifying these files on a PC (windows 7)?
ulka 10:35 on March 8, 2013 Permalink
I hv made the changes but got following…
In file included from webclient.c:37:
C:\Program Files\arduino-1.0.3\libraries\WiShield/webclient.h:106: error: conflicting types for ‘uip_tcp_appstate_t’
C:\Program Files\arduino-1.0.3\libraries\WiShield/server.h:65: error: previous declaration of ‘uip_tcp_appstate_t’ was here
plz help..
ulka
mrjeeves 10:13 on April 10, 2013 Permalink
To solve the dereferenced pointer issue for the udpapp, in uip-conf.h, change the 0 to a 1:
#define UIP_CONF_UDP 0
to
#define UIP_CONF_UDP 1
(original thread) http://www.linksprite.com/forum/index.php?topic=190.0