Mbed library for ENC28J60 Ethernet modules. Full support for TCP/IP and UDP Server, Client and HTTP server (webserver). DHCP and DNS is included.

Dependents:   mBuino_ENC28_MQTT Nucleo_Web_ENC28J60 Nucleo_Web_ENC28J60_ADC Serial_over_Ethernet ... more

Library for ENC28J60 Ethernet modules.

/media/uploads/hudakz/enc28j60_module01.jpg

Ported to mbed from Norbert Truchsess's UIPEthernet library for Arduino. Thank you Norbert!

  • Full support for persistent (streaming) TCP/IP and UDP connections Client and Server each, ARP, ICMP, DHCP and DNS.
  • Works with both Mbed OS 2 and Mbed OS 5.

Usage:

  • Import the library into your project.
  • Add #include "UipEthernet.h" to main.cpp
  • Create one instance of the UipEthernet class initialized with the MAC address you'd like to use and SPI pins of the connected Mbed board.

Example programs:

Import programWebSwitch_ENC28J60

HTTP Server serving a simple webpage which enables to remotely turn a digital output on/off. Compile, download, run and type 'IP_address/secret/' (don't forget the last '/') into your web browser and hit ENTER.

Import programHTTPServer_Echo_ENC28J60

A simple HTTP server echoing received requests. Ethernet connection is over an ENC28J60 board. Usage: Type the server's IP address into you web browser and hit <ENTER>.

Import programTcpServer_ENC28J60

Simple TCP/IP Server using the UIPEthernet library for ENC28J60 Ethernet boards.

Import programTcpClient_ENC28J60

Simple TCP/IP Client using the UIPEthernet library for ENC28J60 Ethernet boards.

Import programUdpServer_ENC28J60

Simple UDP Server using the UIPEthernet library for ENC28J60 Ethernet boards.

Import programUdpClient_ENC28J60

Simple UDP Client using the UIPEthernet library for ENC28J60 Ethernet boards.

Import programMQTT_Hello_ENC28J60

MQTT Client example program. Ethernet connection is via an ENC28J60 module.

Revision:
4:d774541a34da
Parent:
0:5350a66d5279
Child:
10:e4ddab81e6a8
--- a/Readme.txt	Sat Dec 20 11:10:40 2014 +0000
+++ b/Readme.txt	Sun Mar 08 20:26:56 2015 +0000
@@ -1,7 +1,7 @@
-This is UIPEthernet version 1.07
+This is UIPEthernet version 1.09
 
-Ethernet library for ENC28J60 shields and breakout boards. Full support for persistent (streaming) TCP-connections and UDP (Client and Server each), ARP, ICMP, DHCP and DNS. 
-Just include 'UIPEthernet.h' and create one IUPEthernet object initialized with the SPI pins of your ENC28J60 board.
+An plugin-replacement of the stock Arduino Ethernet library for ENC28J60 shields and breakout boards. Full support for persistent (streaming) TCP-connections and UDP (Client and Server each), ARP, ICMP, DHCP and DNS. 
+Just include 'UIPEthernet.h' instead of 'Ethernet.h' and use all your code written for the stock Arduino Ethernet lib!
 
 UIPEthernet is written as a wrapper around the mature uIP Stack by Adam Dunkels, which provides the low-level implementation for all supported protocols. To overcome the memory-constrains (a 'regular' uIP-application does all processing in RAM) the ENC28J60 internal memory is used for all stream buffers (in and out). Only 400-600 Bytes of Arduinos RAM are used (depending on the number of concurrently open connections). As of Flash-memory a ATmega368-based Arduino is the minimum requirenment.
 
@@ -11,12 +11,28 @@
 
 This library was inspired by the SerialIP implementation by Adam Nielsen <malvineous@shikadi.net>, actually I took this code as a starting point, but in the latest versions there are very few lines left.
 
+This library was ported to mbed by Zoltan Hudak <hudakz@inbox.com>
+
 Installation
 ------------
 
-Import into your project as any other mbed library.
+To install the libraries, you need to place them into your "libraries" folder. You can find it within your Arduino IDE distribution within the "hardware" folder.
+
+    C:\> cd [path to Arduino distribution]\libraries
+    C:\> git clone https://github.com/ntruchsess/arduino_uip UIPEthernet
+
+Be sure to restart the IDE if it was running.
+
+On a Mac, you will want to create a folder named "libraries" in in the "Documents" -> "Arduino" folder within your home directory. Clone the project there (and restart the IDE, if it was running during this process).
 
-Additional information can be found on the mbed website: https://mbed.org/handbook/mbed-Compiler
+    $ cd ~/Documents/Arduino/libraries
+    $ git clone https://github.com/ntruchsess/arduino_uip UIPEthernet
+    
+Or you download the zipped version of the library from https://github.com/ntruchsess/arduino_uip/releases, and copy the contained directory UIPEthernet to [path to Arduino distribution]\libraries\UIPEthernet.
+
+If you are running Arduino-IDE 1.5.x use release-version 1.59 or checkout branch 'Arduino_1.5.x'
+
+Additional information can be found on the Arduino website: http://www.arduino.cc/en/Hacking/Libraries
 
 Documentation
 -------------
@@ -33,6 +49,9 @@
  - uIP API reference:
     http://www.sics.se/~adam/uip/uip-1.0-refman/
 
+ - Arduino forums
+    http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl
+
  - uIP homepage:
     http://www.sics.se/~adam/uip/index.php/Main_Page
 
@@ -41,6 +60,8 @@
 
 UIPEthernet.h
 UIPEthernet.cpp
+UIPUdp.h
+UIPClient.cpp
 
 Copyright (c) 2013 Norbert Truchsess <norbert.truchsess@t-online.de>
 All rights reserved.
@@ -50,8 +71,6 @@
 UIPServer.h
 UIPServer.cpp
 UIPClient.h
-UIPClient.cpp
-UIPUdp.h
 UIPUdp.cpp
 utility/mempool.h
 utility/mempool.cpp
@@ -203,8 +222,6 @@
 Copyright (c) 2010 Adam Nielsen <malvineous@shikadi.net>
 All rights reserved.
 
-Modified (ported to mbed) by Zoltan Hudak <hudakz@inbox.com>
-
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
@@ -243,3 +260,23 @@
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+--------------
+
+utility/millis.h
+utility/millis.cpp
+
+Copyright (c) 2015 Zoltan Hudak <hudakz@inbox.com>.
+All right reserved.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.