Conduit AEP: Convert to Basic Packet Forwarder

This section describes using LoRa Packet Forwarder Mode.

When forwarding packets to another Conduit be sure the receiving end has the firewall opened to receive incoming connections.

On the LoRaWAN > Network Settings page select PACKET FORWARDER Mode. Then click the Manual Configuration link to show the Config Card text boxes to enter global_conf.json file contents. Use the links to examples found below as a staring point for the manually configuring the Packet Forwarder.

MTAC-003 Packet Forwarder with mPower = 6.0.4

Be sure to include indenting spaces in your JSON file.

  • AP1
            "com_type": "SPI",
            "com_path": "/dev/spidev0.0",
            "tmp102": 72,
            "sx1261_conf": {
                "spi_path": "/dev/spidev0.1",
    
  • AP2
            "com_type": "SPI",
            "com_path": "/dev/spidev1.0",
            "tmp102": 73,
            "sx1261_conf": {
                "spi_path": "/dev/spidev1.1",
    
Dual Packet Forwarder with mPower = 6.0

The work-around used below must be removed. The proper links will be added by the init script.

Dual Packet Forwarder with mPower = 5.2.1

Dual packet forwarder with two MTAC-LORA-H cards is possible in the 5.2.1 update. Different Channel Plans and Network Servers can be configured for each card.
There was an error found in the script to add the spi_device path, adding a “gateway” object as shown with the correct path for each accessory port is the current workaround.

  • In the Config Card 1 and 2 text boxes replace the JSON line
    "gateway_conf": {
  • AP1
        "gateway": { "spi_device": "" },
        "gateway_conf": {
            "spi_device" : "/dev/spidev32766.2",
  • AP2
        "gateway": { "spi_device": "" },
        "gateway_conf": {
            "spi_device" : "/dev/spidev32765.2",

 

Global Config Examples

If you are using Cellular as WAN:

  • Before activating this mode, change the keep alive interval to 1 second within the Packet Forwarder application (keepalive_interval in the config file). This decreases the latency of packets over the radio enough to allow the return packet from the network server to get to the lora radio before its timestamp expires.
  • Excellent signal strength is also required to keep latency low enough for this mode to work.

To activate LoRa Packet Forwarder Mode:

  1. Under LoRaWAN > Network Settings,  select PACKET FORWARDER  under Mode. For details, see LoRaWAN Network Settings in the mPower Conduit Software Guide.
  2.  In the Config text field, enter the contents of your custom global_conf.json file.
  3. Verify that the text field contents match the proper json format. Click Submit.
    •  The GUI passes the .json file to the packet forwarder application.
    •  If successful, a message displays LoRa settings successfully updated.
    •  If the format is incorrect, a message displays Invalid JSON input.
Additional Examples

More settings are available to the packet forwarder configuration files. Settings for beaconing and LBT are not included in the above examples but are shown in the reference code repo. Please see these examples for addition reference.
Semtech Packet Forwarder Examples

 

AS923-Japan Settings for Packet Forwarder GUI
  • Enable LBT: checked
  • LBT RSSI Offset: -4 dB
  • LBT RSSI Target: -80 dBm
  • ScanTime: 5000 us
  • Auto LBT Channels: checked

 

For Conduits with GNSS module installed
AEP >= 1.7.4
  1. Using the GUI configuration gps will be enabled in packet forwarder modes if the hardware supports it
  2. Using manual mode configuration, set “gps”: true in global_conf.json “gateway_conf” section
AEP < 1.7.4

gpsd usage of the GPS is not compatible with lora-packet-forwarder. It is not possible to use the Multitech supplied Lora-Packet-Forwarder with the GNSS port, and GPSD at the same time.

  1. Edit /etc/default/gpsd
  2. Set Enabled=”no” and Save
  3. ntpd must be disabled or configured to not use gpsd
    • Edit /etc/default/ntpd, set Enabled=”no” and Save

    Or

    • Edit /etc/default/ntpd, set GPSD_REQUIRED=0 and Save
    • Configure NTP time server in /etc/ntp.conf
  4. Set “gps_tty_path”: “/dev/ttyXRUSB2” in global_conf.json “gateway_conf” section
  5. Reboot
For Geolocation v2.1 Conduits IP67
  • GPS data is available on /dev/gps0 and /dev/ttyXRUSB0
  • GPS antenna should be connected to port 3
  • Using UI configuration does not require setting the AES key, if MANUAL configuration is used follow the next steps
  • Generate AES key to unlock the fine timestamp using the hardware chip-id
    • $ sudo /opt/lora/lora-v21-keygen $(sudo /opt/lora/gateway-utils-geo/chip_id | grep -oe '0x.*' | sed -r 's/0x//g' | sed 'N;s/\\n/ /')
    • When running on command line be sure to use -g option to enable GPS
      $ ./pkt_forwarder -g

 

Packet Forwarder Configuration Options

Two sections are available in the configuration: radio settings (SX1301_conf) and server settings (gateway_conf).

SX1301_conf

  • lorawan_public – set sync word to false: 0x12 or true: 0x34
  • clksrc – must be 0 for Multitech gateway hardware
  • antenna_gain – configure the installed antenna gain if the network server sends EIRP value with downlinks. The Multitech network server will account for antenna gain before sending tx power to the forwarder.

Radios

The radio_0 and radio_1 settings configure the two front-end radios on the MTAC cards.
enable – true if radio is enabled for use

  • type – type of radio chip installed SX1257 or SX1255, frequency range differs
  • freq – center frequency the radio is configured to listen for packets
  • tx_enable – true if radio can be used for transmissions
  • tx_freq_min – minimum frequency to be allowed for transmissions
  • tx_freq_max – maximum frequency to be allowed for transmissions
  • rssi_offset – offset in dBm to adjust the radio RSSI reading

Channels

Eight channels can be configured to receive LoRa packets using 125 kHz bandwith. These channels are configured in the chan_multiSF_x settings. Each channel has an enable boolean, a selected radio and an intermediate frequency. The channel frequency will freq setting of the radio plus the if setting of the channel.

  • enable – true if this channel is enabled for use
  • radio – selected radio to listen for packets
  • if – intermediate frequency offset applied to the selected radio “freq” setting

Two additional channels can be configured with the chan_Lora_std and chan_FSK settings.

  • enable – true if this channel is enabled for use
  • radio – selected radio to listen for packets
  • if – intermediate frequency offset applied to the selected radio “freq” setting
  • bandwidth – channel bandwidth
  • spread_factor (LoRa) – channel spreading factor (7-12)
  • datarate (FSK) – channel datarate in bps

Look-up-table (LUT)

There are sixteen power settings that can be configured, these settings have been selected during calibration for each hardware. The power sent from the network server is looked up in this table by the rf_power setting. The corresponding pa_gain, mix_gain and dig_gain settings are then input into the radio for the transmission. These settings should not be adjusted.

gateway_conf

  • gateway_ID – gateway identifier sent in each message to the network server
  • server_address – address of the network server
  • serv_port_up – port for sending uplink packets to the network server
  • serv_port_down – port to communicate to receive downlink packet from the network server
  • keepalive_interval – interval to ping the network server
  • stat_interval – interval to send stat messages to the network server
  • push_timeout_ms – socket timeout when publishing messages to the network server
  • autoquit_threshold – number of keepalive messages without response to wait before quitting
  • forward_crc_valid – enable to forward valid packets to the network server, default: true
  • forward_crc_error – enable to forward CRC failed packets to the network server, default: true. The network server will reject packets with failed CRC, it may not be necessary to forward the packets except for a statistic of local RF quality or to monitor the gateway performance over time. Some random CRC failed packets are expected to be received from random noise.
  • forward_crc_disabled – enable to forward packets without CRC enabled to the network server, default: false. LoRaWAN protocol expects uplink packets to have CRC enabled.

Listen Before Talk configuration