The new nRF5 SDK for IoT and why IPv6 over Bluetooth Smart is a big thing

We have recently released a new version of the nRF5 Software Development Kit (SDK) for IoT, an IPv6-ready Internet Protocol Suite for Nordic's nRF52 Series Bluetooth Smart SoCs. In addition to enabling native and interoperable Internet Protocol (IP) based connectivity between a Bluetooth Smart “thing” and a cloud service. The new release adds support for end-to-end security between the cloud service and the “thing”, commissioning of the “thing” to the router using a mobile phone and support for updating the firmware of the “thing” from the cloud service. We packed the release with a lot of more new stuff as well.

Why is IPv6 over Bluetooth Smart a big thing?

What would my sports watch/wearable be without the cloud service? Not very exciting. Today Bluetooth Smart applications are often connected to a cloud service using the smartphone or tablet as a gateway, bridging Bluetooth Smart to IP-based messages for internet communication to the cloud (See Fig 1). Connecting to the cloud service via a smartphone or tablet is a good solution for “my things” i.e., the things we carry with us.

image description

Fig. 1

But what about connecting the “things around us”, i.e., smart home sensors, door locks etc.? They need to be able to connect 24/7 and they cannot rely on a Smartphone/tablet in close proximity to enable 24/7 connectivity of “things around us”.

The largest network we have today, built on proven existing technologies, is the “internet”. It is a large distributed heterogeneous IP network and it is proven to be scalable and stable. Why would the internet of things be any different? Why would it not “reuse” the existing infrastructure and solutions to align the IoT to the existing rather than creating something new.

This is the #1 reason to use IP technologies also for the IoT.

Running IPv6 on small, resource constrained SoCs and enabling sensors to talk to IP Protocols natively, is not a new idea. It is something 6LoWPAN have been doing for many years already. Furthermore, new application layer protocols such as Constrained Application Protocol (CoAP), and Message Queue Telemetry Transport (MQTT) etc., ensure optimal use of bandwidth and resources of constrained sensors.

Using IPv6 all the way down to the end node also makes it possible to use headless routers and thus not have to rely on smart (complex) gateways bridging the data traffic between non-IP local network and the internet. IPv6 over Bluetooth Smart basically enables Bluetooth Smart ‘things’ to communicate with each other via ‘headless’ routers and the Internet. It also means that a Bluetooth Smart ‘thing’ can communicate with “things” using other IPv6-enabled wired or wireless technologies, such as Wi-Fi, Ethernet, ZigBee IP, and Thread, to form a heterogeneous network(See fig 2).

image description

Fig. 2.

It also aligns and adapts to the existing infrastructure of the internet enabling maximum reuse existing solutions. After the release of the Internet Protocol Support Profile(IPSP) for Bluetooth Smart also has a solid foundation at the PHY/Link Layer for IPv6.Bluetooth Smart has been designed specifically with low power consumption and low latency in mind, and the new features announced by the Bluetooth SIG to come in 2016 (See separate blog), longer range and mesh networking, also aligns with making the Bluetooth Smart even better for low power IoT applications.

Bluetooth Smart enabled routers

So, what about the routers? To enable headless routers for IPv6 over Bluetooth Smart, the router need to support that. The reality today is that most commercial routers do not, but we have seen a few routers coming out with Bluetooth HW built-in. We at Nordic have been enabling support for IPv6 over Bluetooth Smart for OpenWRT, which can be used on many Off-the-shelf routers. A standard router with a Bluetooth dongle running OpenWRT works well for IPv6 over Bluetooth Smart. For more details, check out our IoT SDK documentation.

This is why we at Nordic thinks IPv6 over Bluetooth Smart is a big thing.

nRF5 SDK for IoT

The nRF5 SDK for IoT is a IPv6-ready Internet Protocol Suite for Nordic's nRF52 Series. The nRF52 is ideal for battery powered IoT applications with its 64MHz Cortex M4-F CPU, high RF performance, large memory and rich peripheral set. The nRF52 Series enables Bluetooth Smart Applications to run a the full IPv6 over Bluetooth stack with the added security and support for upgradability the market requires in IoT applications today. All with a power consumption levels enabling multiyear operation for battery operated IoT products. The SW architecture of the nRF5IOT SDK is shown in the figure 3. The SW stack consists of several layers is required to route IPv6 packets to and from end device.

