Spark LoRaWAN and AS923

This page provides information to help you purchase devices that will work on our network, help you develop and obtain AS923 compliance for end-devices that you may be bringing to the New Zealand market, and to simply gather together useful links that will give you can find out more about how AS923 works.

LoRaWAN AS923


Spark LoRaWAN uses the 915-928 MHz ISM band and operates according to the AS923 regional specification. The latest version of the LoRaWAN regional specifications can be obtained from the LoRa Alliance website.

The latest version of the LoRaWAN regional specifications that document AS923 is available from the developer resouces section of the LoRa Alliance website:

Our network uses the LoRaWAN AS923 regional parameters, but a common mistake made by many of our customers is to configure their devices to use EU868, AU915, or US915. Frequently this is because their particular device does not have an AS923 device profile available, while there may be non-AS923 profiles listed. Either contact us to add a device profile for that device, or select one of our ‘Generic’ profiles. If a non-AS923 device-profile is selected in Device Manager (during provisioning) then while your device may still manage to connect via Spark LoRaWAN, it will perform poorly.

For example, and when compared to AS923, EU868 has the following differences, it:

  • configures its channels differently;
  • has lower limits for transmission power;
  • uses a different subset (and versions) of the MAC commands; and
  • has a 1% duty-cycle limit.

Channel Frequencies


There are only two default channels with AS923 as the remaining channels are allocated post-join.

Channel Name Frequency Bandwidth
LC0 923.2 MHz 125 KHz
LC1 923.4 MHz 125 KHz

AS923 Compliance


Spark LoRaWAN uses the 915-928 MHz ISM band and operates according to the AS923 regional specification. Only Class A and Class C operating modes are currently supported, and end-devices must be capable of supporting LoRaWAN v1.0.2 or v1.0.3 . End devices will need to be AS923 compliant, as this is the specification for New Zealand and the Asia-Pacific region.

All LoRaWAN sensors/module firmware must support the AS923 channel plan for successful provisioning and operation on Spark LoRaWAN network.

Figure 1: AS923 Gateway Channel Plan

• All sensors try to join the network using just the 923.2MHz or 923.4MHz channels, after which the network further assigns the 8x asymmetric uplink & 8x downlink channels via a LoRaWAN 1.0.2 CFList MAC downlink frame. These are depicted in above image. This includes support for the new 1.0.2 LoRa MAC commands enabling greater network centric managed radio health. LoRa product resellers, distributors, or hardware OEM’s building new sensors or retrofitting existing sensors should refer back to their LoRa module suppliers for compliance with this standard.

• See the LoRaWAN Alliance Regional Parameters Specification Document which details the operating parameters for AS923. This document is available at request from the LoRaWAN Alliance.

https://www.lora-alliance.org/for-developers

AS923 Information for Developers


When building firmware from sources provided by third parties, the default regional settings will likely need to be changed to LoRaWAN AS923 (and perhaps the LoRaWAN version will need to be corrected as well). This page shows how to do this with some firmware sources and toolchains, and hopefully these ideas will generalise to other sources and toolchains.

LoRaWAN MAC Firmware and its Sourcecode


The primary source for the LoRaMAC firmware source-code that is used by manufacturers can be found at:

and many development issues are discussed there.

STM32Cube Expansion LRWAN


STMicrolectronics provides full source-code for their firmware, along with project files for several IDE’s.

Development Environment Setup


This section deals with setting up compiler toolchains and development environments so that compilation produces AS923 firmware images. There are many toolchain options for developing LoRaWAN end-device firmware. For information about how to configure the various toolchains and distributions to use AS923, refer to the section regarding regional configuration for the various toolchains. There are many options for toolchains that we like to use when developing for SMT32 devices:

Useful links to sourcecode, operating systems, and libraries include:

Keil uVision 5 MDK


The region may need to be set to AS923, prior to compilation of the firmware image, unless the target device has another mechanism for setting the region-specific information needed to connect to the Spark/Kordia LoRaWAN. This is done by setting the REGION_AS923 preprocessor flag (and removing any other REGION_xxxxx flags, if they exist). For example, when using a STM32 Expansion LRWAN application with the B-L072Z-LRWAN1 evaluation board and the Keil uVision5 IDE, the following image shows the change made to set the region, and to add a sensor board, to the list of C Pre-Processor (CPP) options:

Figure 2: Set the region to AS923 in Keil uVision 5 from within the Project->Options menu.

and this dialogue box is accessed via the Project -> Options menu, and then the found on the C/C++ tab, as shown in the screen-capture above.

STMicrolectronics provide an activation key for the Keil Toolchain so that larger binaries can be compiled, when targeting their Cortex-M0 based STM32 microcontrollers. More information can be found at:

Ac6 System Workbench for STM32


An alternative, supported toolchain is the Ac6 System Workbench IDE that includes GCC cross-compilers to build for STM32 targets.

A SW4STM project for the AT_Slave example application that is included with the STMicroelectronics STM32Cube Expansion LRWAN distribution. One of the first steps with any of these projects is to configure the LoRaWAN region to REGION_AS923 prior to compilation.

And Figure 3 shows where change REGION_EU868 to REGION_AS923 for SW4STM, so that compilation produces AS923 firmware binaries:

Figure 3: Configure the SW4STM project to use REGION_AS923 prior to compilation.

Mbed OS


Mbed OS features a free online compiler, to compile binary images for your firmware, as well as numerous projects and even a free Real-Time Operating System (RTOS). The library sourcecode and RTOS are available for download, and includes project management and a build system – via Mbed CLI.

The MultiTech mDot and xDot devices feature the Mbed OS1, and may provide an easy route to beginning LoRaWAN embedded development if you are already familiar with the ARM Mbed OS and platform. The preferred method to set the region (or other compile-time) parameters when building Mbed OS firmware images is to place the additional flags and settings in a mbed_app.json file. For example, to set the default CHANNEL_PLAN for a MultiTech mDot device, the mbed_app.json file might contain an entry like this:

{
    "config": {
        "channelPlan": {
            "help": "Sets the regional channel plan",
            "macro_name": "CHANNEL_PLAN",
            "value": "CP_AS923"
        }
    }
}

GCC plus CMake


You will need to know how to install GCC ARM cross-compilers, and configure the relevant microcontroller and other device-specific files for your device. This will include providing an appropriate linker description file, along with C (header and source code) and ARM assembly files for initialising the chosen hardware. More information on configuring custom toolchains is beyond the scope of this document.

Obtaining Certification


Actility has a partner program for certifying and labelling compliant devices:

and we have our own developer guidelines as well:


  1. The STMicroelectronics B-L072Z-LRWAN1 board is also Mbed OS compatible.↩︎