cc3100_Socket_Wifi_Server with Ethernet Interface not working

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of cc3100_Test_Demo by David Fletcher

Files at this revision

API Documentation at this revision

Comitter:
artpes
Date:
Fri May 26 10:03:00 2017 +0000
Parent:
8:f4eb30a34ea7
Commit message:
Wifi 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
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.h Show diff for this revision Revisions of this file
diff -r f4eb30a34ea7 -r fd9f64918306 EthernetInterface.lib
--- a/EthernetInterface.lib	Fri May 19 14:45:14 2017 +0000
+++ b/EthernetInterface.lib	Fri May 26 10:03:00 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/EthernetInterface/#8bc9f4d05b7e
+https://developer.mbed.org/users/artpes/code/EthernetInterface/#66492f2d6b42
diff -r f4eb30a34ea7 -r fd9f64918306 main.cpp
--- a/main.cpp	Fri May 19 14:45:14 2017 +0000
+++ b/main.cpp	Fri May 26 10:03:00 2017 +0000
@@ -9,6 +9,7 @@
 #include "cc3100_nonos.h"
 #include "mbed.h"
 #include "rtos.h"
+//#include "EthernetInterface.h"
 
 using namespace mbed_cc3100;
 
@@ -41,38 +42,7 @@
      printf("***********Getting started with station application***********");
      printf("\n\r*******************************************************************************\n\r");
 }
-void ethernet(char a)
-{
-    EthernetInterface eth;
-    eth.init(); //Use DHCP
-    int i = eth.connect();
-    printf("Connection = %d\n", i);
-    
-    printf("IP Address is %s\n", eth.getIPAddress());
-    printf("Gateway is %s\n", eth.getGateway());
-    printf("MAC Address is %s\n", eth.getMACAddress());
-    
-    TCPSocketConnection sock;
-    sock.connect("mbed.org", 80);
-    
-    char http_cmd[] = "GET /www.google.com \n\n";
-    sock.send_all(http_cmd, sizeof(http_cmd)-1);
-    
-    char buffer[300];
-    int ret;
-    while (true) {
-        ret = sock.receive(buffer, sizeof(buffer)-1);
-        if (ret <= 0)
-            break;
-        buffer[ret] = '\0';
-        printf("Received %d chars from server:\n%s\n", ret, buffer);
-    }
-      
-    sock.close();
-    
-    eth.disconnect();
-   
-}
+
 
 //******************************STATION_MODE***********************************************
 //*****************************************************************************************
@@ -212,7 +182,7 @@
         }
         else 
             printf("\nAccept connection \n\r");
-
+ 
     while (LoopCount < NO_OF_PACKETS)
         {   
             //TODO : sarebbe da chiamare la funzione led() con un altro thread così da farla girare in background
diff -r f4eb30a34ea7 -r fd9f64918306 mbed-rtos.lib
--- a/mbed-rtos.lib	Fri May 19 14:45:14 2017 +0000
+++ b/mbed-rtos.lib	Fri May 26 10:03:00 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#59573e78fcc4
+https://developer.mbed.org/users/artpes/code/mbed-rtos/#23ce2f4ef62d
diff -r f4eb30a34ea7 -r fd9f64918306 mbed.h
--- a/mbed.h	Fri May 19 14:45:14 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/* mbed Microcontroller Library
- * Copyright (c) 2006-2011 ARM Limited. All rights reserved.
- */ 
- 
-#ifndef MBED_H
-#define MBED_H
- 
-#define MBED_LIBRARY_VERSION 29
- 
-// Useful C libraries
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
-#include <unistd.h>
-//#include <error.h>
- 
-// mbed Debug libraries
- 
-#include "error.h"
-#include "mbed_interface.h"
- 
-// mbed Peripheral components
- 
-#include "DigitalIn.h"
-#include "DigitalOut.h"
-#include "DigitalInOut.h"
-#include "BusIn.h"
-#include "BusOut.h"
-#include "BusInOut.h"
-#include "PortIn.h"
-#include "PortInOut.h"
-#include "PortOut.h"
-#include "AnalogIn.h"
-#include "AnalogOut.h"
-#include "PwmOut.h"
-#include "Serial.h"
-#include "SerialHalfDuplex.h"
-#include "SPI.h"
-#include "SPISlave.h"
-#include "SPIHalfDuplex.h"
-#include "I2C.h"
-#include "I2CSlave.h"
-#include "Ethernet.h"
-#include "CAN.h"
- 
-// mbed Internal components
-#include "Timer.h"
-#include "Ticker.h"
-#include "Timeout.h"
-#include "LocalFileSystem.h"
-#include "InterruptIn.h"
-#include "wait_api.h"
-#include "rtc_time.h"
- 
-using namespace mbed; 
-using namespace std; 
- 
-#endif 
\ No newline at end of file