image description

Fig 3.

The Nordic Bluetooth Smart stack (SoftDevice), in connection with the Internet Protocol Support Profile (IPSP), serves the role of Physical and Link Layer in the open system interconnect (OSI) model. This layer is responsible for establishing physical links and enabling logical channels for the IPv6 data exchange. The 6LoWPAN adaption layer enables compression of IPv6 traffic and optimizations in procedures (for example, neighbor discovery) on Bluetooth Smart. Internet Protocol version 6 (IPv6), Internet Control Message Protocol version 6 (ICMPv6), and Routing Protocol for Low-Power and Lossy Networks (RPL) form the Network Layer. This layer is responsible for establishing neighbors, ensuring that other devices can be reached, and routing. User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) are well-known transport protocols for IPv6. They form the Transport Layer and work with various physical transports i.e, Bluetooth Smart. In the SDK we have also implemented Datagram Transport Layer Security (DTLS) and Transport Layer Security (TLS) these are data security libraries running on top of UDP and TCP, respectively. Constrained Application Protocol (CoAP) and Message Queuing Telemetry Transport (MQTT) on the Application Layer are application protocols based on UDP and TCP, respectively. They are defined for machine-to-machine (M2M) communication between devices with constrained resources and constrained bandwidth. In the nRF5 SDK for IoT the Trivial file transport protocol (TFTP) is also an application layer also implemented. Within the SDK there are also several application examples including the LWM2M:

For more details about the nRF52 SDK for IOT, see the documentation available on the link at the end of the blog post.

What is new in the nRF52 SDK for IoT?

Compared to the previous nRF51 IoT SDK, we have added the quite a lot of new features. The new main features address three major real world problems in many IoT solutions today; end-to-end security between the cloud service and application, easy commissioning of nodes to the router and enable upgrading the applications in the field. We also decided to depreciate support for the nRF51 Series and are fully focusing on the nRF52 Series.

End-to-end security – security is a main concern in most IoT applications. Not only to have an encrypted data links but to ensure to have end-to-end security between the cloud service and the end node to make sure the data is not compromised. The nRF5 IOT SDK supports the proven internet protocols for security i.e., TLS (or SSL) and DTLS enabling end-to-end security to both TCP and UDP based communication for IoT applications running Bluetooth Smart.

image description

Fig 4

Commissioning – to make sure the router communicates with right IoT node in a simple and user friendly manner can be a challenge as the IoT nodes and headless router typically have no user interface. The Nordic IOT solution includes a simple method for commissioning nodes to the router using and mobile phone app (nRF Joiner APP). nRF BLE Joiner is add new IPv6 IoT nodes to a network based onBluetoothRegistered Smart. The application provides the option to configure the IoT node to establish a connection to an IPv6 enabled router via Bluetooth Smart. The release includes an example Android phone app and a daemon to run on the router to support the commissioning.

Upgrading products in the field – The nRF5 IOT SDK together with the nRF52 Series enabling cloud services to upgrade functionality and/or bugfix end products by transmitting a new firmware from the cloud service using standard internet protocols for file transfer i.e., TFTP.

Application layer protocols –Additionally, support for LWM2M and IPSO alliance smart object which are used by many popular cloud services are included in the nRF5 IoT SDK.

With the nRF5 IOT SDK we are bringing additional important building blocks to our IPv6 over Bluetooth Smart offering. We bring IPv6 over Bluetooth Smart to the security level the market demands, a simple model for commissioning nodes to the router and we enable our customer to update their products in the field to support new features in the ever evolving landscape of the IoT by using standard internet protocols for file transfer.

Download the nRF5 SDK for IoT here: www.developer.nordicsemi.com

Documentation is available on the infocenter: http://infocenter.nordicsemi.com/

And visit the nRF5 SDK for IoT webpage: http://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF5-SDK-for-IoT