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

질문됨 일 년 전353회 조회
1개 답변
0
수락된 답변

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
전문가
Greg_B
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