Lora device seems to use non local gateway

Hi I have a MikroTik Lora8 gate way with an externally mounted outdoor 6.5 dbi antenna.
My end device is a MkrWan 1300.
I noticed that often my signal strength is low; around -115 and looking closer at the live data info I see that my device is using a gateway which is several kilometers from me. Now and again, my device will use my local gateway and the RSSI then shows about -75 or so. I’m curious as to why it wouldn’t use the strongest signal or is the routing done via ‘best routing algorithm’ based on other criteria?
If I look at my gateway URL, https://www.thethingsnetwork.org/gateway-data/gateway/eui-
It does show “last seen” as up to around the current minute (or within a few minutes)- is “last seen” based on traffic troughput?.
regards
Russell

Typically no - though it can be! Consfusing? Most GW’s will send a status messgae every ~30 secs (can typically vary from 10-60sec depending on model, firmware and config… much longer than that and NS may assume GW is not available to handle downlinks and switch to an alternate…often if traffic comes in before next status message then ‘last seen’ may update, again depends on config IIRC.

Is device on V2 or V3? Do you know if remote GW on V2 or V3? and your own GW?

How I understand your question:

  • Your device is in range of two gateways, one far, one close
  • Often only the far away gateway receives and forwards your end device’s messages

There are two reasons I can immediately think of that explains this behaviour

  • Frequency plan. The closer gateway is not configured with the correct frequency plan. In this case it might not be listening on the 8 channels that the end device is using. The Mirotik has a tab where the channels are configured. Normally the defaults are correct for TTN (at least in Europe). But maybe check if yours match up with what is chosen on the console or what is defined in the frequency plan (GitHub - TheThingsNetwork/lorawan-frequency-plans: LoRaWAN Frequency Plans for The Things Stack</t). Also double check that your end device and gateway are using the same frequency plan.

  • Network latency. If TTN receives the same uplink message from multiple gateways, the messages are de-duplicated and the metadata (rssi, etc) are merged into a single uplink that is displayed on the console. But if the closer gateway delivers the message much later (>200ms) after the far away gateway, then the second copy is discarded. We normally see this behaviour on gateways with 3G/GSM internet connections. To verify this you can enable the verbose live data stream on the console, and then you should see messages mentioning duplicates that are dropped.

It does seem like your Mikrotik gateway is connected to V2. V2 to V3 forwarding goes via the Packet Broker, which also adds latency. I’ve also seen some packet loss with this kind of setup. Maybe try and move your gateway to V3 and see if that solves the problem. And if it does, please let us know.

Hence my question above let’s see what OP comes back with… have seen the V2/V3 latency issue myself hence asking :wink: (indeed solved by removing V2 option…)

Hi - thanks for the replies. Yes my Gateway is V2.
several edits: Sorry I went to my config page and seem to have configured things finally.
Yes the event details show a local connection now. I’ll keep an eye on it.
So under my Gateways I have my newly created gateway. In the Mikrotik config setup I selected V3 for
AS shown here:
config2
So my device is showing my local gateway in the event details- and sometimes the non-local gateway with the low RSSI.
If I go to: my eui_url
It shows:"network":"ttnv2",.......
So I have my gateway connected - shown under my console, but should I remove the other servers under under the config page in the Mikrotik config page shown here:
server_config
and only have the eu1.cloud.thethings.network server setting?
Regards
Russell