Wiki

This version (14 Nov 2023 07:24) was approved by erbe reyta.The Previously approved version (09 Nov 2023 02:57) is available.Diff

LoRa Software User Guide

Tools and Drivers

This guide contains all the necessary information on how to download, install, and setup the software environment for the LoRa reference design and its add-on hardware. Information on the different USB modes and drivers needed is also provided.

Click to display ⇲

Click to hide ⇱

The Maxim Micro Software Development Installer Kit (MaximSDK) Installer contains all the necessary tools to develop the firmware for Maxim microcontroller ICs, including Maxim® proprietary source codes, libraries, and examples dedicated to:

  • Board support packages (BSPs)
  • Validated hardware abstraction layer (HAL) source codes
  • Libraries
    • Integrated into the installer:
    • MAXUSB: CDC-ACM and HID
    • Free Crypto Library (FCL)
    • FreeRTOS
    • Lightweight TCP/IP stack (lwIP)
    • SD Card Library (SDHC)
  • Installed separately (NDA or SLA required):
    • EMV L1 Contact-Smart Card: Install as a plugin
    • NFC: Install as a plugin
    • UCL: Install as a plugin
  • Documentation
  • Wide range of examples ready to run on evaluation kits (EV kits)


For detailed information about the installation of the MaximSDK environment for Maxim® Microcontroller ICs, consult the Maxim Micro SDK (MaximSDK) Installation and Maintenance User Guide

Maxim SDK installers for different operating systems can be downloaded using below links:


For Linux OS, you may need to make this file executable. Use the command:

“chmod +x MaximMicrosSDK_linux.run”

Setting Up the Gateway

There are many variants we can choose from when deciding what hardware we should use.
For this setup, we will be using Raspberry Pi 4 as the hardware and ChirpStack v4 for our gateway OS.

Click to display ⇲

Click to hide ⇱

Equipment Required

Before continuing, you need to gather all the necessary hardware and software tools and those are listed below.

Click to display ⇲

Click to hide ⇱

Hardware

Software

Documentation



Downloading the OS

Presumably we already have possession with a hardware, first thing to do is download the OS. On this writing, the OS version is 4.1.1.

Click to display ⇲

Click to hide ⇱

SD Card Flashing

  1. Download Balena Etcher
  2. Click Flash from file from the option in the interface and navigate in your pc the location of the where the Chirpstack Gateway OS is located.
  3. Select target and choose the targeted microSD card drive
  4. Click Flash! to start the burning process of the image in the chosen SD card.
  5. Wait until it is done
After the first boot, the gateway might reboot automatically to apply some changes. The Full Image will set up the PostgreSQL database on its first boot. This could take a couple of minutes and during this time, the gateway will be less responsive.



Configure the Concentrator

To configure the concentrator, you need to setup the hardware for the gateway system by following these steps:

Click to display ⇲

Click to hide ⇱

Follow these steps to configure the hardware for the concentrator:

  1. Insert the burned SD card on the designated slot on the Raspberry Pi.
  2. Connect the RAK5146 PiHAT to the Raspberry Pi through the 40-pin connector.
  3. Connect the monitor using an HDMI cable through the mini HDMI connector found on the Raspberry Pi.
  4. Connect a USB keyboard and mouse to the RPi through the USB ports.
  5. Power on the RPi by plugging in a dedicated 5V power supply with Type C USB connector.



Follow these steps to configure the settings in the concentrator:

  1. in the RPI 4 terminal, enter sudo gateway-config in the command terminal.
  2. In the main menu, choose Setup LoRa concentrator shield in the menu.
  3. Choose RAK5146 (with GNSS).
  4. Choose AU915.
  5. Choose Channels 0 to 7 + 64.
  6. The Concentrator restarts and goes back to the main menu.
  7. Quit the main menu.



If you have properly configured your gateway and if you have installed the Full Image, then you are ready to use the ChirpStack LoRaWAN Network Server.



Connecting Gateway to the Internet

An Access-Point (AP) with Internet connection should be connected to the hardware via Ethernet connection. After your gateway has booted, it will use DHCP to obtain an IP address.

Establishing Wireless Access Point to the Gateway

By default, the ChirpStack Gateway OS will create an AP to which you can connect with the following settings:

