![](/media/cache/group/7eebcc78c9728c99279acaac1d5c9078.jpg.50x50_q85.jpg)
Simple HTTP server example with WIZ550io, W5500 (WIZnet chipset) .access the mbed via any browser, mbed echo back http request header.
Dependencies: W5500Interface mbed
Fork of HTTPServer_echoback_WIZ550io by
Revision 20:f0c3af075949, committed 2014-09-23
- Comitter:
- Bongjun
- Date:
- Tue Sep 23 23:41:25 2014 +0000
- Parent:
- 19:59a668f08555
- Commit message:
- change driver "W5500Interface" is solved close error.
Changed in this revision
diff -r 59a668f08555 -r f0c3af075949 EthernetInterfaceW5500.lib --- a/EthernetInterfaceW5500.lib Wed Jul 23 07:31:24 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/teams/EthernetInterfaceW5500-makers/code/EthernetInterfaceW5500/#6f469f76a76a
diff -r 59a668f08555 -r f0c3af075949 W5500Interface.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/W5500Interface.lib Tue Sep 23 23:41:25 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/teams/EthernetInterfaceW5500-makers/code/W5500Interface/#af0ed4fbca02
diff -r 59a668f08555 -r f0c3af075949 main.cpp --- a/main.cpp Wed Jul 23 07:31:24 2014 +0000 +++ b/main.cpp Tue Sep 23 23:41:25 2014 +0000 @@ -1,11 +1,11 @@ #include "mbed.h" -//#include "EthernetInterface.h" -#include "EthernetInterfaceW5500.h" +#include "EthernetInterface.h" +//#include "EthernetInterfaceW5500.h" #include <stdio.h> #include <string.h> -#define PORT 80 -//#define PORT 888 +//#define PORT 80 +#define PORT 888 #define _DHCP // move to main(). @@ -36,23 +36,21 @@ { #if defined(TARGET_LPC1114) SPI spi(dp2, dp1, dp6); // mosi, miso, sclk - EthernetInterfaceW5500 eth(&spi, dp25, dp26); // spi, cs, reset + EthernetInterface eth(&spi, dp25, dp26); // spi, cs, reset #elif defined(TARGET_LPC1768) SPI spi(p11, p12, p13); // mosi, miso, sclk - EthernetInterfaceW5500 eth(&spi, p14, p15); // spi, cs, reset + EthernetInterface eth(&spi, p14, p15); // spi, cs, reset #elif defined(TARGET_LPC11U68) SPI spi(P0_9, P0_8, P1_29); // mosi, miso, sclk -//WIZnetInterface eth(&spi, P0_2, P1_25); // spi, cs, reset -//SPI spi(p5, p6, p7); // mosi, miso, sclk - EthernetInterfaceW5500 eth(&spi, P0_2, P1_28);//, nRESET(p9); // reset pin is dummy, don't affect any pin of WIZ550io + EthernetInterface eth(&spi, P0_2, P1_28);//, nRESET(p9); // reset pin is dummy, don't affect any pin of WIZ550io spi.format(8,0); // 8bit, mode 0 spi.frequency(7000000); // 7MHz wait(1); // 1 second for stable state #elif defined (TARGET_NUCLEO_F030R8) SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK); // mosi, miso, sclk - EthernetInterfaceW5500 eth(&spi, PB_6, PA_9);//, nRESET(p9); // reset pin is dummy, don't affect any pin of WIZ550io + EthernetInterface eth(&spi, PB_6, PA_9);//, nRESET(p9); // reset pin is dummy, don't affect any pin of WIZ550io spi.format(8,0); // 8bit, mode 0 spi.frequency(7000000); // 7MHz wait(1); // 1 second for stable state @@ -72,10 +70,14 @@ printf("IP Address is %s\n\r", eth.getIPAddress()); */ + printf("Board is on\r\n"); + #ifdef _DHCP // didn't test yet in DHCP => TEST OK... + printf("eth.init()\r\n"); eth.init(); //Use DHCP + printf("eth.connect()\r\n"); eth.connect(); //printf("IP Address is %s\n\r", eth.getIPAddress()); printf("Initialized, MAC: %s\n", eth.getMACAddress());