Thankfully i've only borrowed this idiot shield from my brother and not splashed out and bought it, has anyone actually got it to work?
I've cut my scetch down to the basics to try and debug it
#include <WiServer.h>
char buffer[5];
// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[] = {192,168,2,10}; // IP address of WiShield
unsigned char gateway_ip[] = {192,168,2,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 = {"Belkin"}; // max 32 bytes
void setup() {
Serial.begin(9600);
sprintf(buffer,"Local IP = %d,%d,%d,%d",local_ip[0],local_ip[1],local_ip[2],local_ip[3]);
Serial.print(buffer);
Serial.println();
sprintf(buffer,"Gateway IP = %d,%d,%d,%d",gateway_ip[0],gateway_ip[1],gateway_ip[2],gateway_ip[3]);
Serial.print(buffer);
Serial.println();
}
void loop()
{
}
and this is what i get from the serial monitor
Local IP = 192,168,2,10
Gateway IP = 192,168,5,1
now if the gateway is defined as this
unsigned char gateway_ip[] = {192,168,2,1}; // router or gateway IP address
how the hell does it get this
Gateway IP = 192,168,5,1
I hate open source