====== ecoSignal LoRaWAN gateway ======
----
tags: LoRa, LoRaWAN, gateway, micro-gateway, Sx1302
{{ :micro_gateway.png?400 |}}
===== - Datasheet =====
* {{:products:lorawan_gateways:ecosignal:stghw00054_strataggem_lorawan_microgw_datasheet.pdf| Datasheet}}
----
===== - Configuration Manual Setup =====
In this documentation you can find all the information to setup your gateway (Wi-Fi, LoRa server, etc.)
* {{ :products:lorawan_gateways:ecosignal:stghw_00054_lora_micro_gateway_manual_en.pdf |english manual}}
* {{ :products:lorawan_gateways:ecosignal:stghw_00054_lora_micro_gateway_manual_fr.pdf |Manuel en Français}}
----
===== - LoRaWAN Server Configuration =====
==== - Configure the ecoSignal Gateway for the TTN LoRaWAN server ====
There are 4 steps:
- put your gateway in configuration mode
- change the parameters of the LoRa server connection
- update your frequency plan to match the TTN plan
- put your gateway back in normal mode
Each step is detailed below.
=== - Put the gateway in configuration mode ===
* Connect your gateway in ethernet (simpler but wifi works also) to the same network your browser is connected to
* Push one time on the user button, once the LED blink your gateway is in configuration mode
* Go to the configuration page in a web browser: http://ecosignal-loragw-xxxx-e.local/#/lora-settings
where ''xxxx'' is the last 4 characters of the ETH-MAC info displayed on the sticker on the back of your gateway
=== - Go to the LoRaWAN Configuration page ===
- Click on the ''LoRaWAN Configuration'' link to go to the LoRaWAN Configuration page
- Change the following settings:
- input the ''Gateway EUI'' provided by The Things Network when you registered your gateway
- input the ''LoRaWAN Network Server URL'' that you use, for instance: eu1.cloud.thethings.network
- set the ''LoRaWAN Network Server Port Up'' to 1700
- and set the ''LoRaWAN Network Server Port Down'' to 1700
Your lorawan settings should look like:\\
{{ :products:lorawan_gateways:ecosignal:ttn_lorawan_settings_documented.png?1200 |}}
**DO NOT FORGET TO SAVE**
=== - Change the frequency plan by updating your SX1302 Settings ===
- Click on the link ''SX1302 Settings Configuration'' to go the configuration page of the SX1302
- upload your frequency plan that you use with TTN.
- Click the button ''Choose file'' at the bottom of the page
- A default json configuration for EU-868 is provided below (you can download the file by clicking on its name, in blue below).
{
"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):\\
{{ :products:lorawan_gateways:ecosignal:upload_new_frequency_plan.png?1200 |}}
**DO NOT FORGET TO SAVE**
You can also download the current configuration, update it and upload it.
=== - Return to normal mode ===
- Once you have saved all your changes
- Go back to normal mode by pressing one time on the user button
- If every things is correctly configured, your gateway LED should show a solid GREEN
----
===== - Factory reset for Debug version =====
==== - 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:
* {{ :products:lorawan_gateways:ecosignal:stg-micro-lora-gw.bin | USMB EcoSignal Firmware 0.1.11-usmb}}
* {{ :products:lorawan_gateways:ecosignal:stg-micro-lora-gw_0.2.1-lyon1.bin | Lyon1 EcoSignal Firmware 0.2.1-lyon1}}
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
==== - Factory reset of the binary and the provisioning data ====
You need to download:
- the partition configuration file (below) mfg_config.csv
- the security certificates of your gateway on https://pucs.wavebricks.com
- the device certificate (device.crt)
- the device private key (device.key)
- the json configuration file
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