Samuel Mokrani / WiflyInterface

Dependents:   WiFi neurGAI_WIFI thingspeak thingspeak2

Revision:
11:b912f91e3212
Parent:
4:74bfdd00362a
Child:
13:108340829acc
diff -r 81445de1fe27 -r b912f91e3212 Socket/TCPSocketServer.cpp
--- a/Socket/TCPSocketServer.cpp	Thu Aug 23 16:03:52 2012 +0000
+++ b/Socket/TCPSocketServer.cpp	Fri Aug 24 13:07:01 2012 +0000
@@ -25,15 +25,14 @@
 int TCPSocketServer::bind(int port) {
     // use udp auto pairing
     char cmd[20];
-    if (!wifi->sendCommand("set ip proto 2\r", "AOK"))
+    /*if (!wifi->sendCommand("set ip proto 2\r", "AOK"))
         return -1;
     if (!wifi->sendCommand("set ip flags 0x07\r", "AOK"))
-        return -1;
+        return -1;*/
+    wifi->setProtocol(TCP);
     sprintf(cmd, "set ip local %d\r", port);
     if (!wifi->sendCommand(cmd, "AOK"))
         return -1;
-    if (!wifi->sendCommand("save\r", "Stor"))
-        return -1;
     wifi->exit();
     return 0;
 }