Check Gateway Usage

I’ve got a Dragino LPS8 configured and I’m curious to know whether I’m picking up anyone else’s packets but I’m not sure where to look. I can’t see anything apart from my own traffic in the “Gateways” section on The Things Stack, but I’m not quite sure if the 2 in this message is significant: "metrics": { "ackr": 0, "rxfw": 0, "rxin": 2, "rxok": 0, "txin": 0, "txok": 0 }

That kind of line appears after my own devices transmit, but it also appears (seemingly) randomly when my own devices aren’t transmitting.

I’ve had a look through the logs on the LPS8 itself but can’t see anything standing out.

I don’t know whether this means that I’m not picking up any traffic or not looking in the right place!

The rxin value maps to rxnb from the forwarder stats message. It is the total number of packets recieved, with and without valid crc.

See translation.go

Thanks for that. That leads me to believe that

  1. There are other devices (not mine) which are using my gateway
  2. These don’t show up in the portal

I’ll have a further trawl through the logs on the gateway

If you are connected to TTN / TTS CE then there isn’t such a concept of “my gateway” - you may be the legal owner of the hardware but the whole concept of “other traffic” is what being connected to the community network. You can have devices being heard by other peoples gateways and vice versa.

Additionally, gateways hear all radio traffic, if they pass the LoRa decoder and the CRC is OK, then they are passed on to the network server. Even if they aren’t for TTN, as the gateway can’t tell, only the network server.

If you have concerns about this, please search the forum for the many discussions on this.

Hi @descartes

No concerns at all, purely curiosity (and I’d like to think I’m doing some good for the community by hosting a gateway).

I’ve managed to find some logs on the device itself, which show that over the last 10 minutes I had my own 3 devices transmit packets as well as well as 6 device Ids that I don’t recognise! I’d say that’s a positive result :slight_smile:

It would be nice if these kind of stats were available in the portal (even if it was only “total number seen over the past {time period}”).

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

Did you try to use LogRead/Gateway-Traffic?. The Dragino-gateways show you every valid LoRaWAN-signal they receive even if there is no connection to TTS or any other server.
I use this feature as a “LoRaWAN-receiver” to see what’s going on around me including RSSI and SNR values of the received nodes.

That means the gateway received 2 packets and none of them passed the CRC check. Only packets in the rxok count will be forwarded to TTN and they will be visible in the gateway part of the console.

Generally a gateway receives both LoRaWAN packets and noise. The noise may look like a packet as well. And there might even be occasional LoRa packets. The noise and LoRa packets will fail the CRC check and not be forwarded to TTN.

Bottom line: if you do not see packets apart from yours in the console there is no other traffic.

1 Like

I did try that, but nothing (not even my own traffic that I can see in the gateway view on TTN) appears in that. Doesn’t look like that page is working on my gateway.

With

https://mapper.packetbroker.net/api/v2/gateways/netID=000013,tenantID=ttn,id=“gateway ID”

You have rxRate and txRate it is the average over the last 6 or minutes

There seems to be a problem with the newest firmware containing BasicStation. If you choose:
v5.4.1628078462-20210804-2002

it should work.

Sorry, my fault. I saw you own a LPS8, this gateway doesn’t show anything in the Gateway Traffic. I mixed it up with the LIG16.

1 Like