Click to display ⇲

Click to hide ⇱

name: ChirpStackAP-XXXXXX password: ChirpStackAP



Accessing the Gateway Web Interface

Once connected in the RPI, you can now connect to the web gateway interface by entering http://GATEWAY-IP-ADDRESS/ in your browser.

Click to display ⇲

Click to hide ⇱



The default IP address of the gateway is 192.168.0.1, then you need to enter http://192.168.0.1:8080.

Your browser might show you a warning about a self-signed certificate. Click Proceed.

The default credentials are:

  • Username: admin
  • Password: admin



Connecting a Device

This section describes how to connect your LoRaWAN device with ChirpStack and how to validate that it can successfully activate and send data. At this point, it is assumed that you have a working ChirpStack environment with a connected gateway.

Click to display ⇲

Click to hide ⇱



Requirements

Before continuing, there are a couple things you need to know about your device. This information is usually provided by the device vendor.

  • DevEUI
  • LoRaWAN MAC version implemented by the device
  • Regional Parameters revision implemented by the device
  • OTAA only: Device root-keys (when no external join-server is used)



Log in to the ChirpStack Web Interface

The default credentials are:

  • Username: admin
  • Password: admin



Device Profile

Before you can add the device to ChirpStack, you have to create a device-profile, if you haven't done this already. In general, it is a good practice to create separate device-profiles for different types of devices. A device-profile contains the capabilities of your device.

For example, if it uses ABP or OTAA for activation, which LoRaWAN version and Regional Parameters revision is implemented by the device, etc. It can also be configured with a function to decode the payloads sent by the devices using the device-profile.

Creating a Device Profiles

Click to display ⇲

Click to hide ⇱

After navigating to the gateway details page of a gateway, click the ‘Device profiles” under the Tenant.

Click on the “Add device profile”

Filled in the blank from the given table under the “General” tab and click Submit once done. For the Name, enter the desired sensor node name. And the following shows the other configuration required to add a sensor node:

  • Region: AU915
  • Region Configuration: AU915 (channels 0-7 +64)
  • MAC Version: LoRaWAN 1.0.4
  • Regional parameters revision: A
  • ADR algorithm: Default ADR algorithm (LoRa only)
  • Expected uplink interval (sec): 10
  • Device-status request frequency (req/day): 8640





Application

Devices are grouped by applications. For example, you could group your temperature sensors under one application and weather stations under another application.

Adding an Application

Click to display ⇲

Click to hide ⇱

If you haven't created an application yet to which you want to add the device, click Applications, then click Create. Fill in the required fields and save the application.



Click on the Configuration: Provide the following information:

  • Name
  • Device EUI (EUI64) (Note:This information is usually provided by the device vendor.)
  • Device profile



Click on the OTAA keys and click Submit once done. Provide the Application key provided by the device vendor: For this demo, the application key is 2b7e151628aed2a6abf7158809cf4f3c



Validate

  1. After adding your LoRaWAN device to ChirpStack, validate that your device is able to activate (in case of OTAA) and send data.
  2. When clicking the device in the ChirpStack web interface, open in one window the Device data and in another window the LoRaWAN frames tab.
  3. Then turn on your device or trigger an uplink transmission. In case of an OTAA device, you should first see a JoinRequest followed by a JoinAccept message in the LoRaWAN frames tab.
  4. When the device sends its first data payload, you should also see a Join and Up event in the Device data tab.



Check the Gateway LoRa Frames

After navigating to the gateway details page of a gateway close to the device, click the LoRaWAN frames tab.

For OTAA devices, confirm that when the device tries to OTAA activate, you see a JoinRequest message followed by a JoinAccept message.

If you do not see a JoinRequest and JoinAccept, make sure that the device sends an OTAA request and that your gateway is correctly configured.

If you only see a JoinRequest message, this means that either the OTAA request is ignored or rejected by ChirpStack or that the gateway is rejecting the JoinAccept transmission. Continue with the Device LoRaWAN frames section.

Navigation - ADI LoRa
Prev.: Main Page

resources/eval/user-guides/lora-reference-design/software/setup.txt · Last modified: 14 Nov 2023 07:22 by erbe reyta