Go Down

Topic: WiShield 2.0 and Arduino 1.0 (Read 2 times) previous topic - next topic


hi there, I keep gettting this error message when trying to compile the simpleserver.pde file from their samples directory.

In file included from SimpleServer_cpp:6:
c:\users\walter\documents\Arduino\libraries\WiShield/WiServer.h:198 error: coonfilicting return type specified for 'virtual void server::write(uint8_t)'
c:\arduino\hardware\arduino\cores\arduino/print.h:48 error   overriding 'virutal size_t Print::write(uint_t)'

I checked line 198 in WiServer.h and it reads:

virtual void write(uint8_t);

I checked line 48 in print.h and it reads:

virtual size_t write(uint8_t) = 0;

I'm afraid I am lost...

this all used to work nice before I upgraded to arduino 1.0  in .21 it all worked,  and now I am having difficulty getting it working in .21 on my mac  since messing around... did a fresh install on 1.0 on my pc and want to get that working if possible ...

if somene can help with the quoted errors, it will allow me to continue  :) any help appreciated...  I did do a search but the solutions I found were difficult to follow... and I had no luck with them...

Anyone with a wishield, any help would be great...


First of all you have to use the oo22 or oo23 arduino IDE because for sure there is something phishy in arduino 1.0 IDE as the WiShield code that compiles perfectly in 0022 or 0023 shows additional problems in 1.0 and then refer to my post >> http://arduino.cc/forum/index.php/topic,92240.msg692866.html#msg692866

also make virtual void write(uint8_t); as virtual size_t write(uint8_t); under WiServer.h if then it shows error that it is unable to find wiring.h then load wiring.h library into the sketch after inserting the library in WiShield library directory

plus also change the app-conf.h file (im giving to you that in attachment)
"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

????? ???? !


I'm starting from scratch,
I'm downloading and installing Arduino .23
installed it.

now I will get the async files from the site again and install them.  I'm hoping this will work.
the above did not really work for me.... still got errors... more errors infact...
very discuraged...

I'm hoping with a new install of 23 and 1.0 removed, and new copies of files from the ASYNC site, or where ever,
I will get this thing running again....

I am looking for the WiShield folder
and the WiServer library folder

hoping that will be enough... :)

thanks for your help.... I was wondering, if I don't have any luck would it be too much trouble to zip your two library folders and attach them?  incase I am missing something very basic...

thanks again....


ok downloaded zip file from the Github.
installed a clean version of Arduino .23
put the library files in the \documents\arduino\library folder
called WiShild

opened up the simple server example:

* A simple sketch that uses WiServer to serve a web page

#include <WiServer.h>


// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[] = {192,168,1,200};   // IP address of WiShield
unsigned char gateway_ip[] = {192,168,1,1};   // router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0};   // subnet mask for the local network
const prog_char ssid[] PROGMEM = {"Arduino"};      // max 32 bytes

unsigned char security_type = 1;   // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2

// WPA/WPA2 passphrase
const prog_char security_passphrase[] PROGMEM = {"12345678"};   // max 64 characters

// WEP 128-bit keys
// sample HEX keys
prog_uchar wep_keys[] PROGMEM = {
                                  0x04, 0x13, 0x65, 0x10, 0x20, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,   // Key 0
              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   // Key 1
              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   // Key 2
              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   // Key 3

// setup the wireless mode
// infrastructure - connect to AP
// adhoc - connect to another WiFi device
unsigned char wireless_mode = WIRELESS_MODE_INFRA;

unsigned char ssid_len;
unsigned char security_passphrase_len;
// End of wireless configuration parameters ----------------------------------------

// This is our page serving function that generates web pages
boolean sendMyPage(char* URL) {
    // Check if the requested URL matches "/"
    if (strcmp(URL, "/") == 0) {
        // Use WiServer's print and println functions to write out the page content
        WiServer.print("Hello World!");
        // URL was recognized
        return true;
    // URL not found
    return false;

void setup() {
  // Initialize WiServer and have it use the sendMyPage function to serve pages
  // Enable Serial output and ask WiServer to generate log messages (optional)

void loop(){

  // Run WiServer



compiles it and got this error:

SimpleServertest.cpp.o: In function `loop':
SimpleServertest.cpp:74: undefined reference to `WiServer'
SimpleServertest.cpp:74: undefined reference to `WiServer'
SimpleServertest.cpp:74: undefined reference to `Server::server_task()'
SimpleServertest.cpp.o: In function `setup':
SimpleServertest.cpp:64: undefined reference to `WiServer'
SimpleServertest.cpp:64: undefined reference to `WiServer'
SimpleServertest.cpp:64: undefined reference to `Server::init(unsigned char (*)(char*))'
SimpleServertest.cpp:68: undefined reference to `Server::enableVerboseMode(unsigned char)'
SimpleServertest.cpp.o: In function `sendMyPage(char*)':
SimpleServertest.cpp:50: undefined reference to `WiServer'
SimpleServertest.cpp:50: undefined reference to `WiServer'
SimpleServertest.cpp:51: undefined reference to `WiServer'
SimpleServertest.cpp:51: undefined reference to `WiServer'
SimpleServertest.cpp:52: undefined reference to `WiServer'
SimpleServertest.cpp.o:SimpleServertest.cpp:52: more undefined references to `WiServer' follow

no idea what the heck I am doing wrong... now I'm depressed...


So web server example works...
no compiling errors... but it calls WiShield not WiServer where all the problems seem to stem...
I hope I can figure it out...

:) cheers. :) just an update... still would like to get WiServer.h working....

Go Up