Check Gateway Usage

A friend of mine has written a thing that accepts gateway traffic encoded as Semtech UDP and puts it in a database for analysis. For this, the gateway should use the Semtech UDP protocol (obviously), not all gateways use this protocol. The gateway should be reconfigured for this extra stream.

A tool like this can be used in a local community, to get a feel how the network is performing, how busy the frequencies are, what traffic from other networks there is, what spreading factors, are devices misbehaving, etc.

Now with TTN v3, you can get a stream of events from a gateway. You only need to know the gateway-id and a gateway API key with specific rights for that gateway. This works with the Events API Events API | The Things Stack for LoRaWAN

In the past few days I’ve been playing with a simple java application that subscribes to the event stream on multiple gateways:

This should work for any TTNv3 connected gateway, not just for gateways using the semtech UDP protocol. Currently it does not log to a database, just prints out what comes in over the TTN Events API.

I have no doubt that other people have written something like this too, possibly in other languages.

I believe it can be very insightful to get a better overview of what gateways are doing.
For example, the TTN fair access policy is at least in part based on assumptions about the number of active devices in the vicinity of a gateway and the number of packets that they generate. TheThingsNetwork is no longer the only player in this spectrum, I think it can be useful to check if those assumptions are still valid.

2 Likes