The story of LoRa began in 2009 when Cycleo, a French company, invented LoRa. LoRa (Long Range) support for Zephyr OS goes back to December 2019. Since then, there has been a huge interest among the community to extend their support for it. More recently, LoRaWAN (low-power wide-area network) support was added to Zephyr OS. This will provide true networking support to Zephyr OS over LoRa. It operates in licensed free Sub Gigahertz frequencies (865 MHz-India, 868 MHz-Europe, etc…). It makes the perfect choice for low data rates and long-range applications.
LoRaWAN is a MAC layer that sits on top of the LoRa. According to the OSI model, LoRaWAN is the MAC (media access control) layer while LoRa is the PHY (physical) layer. LoRa protocol is closed, meaning it is proprietary to Semtech, while LoRaWAN specifications are open to the public. The reference implementation is available at the GitHub repository.
The end nodes transmit data to the gateway and the gateway will rely on the message to the network server. The network server has three components: network server, joint server, and application server. Communication between the end node and LoRaWan gateway happens through the LoRa technology while between the gateway and network server happens through TCP/IP mechanism.
After successfully adding LoRa support to Zephyr OS, it was time for LoRaWAN. Rather than writing the code from scratch, the code was reused. This was because the existing code had support for many LoRa drivers. No modifications were required to the LoRaMac-Node repo other than enabling cryptographic drivers.
Designing the LoRaWAN API is hard when compared to LoRa. This is due to the synchronous (uplink) and asynchronous (downlink) nature of LoRaWAN specifications. The initial implementation supports both dynamic (OTAA) as well as static (ABP) ways of joining the LoRaWAN server, but there’s no support for Downlink.
Currently, it only has support for CLASS-A (all end device) device classes. The plan is to add support for CLASS-B and CLASS-C device classes. There is a potential plan to add secure element support for storing keys and states. This becomes a very important aspect when we need to deploy LoRaWAN to devices.