How are the disconnection events triggered for LoRaWAN gateways?

0

Hi!

According to the documentation, IoT Core supports publishing messages to notify you of connection status events for LoRaWAN gateways.

My question is: what is the criteria to trigger a "disconnect" event? Does IoT Core somehow periodically ping the gateway, or is there a timeout based on the last uplink message received from any IoT device sending data through the gateway?

Thank you in advance for your response

gefragt vor einem Jahr354 Aufrufe
1 Antwort
0
Akzeptierte Antwort

Hi. The Basic Station LNS protocol uses WebSocket as the transport protocol: https://lora-developers.semtech.com/build/software/lora-basics/lora-basics-for-gateways/?url=tcproto.html.

WebSocket is a connection-oriented protocol. For graceful closing of the connection, there is a closing handshake: https://datatracker.ietf.org/doc/html/rfc6455#section-1-4. You can see this implemented in Basic Station here: https://github.com/lorabasics/basicstation/blob/ba4f85d80a438a5c2b659e568cd2d0f0de08e5a7/src/net.c#L639. If Basic Station shuts down, it will send this handshake, causing AWS IoT Core for LoRaWAN to detect the disconnection immediately.

For less graceful situations, such as sudden power loss, WebSocket has the ping-pong mechanism: https://datatracker.ietf.org/doc/html/rfc6455#section-5-5-2. Here is where Basic Station will send a pong if it receives a ping from the LNS: https://github.com/lorabasics/basicstation/blob/ba4f85d80a438a5c2b659e568cd2d0f0de08e5a7/src/net.c#L577-L592.

It takes ~2 minutes to detect disconnection if I cut power to my gateway.

profile pictureAWS
EXPERTE
Greg_B
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen