Gateway routing behavior

From the configuration:

  # Prefer gateways for downlink with given uplink (SNR) margin.
  #
  # When receiving an uplink (by multiple gateways), the Network Server will
  # prefer the gateways that have at least the configured margin for the uplink
  # SNR when sending a downlink. Margin:
  #   uplink SNR - required SNR for spreading factor
  #
  #  * In case multiple gateways match, the Network Server will select a random
  #    gateway from the match.
  #  * In case non of the gateways have the desired margin or the uplink
  #    modulation was not LoRa, then the gateway with the best SNR (or RSSI
  #    in case of FSK) will be selected when sending a downlink.
  gateway_prefer_min_margin=10

This describes an ability to set a margin, but I think based on the last comment, if only ONE gateway receives the packet, it will switch the routing info for that device.

Consider the following diagram, where multiple gateways are present:

overlap

Now the following scenario:

  1. “Node” is on the edge of GW2 coverage
  2. GW1 receiver is busy for some reason (e.g. sending a downlink to some device)
  3. “Node” sends an uplink during this time, so GW2 is the only gateway to receive the message.
  4. LNS updates “Node” gateway routing info to “GW2”, since that was the only Gateway to receive the packet
  5. Routing is now sub-optimal (or potentially blocked)
  6. In case downlink packet link budget is less than uplink, downlinks to “node” via GW2 can always fail, until Node sends another uplink via GW1 and the LNS sets the optimal route back to GW1

So, is my assumption of (4) correct? If it is the only gateway that received an uplink, LNS changes the route even if the margin config setting is not met.

My first goal of this topic is just to determine if the above scenario could occur.

thanks,
Curt

It depends on the device class. For Class-A, the downlink is always routed through one of the gateways which received the uplink. For Class-C, last set of receiving gateways is stored in the device-session, so your assumption in 4) is correct.

1 Like