Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I want to write the HTML-Files for the Webserver to an SD-Card. When I try to get a page from the root-dir the mbed stopped working (no blinky lights).
I tried this (code snipped):
#include "SDHCFileSystem.h" #include "EthernetNetIf.h" #include "HTTPServer.h" EthernetNetIf eth; HTTPServer svr; SDFileSystem sd(p5, p6, p7, p26, "sd"); [...] // Initialise ethernet EthernetErr ethErr = eth.setup(); eth_present=1; if (ethErr) { printf("Error %d in setup.\n", ethErr); lcd.printf("Network error\n"); eth_present=0; } FSHandler::mount("/webfs", "/sd"); //Mount /webfs path on /files web path <-------- is this correct? FSHandler::mount("/webfs", "/"); //Mount /webfs path on web root path svr.addHandler<FSHandler>("/sd"); svr.addHandler<FSHandler>("/"); //Default handler svr.bind(80); while (1) { Net::poll(); }