LoRa Gateway 笔记 2.1.1 Packet forward 功能介绍

五迷三道 提交于 2020-04-11 19:34:00

1 前言

Packet forwarder 是运行在 LoRa 网关上的一个程序,用来将集中器收到的 RF 数据包 通过 IP/UDP 链路转发给服务器,以及将 服务器发出的数据包通过 RF 发出来。它也可以发射 GPS 同步信标帧,用于协调网络内的所有节点。

Packet forwarder 顾名思义,就是一个网关与Server间的包转发器。

想要了解 网关 和 server 之间协议的话,可以查看 PROTOCOL.TXT

小能手整理了 LoRa Gateway 的开发笔记系列,详细可点此查看

2 系统架构介绍

((( Y )))
    |
    |
+- -|- - - - - - - - - - - - -+        xxxxxxxxxxxx          +--------+
|+--+-----------+     +------+|       xx x  x     xxx        |        |
||              |     |      ||      xx  Internet  xx        |        |
|| Concentrator |<----+ Host |<------xx     or    xx-------->|        |
||              | SPI |      ||      xx  Intranet  xx        | Server |
|+--------------+     +------+|       xxxx   x   xxxx        |        |
|   ^                    ^    |           xxxxxxxx           |        |
|   | PPS  +-----+  NMEA |    |                              |        |
|   +------| GPS |-------+    |                              +--------+
|          +-----+            |
|                             |
|            Gateway          |
+- - - - - - - - - - - - - - -+

Concentrator: radio RX/TX board, based on Semtech multichannel modems (SX130x), transceivers (SX135x) and/or low-power stand-alone modems (SX127x).

Host: embedded computer on which the packet forwarder is run. Drives the concentrator through a SPI link.

Gateway: a device composed of at least one radio concentrator, a host, some network connection to the internet or a private network (Ethernet, 3G, Wifi, microwave link), and optionally a GPS receiver for synchronization.

Server: an abstract computer that will process the RF packets received and forwarded by the gateway, and issue RF packets in response that the gateway will have to emit.

3 帮助程序

项目中还提供了帮助程序,提供了示例来说明如何与 packet forwarder 进行通信,帮助系统构建者在不了解 LoRa network server 的情况下就可以使用 packet forwarder。

1. util_sink

Packet sink 是个简单的帮助程序,它会监听某个端口的UDP数据包,每次收到消息时就会展示出来。数据包的内容忽略不管。

2. util_ack

Packet acknowledger 这个帮助程序会监听 UDP 端口,使用 PUSH_ACK 回复 PUSH_DATA 以及 PULL_DATA 数据包。

3. util_tx_test

Network packet sender 这个帮助程序可以用来在 网关与Server 的下行链路上进行发包。

END


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!