How Hydrogen Protocol works
The Hydrogen Protocol (HP) is a Low Power Wide Area Network (LPWAN) roaming and interoperability framework for IoT networks that layers on top of existing IoT protocol physical layers (PHYs). The purpose of HP is to enable the development of unified IoT applications that can operate across a range of wireless technologies, network operators, and regulatory environments. HP builds on existing Internet standards, including IPv6 and the Border Gateway Protocol (BGP).
HP provides a lightweight IPv6 implementation for power and bandwidth-constrained IoT devices. HP uses the IPv6 address space to identify and authenticate devices and enable network-independent roaming. Every device is part of an IPv6 subnet that uniquely identifies the hardware and manages data routing to and from the device. Because HP is built on protocols already at the core of Internet infrastructure, device makers can provision their own IPv6 address space and connect devices using any Internet service provider supporting BGP.
HP uses the IPv6 address space in a novel way. Rather than implementing a full IPv6 stack, and tagging packets with an origin and destination address, HP uses a single 128-bit address as the device and destination address. The first 48 bits represent a routable network subnet; a gateway handles traffic to and from the IoT devices on this subnet. The following 16 bits are an application ID that groups like devices. The final 64 bits uniquely identify the specific IoT device.
Using BGP's Anycast functionality, multiple servers around the globe can process traffic for the 48-bit gateway address, allowing the devices to connect with the closest server automatically without knowing the network path between the device and the gateway. The gateway then brokers traffic with the outside on behalf of the device, acting as a bi-directional store and forward message queue.
Devices can connect via any wireless physical layer (PHY). If the device has an IPv6 connection, it can send messages directly to its IPv6 gateway. However, for devices connected via non-IPv6 compatible networks, the receiving network adapter (e.g., LoRa hotspot or carrier-operated NAT) can relay messages over IPv6 on behalf of the device.
This combination of IPv6 addresses and BGP's ability to efficiently route traffic into IPv6 subnets combines several features found in existing IoT protocols:
- HP packets use the device's 128-bit address and IPSec-style encapsulation for authentication and traffic encryption.
- A single IPv6 address identifies both a device and its network gateway. However, unlike other LPWAN protocols (e.g., LoRaWAN's use of JoinEUIs and DevEUIs), the identifiers are non-proprietary, Internet-routable addresses. IPv6-based IDs allow device and network identifiers to span LPWAN protocols and network operators. This design simplifies roaming as foreign gateways forward IPv6-addressed packets to the device's home network without knowledge of the specific LPWAN protocol or implementation.
- IPv6 gateways act as store and forward message queues, holding data on behalf of IoT devices. This design combines routing message broker functionality, often found in protocols like MQTT, with the device addressing. The gateways can implement application-specific rules for data processing, access, and retention, supporting a variety of LPWAN protocols using a standardized IPv6 interface.
By combining multiple functions, HP reduces the network overhead and protocol complexity. Using only 33-45 bytes per message frame, HP can route data over the public internet from an IoT to the device's home gateway. By shifting data management tasks from the IoT device to a network gateway, even the lowest power devices with intermittent connections can implement the complete protocol.
To learn more, read and comment on the draft protocol spec on Github.