Arduino Uno with Wifi shield

Hello,
i'am busy already day with this problem.
i will connect my arduino uno board with wifi shield to a delphi program.
i write for my arduino board the client program below, and use temperarelly socket workbench as server.
when i install socket workbench on the computer where i have installed arduino then it works.
but when i disconnect the usb cable from the arduino board it doesn't work anymore.

When i install the socket workbench on another computer then i can not make a connection with socket workbench.
What do i wrong.
My ziggo router is fully open
Hopefully someone can help me.

thanks in advance,
frans :blush:

#include <SPI.h>
#include <WiFi.h>

char ssid[] = "Ziggo446F8_EXT";
char pass[] = "KCk7KuczEW76";

int status = WL_IDLE_STATUS;
IPAddress server(192,168,178,11);

WiFiClient client;

void setup() {
Serial.begin(9600);
Serial.println("Attempting to connect to WPA network...");
Serial.print("SSID: ");
Serial.println(ssid);

status = WiFi.begin(ssid, pass);
if ( status != WL_CONNECTED) {
Serial.println("Couldn't get a wifi connection");
while(true);
}
else {
Serial.println("Connected to wifi");
Serial.println("\nStarting connection...");
if (client.connect(server, 51000)) {
delay(1000);
Serial.println("Connected");
client.println("Line in setup");
client.println();
client.stop();
}
}
}

void loop() {
if (client.connect(server, 51000)) {
delay(1000);
Serial.println("Connected");
client.println("Line in loop");
client.println();
client.stop();
}
}

grtz frans Enschot

Berichten: 8
Geregistreerd: Wo Apr 10, 2013 9:51 am
Privébericht

How to use this forum

Code tags.