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

feita há um ano353 visualizações
1 Resposta
0
Resposta aceita

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
ESPECIALISTA
Greg_B
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas