|
| 1 | +--- |
| 2 | +title: Semtech UDP |
| 3 | +description: Semtech UDP packet-forwarder backend. |
| 4 | +menu: |
| 5 | + main: |
| 6 | + parent: backends |
| 7 | +--- |
| 8 | + |
| 9 | +# Semtech UDP packet-forwarder backend |
| 10 | + |
| 11 | +The [Semtech UDP packet-forwarder](https://github.com/lora-net/packet_forwarder) |
| 12 | +backend abstracts the [UDP protocol](https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT). |
| 13 | + |
| 14 | +It is compatible with: |
| 15 | + |
| 16 | +* v1 of the protocol |
| 17 | +* v2 of the protocol |
| 18 | +* Modified format used by the [Kerlink iBTS](https://www.kerlink.com/product/wirnet-ibts/) |
| 19 | + containing the (encrypted) fine-timestamp |
| 20 | + |
| 21 | +## Configuration |
| 22 | + |
| 23 | +When the `semtech_udp` backend has been enabled, make sure your packet-forwarder |
| 24 | +`global_conf.json` or `local_conf.json` is configured correctly, under `gateway_conf`, |
| 25 | +the `server_address`, `serv_port_up` and `serv_port_down` must be configured so |
| 26 | +that data is forwarded to the LoRa Gateway Bridge instance. |
| 27 | + |
| 28 | +{{<highlight text>}} |
| 29 | +"gateway_conf": { |
| 30 | + "gateway_ID": "AA555A0000000000", |
| 31 | + "server_address": "localhost", |
| 32 | + "serv_port_up": 1700, |
| 33 | + "serv_port_down": 1700, |
| 34 | + ... |
| 35 | +} |
| 36 | +{{</highlight>}} |
| 37 | + |
| 38 | +## Deployment |
| 39 | + |
| 40 | +The LoRa Gateway Bridge can be deployed either on the gateway (recommended) |
| 41 | +and "in the cloud". In the latter case, multiple gateways can connect to the |
| 42 | +same LoRa Gateway Bridge instance. |
| 43 | + |
| 44 | +When the LoRa Gateway Bridge is deployed on the gateway, you will benefit from |
| 45 | +the MQTT authentication / authorization layer and optional TLS. |
| 46 | + |
| 47 | +## Packet-forwarder re-configuration over MQTT |
| 48 | + |
| 49 | +The Semtech UDP backend supports the re-configuration of the packet-forwarder |
| 50 | +over MQTT using the `config` [Commands]({{<ref "payloads/commands.md">}}). |
| 51 | + |
| 52 | +This works as follow: |
| 53 | + |
| 54 | +* The LoRa Gateway Bridge will periodically send `stats` [Events]({{<relref "payloads/events.md">}}) |
| 55 | + containing the current configuration version. |
| 56 | +* [LoRa Server](/loraserver/) processes these stats events and when a _Gateway Profile_ |
| 57 | + is associated with the gateway, it will compare the configuration version. |
| 58 | +* In case the _Gateway Profile_ version is newer, it will send a `config` |
| 59 | + command to the LoRa Gateway Bridge. |
| 60 | +* LoRa Gateway Bridge will then read the `base_file`, update it and writes it |
| 61 | + to the `output_file`. |
| 62 | +* It then restarts the packet-forwarder using the `restart_command` causing the |
| 63 | + packet-forwarder to reload its configuration. |
| 64 | + |
| 65 | +For the above to work, you must configure the _Mandaged packet-forwarder configuration_ |
| 66 | +section in the `lora-gateway-bridge.toml`. |
| 67 | + |
0 commit comments