Municipality of Haarlem's gateway connected to TTN

Arjan van B.

Software engineer

Posted on 30-09-2017

Last Wednesday night, September 27th, the Municipality of Haarlem moved their private LoRaWAN gateway to The Things Network.

This obviously allows anyone to use it, for free, so traffic to be handled by the gateway will increase. But that hardly affects the gateway owner as, regardless the network, we're sharing the same frequency spectrum anyhow: gateways will receive packets from other networks even when discarding them, and collisions of concurrent packets will occur even when from other networks. In return, using TTN makes it easier for the city to ask third parties to deploy sensor nodes, nodes deployed by the city can fall back to other TTN gateways, and TTN's Adaptive Data Rate can command a node to upgrade to a better data rate if such node is closer to another TTN gateway. As long as the number of downlinks is limited†, handing over control to TTN simply benefits all.

Located over 18 meters above sea level (17 meters above street level) on the roof of the "Publiekshal", this should cover the city center and beyond, and the first results on TTN Mapper‡ show a packet from Bloemendaal made its way to Haarlem as well.

This is a Kerlink IoT Station with a wired connection to the Internet. Along with P7uis' RPI3 + IC880a gateway located at 3D Makers Zone, there now seem to be two full 8-channel TTN gateways in Haarlem. If you need debug information, feel free to drop a line.


† A full gateway can listen for uplinks on 8 channels, each using 6 spreading factors simultaneously. But while transmitting a downlink (including OTAA Join Accept responses) a gateway cannot listen to any of those, as the current LoRaWAN gateways are half-duplex. So, if there are too many downlinks, too many uplinks might be lost if no other gateways are around to receive the uplinks. A dense network of shared gateways (rather than many overlapping private networks) helps mitigating this. But just like any LoRa device, gateways are also restricted by duty-cycle regulations which prohibits them from transmitting a lot of data. To avoid issues with both the half-duplex problem and duty-cycle regulations, TTN's Fair Access Policy limits the number of downlinks to 10 per node, per day. This includes acknowledgements for confirmed uplinks, so confirmed uplinks should be used sparsely as well.

‡ Note that TTN Mapper only shows the results of people explicitly taking a node on the go while recording its location using TTN Mapper's mobile app. Anyone can do that! When using SF7 for those measurements (as recommended) this will create a worst-case scenario coverage map.