LoRa Class B 通过 Arduino 和 SX1278 实现 TDMA

LoRa Class B implementation TDMA by Arduino and SX1278

我正在构建一个 Lora 网络,其中包含两个 SX1278 模块和 Arduino Uno。 Lora基于三个类。一个,乙和丙, 问题是 : 为了实现 Class B,是否需要更改 Lora 模块寄存器?! 或者 类 之间的区别只是他们相互交流的时间? 如果您有源代码,那真的会让生活变得更轻松。

or implementing Class B, Does it need to change Lora module registers?

嗯,是的。它需要不时地做一个 RX window。

or differences between classes are just between the time they communicate to each other?

一般是的。无线通信中几乎所有节能方法的实施都可以简化为“只是它们通信之间的时间”的差异——这是一种过于简单化的做法。但一般来说,是的,classes 操纵从网关到信标的下行链路可能的时间。

ClassA可以随时发送消息,发送后才收到消息。 Class B 是 class A,定期同步接收 windows。并且 Class C 可以随时接收消息 - 保持 RX 始终打开。

来自lora-allience.org/about-lorawan

Class A – Lowest power, bi-directional end-devices:

The default class which must be supported by all LoRaWAN end-devices, class A communication is always initiated by the end-device and is fully asynchronous. Each uplink transmission can be sent at any time and is followed by two short downlink windows, giving the opportunity for bi-directional communication, or network control commands if needed. This is an ALOHA type of protocol. The end-device is able to enter low-power sleep mode for as long as defined by its own application: there is no network requirement for periodic wake-ups. This makes class A the lowest power operating mode, while still allowing uplink communication at any time. Because downlink communication must always follow an uplink transmission with a schedule defined by the end-device application, downlink communication must be buffered at the network server until the next uplink event.

Class B – Bi-directional end-devices with deterministic downlink latency:

In addition to the class A initiated receive windows, class B devices are synchronised to the network using periodic beacons, and open downlink ‘ping slots’ at scheduled times. This provides the network the ability to send downlink communications with a deterministic latency, but at the expense of some additional power consumption in the end-device. The latency is programmable up to 128 seconds to suit different applications, and the additional power consumption is low enough to still be valid for battery powered applications.

Class C – Lowest latency, bi-directional end-devices:

In addition to the class A structure of uplink followed by two downlink windows, class C further reduces latency on the downlink by keeping the receiver of the end-device open at all times that the device is not transmitting (half duplex). Based on this, the network server can initiate a downlink transmission at any time on the assumption that the end-device receiver is open, so no latency. The compromise is the power drain of the receiver (up to ~50mW) and so class C is suitable for applications where continuous power is available. For battery powered devices, temporary mode switching between classes A & C is possible, and is useful for intermittent tasks such as firmware over-the-air updates.