Give away medical masks when you place an order. learn more

IPv6 and JenNet for Wireless Home Automation

Home automation is one area that many wireless communications device makers have tried to conquer, with limited success thus far. The newest generation of ISM (Industrial, Scientific and Medical) frequency bands band transceivers holds great promise to change all of that, provided key elements such as the data link, protocol, cost, size, and power budget can be successfully resolved.

IPv6 is one of the protocols taking aim at home automation applications, and has with it the advantage that it ‘speaks internet’ making it easier to seamlessly connect devices. This article will look at example modules and chips to enable IPv6 connectivity, and will also examine a superset of IPv6 called JenNet-IP, a ‘mesh under’ protocol based around a low power 802.15.4 framework that targets home automation and energy management type applications.

JenNet intends to bring Internet to everything, allowing home appliances, entertainment systems, and utilities to be accessible online, as either a monitored or a controlled function. Even though JenNet is championed by NXP, any microcontroller with enough horsepower and memory can implement IPv6 and the JenNet protocol. Since the radio link can be a standard 2.4 GHz ISM link, several RF and single chip radios are candidates for use.

All parts, datasheets, training materials, and development kits mentioned are available online at Hotenda’s website.

The need for IPv6

IPv4 did a good job of establishing connectivity and getting Ethernet and the Internet up and running. However, as had long been predicted, the 4.29 billion possible 32-bit-based addresses have been issued and used. The transition to IPv6 is no longer optional.

With its 128-bit addressing, the need to increase the potential addressing fields will most likely never be made again in our lifetimes, since this present day standard results in over 3.4 x 1038 possible addresses.

With technical problems being solved, along with the backbone infrastructure and routers now complying with NAT translation from IPv6 to IPv4 and back again, the only thing holding us back from IPv6 devices are the devices themselves. These are rolling out the door as we speak.

IPv6 and the home

In addition to more addresses, IPv6 also mandates support for a layer of built in security using the IPsec protocol. While optional for IPv4, the support for IPsec in IPv6 is mandated, even though its use is optional. Though it is thought to be too complicated to implement, and is for the most part incomplete, IPsec allows secure connections among sites, but is not a point-to-point encryption protocol. Instead, data will be in clear text. It is up to the application to encrypt data before transmission and decrypt it after reception if security is desired.

IPv6 also adds some nice features for what is oftentimes a dynamic network presented by the home. No one wants to set up a network if you buy a new Internet enabled appliance. The Internet Control Message Protocol will replace the old Address Resolution Protocol (ARP) of IPv4 for IPv6 (ICMPv6). ARP uses broadcasts that clog up networks. IPv6 uses Neighbor Solicitation multicast type messaging for neighbor discovery. This is part of the auto configuration benefits of an IPv6 network.

A key feature that opens up communications to an entire new generation of home-based Internet enabled devices is that the extension headers in IPv6 are not constrained. With IPv4, up to 40 bytes could be used to offer options to the protocol. IPv6 supports Extension Headers that can be added after the primary header. These extensions have no maximum size and open the door for protocol enhancements, additional packet security, and even device proprietary keys that can prevent unwanted access.

Keep in mind that any processor and system on a chip may need more extensive resources and memory pools to implement these features, and, as with any specification that is evolving, any solution you make now may need to be updated to conform to future versions.

The JenNet layer

JenNet-IP is an IP-based networking solution enabling the "Internet of Things". JenNet (Figure 1) is designed to be an IPv6 wireless network standard that integrates a sub-layer below the 6LoWPAN layer of the OSI model (Figure 1). A nice feature is that it is a “self-healing” tree networking stack over the IETF 6LoWPAN IP layer. The philosophy behind JenNet is that all devices in your home have an IP address and can be individually monitored and controlled by a LAN or WAN including Internet access.

Figure 1: Living below the 6LoWPAN layer of the network model, JenNet adds the self-healing network stack applications layer to facilitate home automation applications.

The Jen-Net IP network can operate in two modes. The first is a Gateway-based mode (Figure 2), in which a dedicated gateway box arbitrates between smart devices, a local IP network, or a Wi-Fi based network. A “Border Router” ties a traditional layer 3 switch and router to the remote and wireless radio based devices. The second mode is a standalone mode where smart devices only talk to one another, like a remote control talking to a media control device.

Figure 2: A Gateway-based JenNet network allows smart devices to be accessible from local IP based wired or Wi-Fi network or global WAN connect like the Internet. Routers and gateways are needed.

Nodes can act as routers if they always have access to power. As an example, a light bulb may be an endpoint destination when being addressed to go into a predefined state or change its setting. It can also act as a wireless router, holding route table information to allow static routing (best path when available) or dynamic routing (node is busy or down and need to find another way).

Controllers such as a battery-powered remote control can go into sleep modes where they are not accessible from the outside network. While they may be bi-directional in nature, they function as one-way transmitters to control a media device, light bulb, or other appliance. They may contain a display and be able to show other house and system status, as well showing the benefits of bi-directional data transfer to a remote control.

A standalone type of JenNet wireless network can still be implemented at lower cost since you do not need a router and/or a gateway if that type of connectivity is unnecessary (Figure 3). This may be desirable at times, such as preventing your refrigerator from sending a text alert at 3 o’clock in the morning to let remind you to get milk.

Figure 3: When in standalone mode, devices do not form a tree. Instead, they accept and rebroadcast packets for other standalone nodes. If a gateway in the gateway mode fails, it falls back to the standalone mode.

Unlike a ZigBee type of dynamic mesh network, which requires a coordinator node to form the network, the JenNet can operate using a remote control security key in a commissioning mode. While in commissioning mode, smart devices in range of each other can communicate with remote controls to retrieve security keys and other network settings.

In this type of standalone configuration, the JenNet smart devices do not form a tree structure. They will instead only accept broadcast commands and rebroadcast them for other nodes. Only addressed devices in that group will act on a command.

Evaluation kits, processors, and modules

It is beyond the scope of this article to delve into the detailed intricacies of IPv6 and JenNet, but important to mention is the development environment NXP provides to test, experiment with, and design your own solutions.

NXP provides processors such as the JN5139, modules like the JN5148 and the JN5139, and the JENNET-IP-EK040 comprehensive development environment, which includes several types of modules and controllers as well as tools, programming support, and a complete SDK and JenNet network stack (Figure 4).

Figure 4: Short- and long-range modules as well as USB interfaces are provided as part of the JenNet development kit. The license has unrestricted development provisions and there is no fee.

It should be noted that this is an unrestricted development environment, so no license fee is required. While NXP obviously encourages designers to use its processors, if the standard takes off, you can bet that other processor manufacturers will want to provide their own extensions to IPv6 and 6LoWPAN stacks.