Reflective Heat Technologies Arduino IPv6 Web Server
RHT uses the Arduino platform for its solar thermal system
sensors. Given that many sensor networks will be built using IPv6 in
future, RHT has developed an IPv6 Ethernet library. This work
is offered to the arduino community for its collective benefit.
The official Arduino Ethernet Shield is based on the WizNet
5100 chip, which implements the IPv4 protocol stack in silicon.
As a consequence, the Arduino Ethernet Shield cannot be used
to implement an IPv6 stack.
To implement an IPv6 stack, it is necessary to use a shield
based on hardware that permits the management of IP and Ethernet layer
functions. Shields based on the MicroChip ENC28J60 chip
(such as those sold by Ekitszone and Nuelectronics)
are suitable for the implementation of an IPv6 or dual IPv4/IPv6 stack.
This approach requires the TCP state machine to be
implemented in software and results in more complex arduino code.
The RHT v6EtherShield library is based on the EtherShield
library developed by Pascal Stang, Xing Yu, and Guido Socher. The ipv6etherhield
developed by Guenther Hoelzl was tested but found to be unstable and
would not compile on the most recent versions of the Arduino Integrated
Development Environment (IDE). Thank you to all of those whose work was used as the basis of this effort.
The RHT v6EtherShield library is designed to run on the
Arduino Mega platforms, and as a result requires that the connection of
the ENC28J60-based shield to the Arduino Mega be modified. Pins 10, 11, 12 and 13 of the ENC28J60-based shield must be
bent out (or cut), and these pins of the shield be connected (by adding
wires) to the Arduino Mega pins 53, 51, 50 and 52 respectively.
The RHT v6EtherShield supports the following addresses:
The RHT v6EtherShield web server example provides a minimal
implementation of an IPv6 protocol stack as follows:
- Link Local (FE80::0/64) address based on SLAAC EUI-64 (Duplicate Address Detection is not implemented)
- Unicast (manually configured by user by editing the sketch)
- Solicited Node Multicast address (FF02::1:FF00/104 prefix based on Unicast address)
- ICMPv6 Neighbor Advertisement messages are provided in
response to ICMPv6 Neighbor Discovery messages (equivalent of ARP in
- ICMPv6 Echo Reply messages are provided in response to ICMP Echo Request
(ping) messages to either the Link-Local or Unicast address.
- An HTTP page is provided in a single packet, in response to
an HTTP Request.
- The original IPv4 web server implementation is also available - this a dual stack implementation.
- A simple web server to confirm ipv6 connectivity when
testing IPv6 network configurations.
- An HTTP sensor that can be polled using HTTP Requests.
- An HTTP controller that can receive HTTP messages to turn
devices on or off.
Arduino IDE versions:
- The v6EtherShield library was developed using the
If you are using the Arduino-1.0 IDE, it is necessary to copy
files "WConstants.h" and "wiring.h" from a previous version of the IDE
into the arduino-1.0\hardware\arduino\cores\arduino sub-directory.
To use the RHT v6EtherShield library:
- Download the library and copy the library files
into the Arduino IDE libraries directory,
- Open the Arduino IDE, and load the ipv6_web_server.pde example
located in the example sub-directory under the v6EtherShield library
the IPv4 and IPv6 addresses, and the http data to be returned, at the
top of the ipv6_web_server.pde file as appropriate to your environment.
you plan to run more than one Ethernet-connected Arduino on the same
link, be sure to configure distinct Ethernet MAC addresses for each
provision of debugging information to the Arduino console can be
enabled (default) or disabled. Set the debug parameter at the top
of the ipv6_web_server.pde to false to disable the debug information.
- Compile, Upload and Run your Arduino sketch.
that some virus scanner programs will block IPv6 packets by default -
you may have to enable IPv6 on the virus scanner, or turn offthe virus scanner for your initial tests to work.
- Use a browser to access your IPv6 Arduino with a URL such as http://[2001:0470:9bca:0815::1234]/.
Questions and comments may be addressed to firstname.lastname@example.org.