Table of Contents

ecoSignal LoRaWAN gateway


tags: LoRa, LoRaWAN, gateway, micro-gateway, Sx1302

1. Datasheet


2. Configuration Manual Setup

In this documentation you can find all the information to setup your gateway (Wi-Fi, LoRa server, etc.)


3. LoRaWAN Server Configuration

3.1 Configure the ecoSignal Gateway for the TTN LoRaWAN server

There are 4 steps:

  1. put your gateway in configuration mode
  2. change the parameters of the LoRa server connection
  3. update your frequency plan to match the TTN plan
  4. put your gateway back in normal mode

Each step is detailed below.

3.1.1 Put the gateway in configuration mode

where xxxx is the last 4 characters of the ETH-MAC info displayed on the sticker on the back of your gateway

3.1.2 Go to the LoRaWAN Configuration page

  1. Click on the LoRaWAN Configuration link to go to the LoRaWAN Configuration page
  2. Change the following settings:
    1. input the Gateway EUI provided by The Things Network when you registered your gateway
    2. input the LoRaWAN Network Server URL that you use, for instance:
      eu1.cloud.thethings.network
    3. set the LoRaWAN Network Server Port Up to
      1700
    4. and set the LoRaWAN Network Server Port Down to
      1700

Your lorawan settings should look like:

DO NOT FORGET TO SAVE

3.1.3 Change the frequency plan by updating your SX1302 Settings

  1. Click on the link SX1302 Settings Configuration to go the configuration page of the SX1302
  2. upload your frequency plan that you use with TTN.
    1. Click the button Choose file at the bottom of the page
    2. A default json configuration for EU-868 is provided below (you can download the file by clicking on its name, in blue below).
Sx1302_configuration_TTN.json
{
    "spidev_path": "SPI3",
    "lorawan_public": true,
    "clksrc": 0,
    "antenna_gain": 0,
    "full_duplex": false,
    "precision_timestamp": {
        "enable": false,
        "max_ts_metrics": 255,
        "nb_symbols": 1
    },
    "radio_0": {
        "enable": true,
        "type": "SX1250",
        "freq": 867500000,
        "rssi_offset": -215.4,
        "rssi_tcomp": {
            "coeff_a": 0,
            "coeff_b": 0,
            "coeff_c": 20.41,
            "coeff_d": 2162.56,
            "coeff_e": 0
        },
        "tx_enable": true,
        "tx_freq_min": 863000000,
        "tx_freq_max": 870000000,
        "tx_gain_lut": [
            {
                "rf_power": 12,
                "pa_gain": 0,
                "pwr_idx": 15
            },
            {
                "rf_power": 13,
                "pa_gain": 0,
                "pwr_idx": 16
            },
            {
                "rf_power": 14,
                "pa_gain": 0,
                "pwr_idx": 17
            },
            {
                "rf_power": 15,
                "pa_gain": 0,
                "pwr_idx": 19
            },
            {
                "rf_power": 16,
                "pa_gain": 0,
                "pwr_idx": 20
            },
            {
                "rf_power": 17,
                "pa_gain": 0,
                "pwr_idx": 22
            },
            {
                "rf_power": 18,
                "pa_gain": 1,
                "pwr_idx": 1
            },
            {
                "rf_power": 19,
                "pa_gain": 1,
                "pwr_idx": 2
            },
            {
                "rf_power": 20,
                "pa_gain": 1,
                "pwr_idx": 3
            },
            {
                "rf_power": 21,
                "pa_gain": 1,
                "pwr_idx": 4
            },
            {
                "rf_power": 22,
                "pa_gain": 1,
                "pwr_idx": 5
            },
            {
                "rf_power": 23,
                "pa_gain": 1,
                "pwr_idx": 6
            },
            {
                "rf_power": 24,
                "pa_gain": 1,
                "pwr_idx": 7
            },
            {
                "rf_power": 25,
                "pa_gain": 1,
                "pwr_idx": 9
            },
            {
                "rf_power": 26,
                "pa_gain": 1,
                "pwr_idx": 11
            },
            {
                "rf_power": 27,
                "pa_gain": 1,
                "pwr_idx": 14
            }
        ]
    },
    "radio_1": {
        "enable": true,
        "type": "SX1250",
        "freq": 868500000,
        "rssi_offset": -215.4,
        "rssi_tcomp": {
            "coeff_a": 0,
            "coeff_b": 0,
            "coeff_c": 20.41,
            "coeff_d": 2162.56,
            "coeff_e": 0
        },
        "tx_enable": false
    },
    "chan_multiSF_0": {
        "enable": true,
        "radio": 0,
        "if": -400000
    },
    "chan_multiSF_1": {
        "enable": true,
        "radio": 0,
        "if": -200000
    },
    "chan_multiSF_2": {
        "enable": true,
        "radio": 0,
        "if": 0
    },
    "chan_multiSF_3": {
        "enable": true,
        "radio": 0,
        "if": 200000
    },
    "chan_multiSF_4": {
        "enable": true,
        "radio": 0,
        "if": 400000
    },
    "chan_multiSF_5": {
        "enable": true,
        "radio": 1,
        "if": -400000
    },
    "chan_multiSF_6": {
        "enable": true,
        "radio": 1,
        "if": -200000
    },
    "chan_multiSF_7": {
        "enable": true,
        "radio": 1,
        "if": 0
    },
    "chan_Lora_std": {
        "enable": true,
        "radio": 1,
        "if": -200000,
        "bandwidth": 250000,
        "spread_factor": 9,
        "implicit_hdr": false,
        "implicit_payload_length": 17,
        "implicit_crc_en": false,
        "implicit_coderate": 1
    },
    "chan_FSK": {
        "enable": true,
        "radio": 1,
        "if": 300000,
        "bandwidth": 125000,
        "datarate": 50000
    }
}

You can upload the file using the interface shown at the bottom of the configuration page (an illustration is given below):

DO NOT FORGET TO SAVE

You can also download the current configuration, update it and upload it.

3.1.4 Return to normal mode

  1. Once you have saved all your changes
  2. Go back to normal mode by pressing one time on the user button
  3. If every things is correctly configured, your gateway LED should show a solid GREEN

4. Factory reset for Debug version

4.1 Factory reset of the binary

When programming the gateway or another esp32 chip on the your PC, while your gateway is plugged-in, you might flash a wrong firmware or a faulty firmware on your gateway. If you need to reflash a correct firmware here are some firmwares you can use:

You can use the esptool.py tool from espressif with the following command:

esptool.py write_flash 0x0 stg-micro-lora-gw_0.2.1-lyon1.bin

4.2 Factory reset of the binary and the provisioning data

You need to download:

  1. the partition configuration file (below) mfg_config.csv
  2. the security certificates of your gateway on https://pucs.wavebricks.com
    1. the device certificate (device.crt)
    2. the device private key (device.key)
  3. the json configuration file
mfg_config.csv
key,type,encoding,value
mfg_ns,namespace,,
cert,file,binary,device.crt
priv_key,file,binary,device.key
ca-ota-cert,file,binary,ca_ota.crt
json_conf,file,binary,conf.json