HTTP_SDCard_File_Server_WIZwiki-W7500 avec gestion des extensions MIME
Dependencies: SDFileSystem WIZnetInterface mbed STATIC_COLORS
Fork of HTTP_SDCard_File_Server_WIZwiki-W7500 by
WIZnet WIZwiki-W7500
http://www.wiznet.co.kr/product-item/w7500/
Windows serial configuration https://developer.mbed.org/handbook/Windows-serial-configuration https://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe
How to write the firmware into WIZwiki-W7500 https://developer.mbed.org/teams/WIZnet/wiki/How-to-write-the-firmware-into-WIZwiki-W
Data Output using Serial Port https://blog.wiznettechnology.com/2015/08/14/wiznet-wizwiki-w7500-tutorial-exercise-2-data-output-using-serial-port/ http://wizwiki.net/wiki/doku.php?id=products:w7500:peripherals:uart
SDFileSystem Instanciation
SDFileSystem sd(PB_3, PB_2, PB_1, PB_0, "sd"); WIZwiki-W7500

Ethernet Initialization
eth.init () uses the eth.init (MAC) If you use DHCP instead, and when using a Static IP uses eth.init ((uint8_t *) MAC, IP, MASK, GATEWAY). This section uses a static IP.
- define MAC "\x
\x\x\x\x\x" Should be Replacedwith your MAC - define IP "192.168.77.100" Should belong with your lan.
- define MASK "255.255.255.0"
- define GATEWAY "192.168.77.1"
eth.init((uint8_t*)MAC); Use DHCP for WIZnetInterface eth.init((uint8_t*)MAC,IP,MASK,GATEWAY); IP,mask,Gateway
Also watch its pages, the initial contributor to the project For Import the example https://developer.mbed.org/teams/WIZnet/code/HTTP_SDCard_File_Server_WIZwiki-W7500/
Wiki on ARMmbed https://developer.mbed.org/teams/WIZnet/code/HTTP_SDCard_File_Server_WIZwiki-W7500/wiki/HTTP_SDCard_File_Server_WIZwiki-W7500
WIZwiki_W7500 LED RGB :
LED1 = LED_RED = LEDR = PC_8
LED2 = LED_GREEN = LEDG = PC_9
LED3 = LED_BLUE = LEDB = PC_5
LED4 = LED_BLUE
Revision 7:04744a9ce2b9, committed 2015-04-12
- Comitter:
- gsteiert
- Date:
- Sun Apr 12 03:04:28 2015 +0000
- Parent:
- 6:ca17ce165ebc
- Child:
- 8:4b43259a1e33
- Commit message:
- Updated libraries. Seems to be more stable.
Changed in this revision
--- a/EthernetInterface.lib Thu Aug 07 03:32:26 2014 +0000 +++ b/EthernetInterface.lib Sun Apr 12 03:04:28 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/EthernetInterface/#f69b81aa9eb1 +http://mbed.org/users/mbed_official/code/EthernetInterface/#2fc406e2553f
--- a/main.cpp Thu Aug 07 03:32:26 2014 +0000
+++ b/main.cpp Sun Apr 12 03:04:28 2015 +0000
@@ -66,17 +66,22 @@
sprintf(fileName, "/sd%s", uri);
fp = fopen(fileName, "r");
if (fp == NULL) {
+ uart.printf("File not found\n");
sprintf(httpHeader,"HTTP/1.1 404 Not Found \r\nContent-Type: text\r\nConnection: Close\r\n\r\n");
client.send(httpHeader,strlen(httpHeader));
client.send(uri,strlen(uri));
} else {
+ uart.printf("Sending: header");
sprintf(httpHeader,"HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nConnection: Close\r\n\r\n");
client.send(httpHeader,strlen(httpHeader));
+ uart.printf(" file");
while ((rdCnt = fread(buffer, sizeof( char ), 1024, fp)) == 1024) {
client.send(buffer, rdCnt);
+ uart.printf(".");
}
client.send(buffer, rdCnt);
fclose(fp);
+ uart.printf("done\n");
}
}
}
--- a/mbed-rtos.lib Thu Aug 07 03:32:26 2014 +0000 +++ b/mbed-rtos.lib Sun Apr 12 03:04:28 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#34e80e862021 +http://mbed.org/users/mbed_official/code/mbed-rtos/#83895f30f8f2
--- a/mbed.bld Thu Aug 07 03:32:26 2014 +0000 +++ b/mbed.bld Sun Apr 12 03:04:28 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/6213f644d804 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file
FOURNET Olivier
