mbed TCP socket with pyhton server

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of TCPEchoServer by mbed official

Revision:
9:84f6832f3643
Parent:
8:23b1fba109b0
--- a/main.cpp	Tue Feb 14 16:20:16 2017 +0000
+++ b/main.cpp	Tue Feb 20 04:53:00 2018 +0000
@@ -2,10 +2,12 @@
 #include "EthernetInterface.h"
  
 #define ECHO_SERVER_PORT   7
- 
+static const char*          mbedIp       = "192.168.137.2";  //IP
+static const char*          mbedMask     = "255.255.255.0";  // Mask
+static const char*          mbedGateway  = "192.168.137.1";    //Gateway
 int main (void) {
     EthernetInterface eth;
-    eth.init(); //Use DHCP
+    eth.init(mbedIp,mbedMask,mbedGateway); 
     eth.connect();
     printf("\nServer IP Address is %s\n", eth.getIPAddress());