diff --git a/WebServer.h b/WebServer.h index c8c43c3..44f8c2b 100644 --- a/WebServer.h +++ b/WebServer.h @@ -29,16 +29,21 @@ #include #include -#include -#include -#include +#ifdef UIPETHERNET_H +# include +# include +#else +# include +# include +# include +#endif /******************************************************************** * CONFIGURATION ********************************************************************/ #define WEBDUINO_VERSION 1007 -#define WEBDUINO_VERSION_STRING "1.7" +#define WEBDUINO_VERSION_STRING "1.7.1" // standard END-OF-LINE marker in HTTP #define CRLF "\r\n" @@ -414,7 +419,7 @@ size_t WebServer::write(uint8_t ch) if(m_bufFill == sizeof(m_buffer)) { - m_client.write(m_buffer, sizeof(m_buffer)); + m_client.write(m_buffer, sizeof(m_buffer)); m_bufFill = 0; } diff --git a/examples/Web_HelloWorld/Web_HelloWorld.ino b/examples/Web_HelloWorld/Web_HelloWorld.ino index aebf90a..be4d436 100644 --- a/examples/Web_HelloWorld/Web_HelloWorld.ino +++ b/examples/Web_HelloWorld/Web_HelloWorld.ino @@ -1,7 +1,15 @@ /* Web_HelloWorld.pde - very simple Webduino example */ #include "SPI.h" +/* If you have a Microchip ENC28J60-based Ethernet shield, + * you can use arduino_uip library at https://github.com/ntruchsess/arduino_uip + * and replace the line below with: + * + * #include "UIPEthernet.h" + * + */ #include "Ethernet.h" + #include "WebServer.h" /* CHANGE THIS TO YOUR OWN UNIQUE VALUE. The MAC number should be diff --git a/readme.md b/readme.md index e312bc1..7639efa 100644 --- a/readme.md +++ b/readme.md @@ -36,11 +36,13 @@ These have all been tested with the library successfully: - [Adafruit Ethernet Shield w/ Wiznet 811MJ module](http://www.ladyada.net/make/eshield/) - [NKC Electronics Ethernet Shield DIY Kit](http://store.nkcelectronics.com/nkc-ethernet-shield-diy-kit-without-wiz812mj-mod812.html) -Shields using the Microchip ENC28J60 chip won't work with the library as that requires more software support for implementating -the TCP/IP stack. +Shields using the Microchip ENC28J60 chip can use [ntruchsess' arduino_uip library](https://github.com/ntruchsess/arduino_uip) as a drop-in replacement for the stock Arduino Ethernet library. Take note that since the TCP/IP stack is implemented in software, the compiled sketch size will significantly increase. As a result, if you use an ENC28J60-based shield, your Arduino should have, at the very least, an ATMega328 chip. ## Version history +### 1.7.1 released Jan 2013 +- added support for ENC28J60 chips via ntruchsess' arduino_uip library. + ### 1.7 released in Jan 2012 - fixed Google Code issue [4](http://code.google.com/p/webduino/issues/detail?id=4) where expect fails with high-ASCII characters due to sign issues