1

Dependencies:   Clients_Requests EthernetInterface HTTPServer NTPClient One_Wire_Function SimpleSMTPClient mbed-rpc mbed-rtos mbed

Fork of _PE2E_12-04_EthernetInterfaceServer by Rob Toulson

Files at this revision

API Documentation at this revision

Comitter:
robt
Date:
Fri Dec 09 08:06:33 2016 +0000
Child:
1:2a82db3db4ae
Commit message:
Version 09/12/2016

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
HTTPServer.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-rpc.lib 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.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EthernetInterface.lib	Fri Dec 09 08:06:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/EthernetInterface/#4d7bff17a592
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPServer.lib	Fri Dec 09 08:06:33 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/leihen/code/HTTPServer/#cc3f5c53d0d5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Dec 09 08:06:33 2016 +0000
@@ -0,0 +1,26 @@
+
+/* Program Example: 12.4 mbed file server setup
+                                                           */
+#include "mbed.h"
+#include "EthernetInterface.h"
+#include "HTTPServer.h"
+#include "FsHandler.h"
+
+EthernetInterface eth;            // define Ethernet interface
+LocalFileSystem fs("webfs");      // define Local file system
+HTTPServer svr;                   // define HHTP server object
+
+int main() {
+  eth.init("192.168.1.101","255.255.255.0","192.168.1.1");   // initialise Ethernet
+  eth.connect();                               // connect Ethernet
+  HTTPFsRequestHandler::mount("/webfs/", "/"); // mount file server handler
+  svr.addHandler<HTTPFsRequestHandler>("/");   // add handler to server object
+  svr.start(80, &eth);                    // bind server to port 80
+  while(1)
+  {
+    svr.poll();          // continuously poll for Ethernet messages to server
+  }
+}
+
+// address to locate HOME.HTM
+// http://192.168.1.101/HOME.HTM 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rpc.lib	Fri Dec 09 08:06:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rpc/#a6fe8e713f64
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Fri Dec 09 08:06:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#bdd541595fc5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Dec 09 08:06:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/99a22ba036c9
\ No newline at end of file