The following instructions will guide customers bring their own LoRaWAN gateway while utilizing Azure IoT Hub for provisioning and deployment. This approach offers various features:
- Secure communication and transport for LoRaWAN packets
- Double encryption using x.509 TLS certificates
- Device management and metrics
- Lower network bandwidth consumption
- Region Interoperability and scalability
The Semtech Packet Forwarder configuration
global_conf.json file must be configured according to it’s region.
myDevices uses the Frequency Sub-band 2 (FSB2)
Locate the Lora packet forwarder configuration file in your gateway for your region. Most gateways uses the Semtech Packet Forwarder.
The server address under the
global_conf.json must be set to
localhost and server port to
Login to the myDevices network server and register a new gateway under your organization.
After adding a new gateway, click on “Certificates” followed by “Generate Certificate”. The application will generate three values, we will need the TLS Certificate and TLS Key portion. The certificates are generated only once and will disappear, hence make sure to copy the values to individual text files. Save the certificate and key with the following naming pattern for ease of management.
Copy the certificate to a non-volatile location within the gateway.
The certificates must be placed in a secure directory within the gateway and permissions to these must be set to chmod 444 (read read read). Furthermore, these certificates will be used by the Device Provisioning Service client and the ChirpStack Gateway Bridge client.
DPS client is a software that will be provided by myDevices to always execute on boot up. This software is responsible for the following:
- Registering the gateway to Azure IoT Hub
- Generating the configuration file needed for the ChirpStack Gateway Bridge client
Current dps-client (opkg) packages for specific gateways are available below:
If your gateway is not supported, follow the compile instructions here.
Example of installing opkg packages in the gateway.
The chirpstack-gateway-bridge is responsible for creating a UDP server and forwarding all UDP packets received by the Semtech packet forward through MQTT. myDevices contributed to the Azure Integration and other features within ChirpStack. The bridge requires a configuration file which contains device certificate paths, device Id and IoT Hub hostname. All of this information will be generated by the Device Provisioning Service (DPS) client. More information about this client can be found here.
Please make sure to use the following versions from 3.14.3 to 3.14.5.
v4.0.0 is not supported.
chirpstack.io project has instructions for various gateway manufactures such as Multitech, Tektelic, Kerlink, Laird, and others.
Current chirpstack-gateway-bridge packages for specific gateways are available at these links:
The gateway command control script is used by the chirpstack-gateway-bridge to execute commands on the gateway. These include commands to initiate a remote shell session from a gateway to a server for debugging of remote devices over SSH, as well as update packages on the gateway. The script is called command-ctrl.sh and is available in the gateway-provisioning-assets repo. This script should be installed on the device at
/opt/mydevices/command-ctrl.sh. The script file permissions should be set to allow execution by the root user.
The commands to use this script are included in the chirpstack-gateway-bridge config file generated by the dps-client.
After completed the above steps on the gateway, make sure to restart the gateway and verify services are running.
- Login to the LNS and check the Last Seen status has been updated or click on Frames and wait for new data to be populated.
- After, login to myDevices Console and registry the new gateway with the
eui-prefix. For example:
- Pair the gateway in the myDevices portal.