LoRa/LoRaWAN tutorial 29: Semtech UDP Packet Forwarder and Semtech UDP protocol

Описание к видео LoRa/LoRaWAN tutorial 29: Semtech UDP Packet Forwarder and Semtech UDP protocol

If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
   / mobilefish  

This is part 29 of the LoRa/LoRaWAN tutorial.

In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.

In this tutorial I will briefly explain what the Semtech UDP Packet Forwarder is.
But the main focus is explaining what the Semtech UDP protocol is.

A packet forwarder is a program running on the host of a LoRa gateway and interfaces with the LoRa concentrator to pull and push packets, while interacting at the same time with the network server.
The Semtech Corporation created the first packet forwarder, which is a reference design and is called the "Semtech UDP Packet Forwarder".
When a LoRa gateway uses the Semtech UDP Packet Forwarder, it connects to a LoRaWAN network server through the Semtech UDP protocol.
See: https://github.com/Lora-net/packet_fo...

However the Semtech UDP Packet Forwarder has several flaws, for example UDP is not secure, UDP is not reliable and the forwarder is hard to configure.
More information:
https://www.thethingsnetwork.org/docs...

More information about the Semtech UDP protocol:
- The Gateway to Server Interface Definition [6]
- https://github.com/Lora-net/packet_fo...
- https://github.com/Lora-net/packet_fo...
In this tutorial the focus will be on the Semtech UDP protocol version 2.
This is the protocol version used since Semtech UDP packet forwarder version 3.0.0.

Several developers forked the Semtech UDP packet forwarder and implemented new functionalities.
All these forked packet forwarders are using the Semtech LoRa Gateway library.
A packet forwarder which uses the Semtech UDP protocol is called "legacy packet forwarder".
The Things Network has developed another protocol called "Gateway Connector Protocol" to avoid the UDP disadvantages.
Packet forwarders using this protocol are NOT legacy packet forwarders.
More information:https://www.thethingsnetwork.org/docs...

UPSTREAM COMMUNICATION
When a gateway receives a RF packet from an end node, the gateway creates a PUSH_DATA packet which is sent to a LoRaWAN network server.
After the server received the PUSH_DATA packet, the server sends a PUSH_ACK back to the gateway and then processes the PUSH_DATA packet.

DOWNSTREAM COMMUNICATION
At regular time intervals the gateway sends a PULL_DATA packet (aka keepalive message) to the network server.
If the gateway is behind a firewall it impossible for the network server to send packets to the gateway.
The PULL_DATA packets keeps any intervening firewall open by informing the server of the gateway UDP port number which it can use.
After the server received the PULL_DATA packet, the server sends a PULL_ACK back to the gateway to confirm that the network route is open and that the server can send PULL_RESP packets at any time to the gateway.
When the gateway receives a PULL_RESP packet, the gateway sends a TX_ACK feedback to the server to inform if the downlink request has been accepted or rejected by the gateway.

Tcpdump is a command line packet analyser that monitors and logs TCP/IP traffic and other packets passing between a network and the computer on which it is executed.

The generated raw tcpdump output:
https://www.mobilefish.com/download/l...

Some notes added for more detailed explanation:
https://www.mobilefish.com/download/l...

Node-RED is a browser-based development tool for wiring together hardware devices, APIs and online services.
Import a very simple Node-Red flow to capture the rxpk (received packet), stat (status), txpk (transaction packet) and txpk_ack (transaction packet acknowledge) JSON objects which are sent to/from the gateway:
https://www.mobilefish.com/download/l...

More information about the RAK831 Pilot Gateway:
https://www.aliexpress.com/store/prod...

Interested in the RAK831 components:
https://www.aliexpress.com/store/prod...

Check out all my other LoRa/LoRaWAN tutorial videos:
   • LoRa/LoRaWAN tutorials  

Subscribe to my YouTube channel:
   / @mobilefish  

The presentation used in this video tutorial can be found at:
https://www.mobilefish.com/developer/...

#mobilefish #lora #lorawan

Комментарии

Информация по комментариям в разработке