mbed TCP socket with pyhton server

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of TCPEchoServer by mbed official

Files at this revision

API Documentation at this revision

Comitter:
MohamadNazrin
Date:
Tue Feb 20 04:53:00 2018 +0000
Parent:
8:23b1fba109b0
Commit message:
TCP echo Server

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Tue Feb 14 16:20:16 2017 +0000
+++ b/EthernetInterface.lib	Tue Feb 20 04:53:00 2018 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/EthernetInterface/#183490eb1b4a
+http://developer.mbed.org/users/sarahmarshy/code/EthernetInterface/#be165aa9a49b
--- 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());