Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix round-trip time observation for Kerlink gateways #8015

Description

@johanstokking

Summary

Kerlink deviates from the reference UDP Packet Forwarder and Basic Station implementations in behavior that affects the round-trip time measurement by The Things Stack. We need to detect the Kerlink gateways by EUI and either disable round-trip time measurements or use a different mechanism.

Why

For GWMP (the UDP client), the TX_ACK message is typically only sent at transmission time. This means that there's a delay before TX_ACK is sent, depending on RX1 delay and whether RX1 or RX2 is chosen. In contrast, the reference Semtech UDP Packet Forwarder responds with TX_ACK immediately. Since there's no ping mechanism in the UDP protocol, The Things Stack uses the time between PULL_RESP and TX_ACK as round-trip time, but for Kerlink gateways this doesn't work because of the deliberate delay.

For Basic Station, the Kerlink implementation does not support timesync.

Implementation proposal

For both protocols, there can be a special handling for gateway EUIs starting with 7076FF and 7276FF.

The semtechudp server implementation should disable recording round-trip times for these gateway EUI ranges. Alternatively, we could send a PULL_RESP with deliberately a wrong frequency or wrong timestamp (too late), as Kerlink suggests that TX_ACK is sent immediately in those cases.

The lbslns server implementation should use ping/pong for round-trip times. This can also be used for other gateway models, but not for all gateways, as not all Basic Station clients support ping/pong. For example, the TrackNet Mini Hubs (including the original The Things Indoor Gateway) don't respond with pong messages. Maybe we can whitelist the Mini Hubs and use ping/pong for round-trip time observation for all other gateways.

Acceptance criteria

  1. GWMP gateways either record no round-trip times, or correct round-trip times via invalid downlink requests
  2. Basic Station records correct round-trip times via ping/pong
  3. Non-Kerlink gateways keep their existing round-trip time observations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs/triageWe still need to triage this

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions