Long Range Wide Area Network (LoRaWAN) is a proprietary wireless communication protocol. While the achievable data rates are by design comparatively low, it offers long communication ranges with low power consumption. In Europe the unlicensed 868MHz frequency band is used, such that anyone use LoRaWAN without the need to apply for dedicated spectrum. So LoRaWAN is a good choice for IoT applications.
Around the globe there are several commercial network operators that operate LoRaWAN networks. These networks consist of gateways which provide coverage to connect nodes with the LoRaWAN network and a backend. The gateways forward messages to and from the nodes to the network operator backend via the Internet. In the backend messages received from the nodes can be accessed and data can be send to the nodes. Besides the commercial networks also the community driven The Things Network (TTN) provides a freely accessible LoRaWAN network in many locations worldwide. Here the gateways are provided and operated by individuals. Also the backend can be used by anyone free of charge.
Gateways are either available as ready to use product my multiple network equipment vendors. An overview is on this page of the TTN community. But there is also the possibility to build an own gateway. This article focuses on the latter. There are multiple possibilities to build an own gateway, but in the following these components are used:
- Raspberry Pi (or any similar board with a SPI connection)
- iC880A-SPI – LoRaWAN Concentrator 868 MHz
- SMA Antenna and Pigtail Cable
Additional components like a SD card, a power supply or a casing are not covered in the article. These should be suitable for the intended environment, e.g. outdoor placement of the gateway.
|Description||iC880a pin||Raspberry Pi pin|
|Supply Voltage 5V||21||2|
The TTN network is currently in transition from the current Things Network Stack V2 to the next version, which is called The Things Stack V3. Therefore, the software required to operate an own gateway is not actively maintained anymore while the software for the next version is not yet available.
The guide of the TTN Zürich community also includes an automatic installation script. It was developed for an older version of Raspbian, but also works on current versions.