配置 LoraWan 网关

Configuring LoraWan Gateway

我正在尝试使用可通过 Arduino 和 Dragino Lora Shield 编程的传感器构建 LoRaWan 网络,我找到了许多使用网关的解决方案,包括 RPI 和另一个 Dragino Lora Shield 或 iC880A,以及我收到的数据将发送到云中的服务器。我对网关编程很困惑,我需要告诉它连接到节点和服务器吗?还是它会自动收到日期?我对服务器进行编程以连接到网关还是直接连接到节点?

1) 我需要告诉它连接到节点吗?还是自动接收日期?

您必须在 ABP 模式或 OTAA 模式下配置您的网关和设备。

Over-the-Air Activation (OTAA) Over-the-Air Activation (OTAA) is the preferred and most secure way to connect with The Things Network. Devices perform a join-procedure with the network, during which a dynamic DevAddr is assigned and security keys are negotiated with the device.

Activation by Personalization (ABP) In some cases you might need to hardcode the DevAddr as well as the security keys in the device. This means activating a device by personalization (ABP). This strategy might seem simpler, because you skip the join procedure, but it has some downsides related to security.

2) 我需要告诉它连接到服务器吗?我是对服务器进行编程以连接到网关还是直接连接到节点?

您的服务器不应该与节点通信,它只与您的 LoRaWAN 网关通信。

网关可以通过多种方式将数据发送到您的服务器。例如,您可以使用 MQTT 或 Protocol Buffer。

LoRaWAN 中的网关做一般网关做的事情:调解异构媒体之间的通信。 LoRaWAN 网关只是一个数据包转发器。通常,要与之通信的特定网络服务器在每个 LoRaWAN 网关中配置。

作为起点,请看一下这个实现: https://github.com/Lora-net/packet_forwarder

注意:从网关的 RF 模块接收到的任何 LoRaWAN 数据包都会转发到网络服务器,反之亦然*。网络服务器处理:终端设备身份验证、会话级别的终端设备消息 de/encryption、终端设备重复消息、终端设备重播消息、终端设备数据速率限制、data/routing 交换用户应用程序(这是商业网络服务器解决方案有大量选项的地方),以及更多...