Giter Club home page Giter Club logo

esp-1ch-gateway's Introduction

Single Channel LoRaWAN Gateway

Version 6.2.8, Data: July 11, 2021
Author: M. Westenberg ([email protected])
Copyright: M. Westenberg ([email protected])

All rights reserved. This program and the accompanying materials are made available under the terms of the MIT License which accompanies this distribution, and is available at https://opensource.org/licenses/mit-license.php
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Maintained by Maarten Westenberg ([email protected])

logo

Description

First of all: PLEASE READ THIS FILE AND Documentation it should contain most of the information you need to get going. Unfortunately I do not have the time to follow up on all emails, and as most information including pin-outs etc. etc. are contained on these pages I hope you have the time to read them and post any remaining questions.

I do have more than 10 Wemos D1 mini boards running, some I built myself, some 10+ on Hallard, 3 on ComResult and 4 ESP32 boards. They ALL work without problems on this code. I did find however that good soldering joints and wiring makes all the difference, so if you get resets/errors you cannot explain, please have a second look at your wiring.

This repository contains a proof-of-concept implementation of a single channel LoRaWAN gateway for the ESP8266. Starting version 5.2 also the ESP32 of TTGO (and others) is supported. The software implements a standard LoRa gateway with the following exceptions and changes:

  • This LoRa gateway is not a full gateway but it implements just a one-channel/one frequency gateway. The minimum amount of frequencies supported by a full gateway is 3, most support 9 or more frequencies. This software started as a proof-of-concept to prove that a single low-cost RRFM95 chip which was present in almost every LoRa node in Europe could be used as a cheap alternative to the far more expensive full gateways that were making use of the SX1301 chip.

  • As the software of this gateway will often be used during the development phase of a project or in demo situations, the software is flexible and can be easily configured according to environment or customer requirements. There are two ways of interacting with the software:

  1. Modifying the configGway.h file at compile time allows the administrator to set almost all parameters.
  2. Using the webinterface (http://<gateway_IP>) will allow administrators to set and reset several of the parameters at runtime.

Full documentation of the Single Channel Gateway is found at things4u.github.io, please look at the Hardware Guide under the Gateway chapter.

PlatformIO or ArduinoIDE

The source works on both environments, both the classic Arduino IDE and on PlatformIO. Unfortunately there are small differences between these two envrironments. At this moment the src directory contains the PlatformIO source, and therefore we will decribe how to connect to Arduino IDE. The applies to the libraries.

PlatformIO

When in PlatformIO, choose and then and select your new LoRa-1ch-ESP-Gateway top directory. Then just open the ESP-sc-gway.ino file at src directory and build or upload

Arduino IDE

Create a place on you filesystem to work on the files. In this directory create the source directory "ESP-sc-gway" and the libraries directory "libraries". When unpacking the source at github: Copy the content of the "src" directory to the Aruino IDE "ESP-sc-gway" directory and copy the contents of the "lib" directory to the Arduino IDE "libraries" directory;

testing

The single channel gateway has been tested on a gateway with the Wemos D1 Mini, using a HopeRF RFM95W transceiver. Tests were done on 868 version of LoRa and some testing on 433 MHz. The LoRa nodes tested against this gateway are:

  • TeensyLC with HopeRF RFM95 radio
  • Arduino Pro-Mini (default Armega328 model, 8MHz 3.3V and 16MHz 3.3V)
  • ESP8266 based nodes with RFM95 transceivers.

The code has been tested on at least 8 separate gateway boards both based on the Hallard and the Comresult boards. I'm still working on the ESP32 pin-out and functions (expected soon).

Getting Started

It is recommended to compile and start the single channel gateway with as little modificatons as possible. This means that you should use the default settings in the 2 configuration files as much as possible and only change the SSID/Password for your WiFi setup and the pins of your ESP8266 that you use in loraModem.h. This section describes the minimum of configuration necessary to get a working gateway which than can be configured further using the webpage.

  1. Unpack the source code including the libraries in a separate folder.
  2. Connect the gateway to a serial port of your computer, and configure that port in the IDE. Switch on the Serial Monitor for the gateway. As the Wemos chip does not contain any code, you will probably see nothing on the Serial Monitor.
  3. If necessary, modify the _loraModem.h file and change the "struct pins" area and configure either for a traditional (=Comresult) PCB or configure for a Hallard PCB where the dio0, dio1 and dio2 pins are shared. You HAVE to check this section. In the configGway.h file the most used pin-outs are documented so it might be that you use a standard pin-out
  4. Edit the configNode.h file and adapt the "wpas" structure. Make sure that the first line of this structure remains empty and put the SSID and Password of your router on the second line of the array.
  5. In the preferences part of the IDE, set the location of your sketch to the place where you put the sketch on your computer. This will make sure that for example the required libraries that are shipped with this sketch in the libraries folder can be found by the compiler.
  6. If not yet done: Load the support for ESP8266 in your IDE.
  7. Load the other necessary libraries that are not shipped with this sketch in your IDE. Goto in the IDE to do so. Most of the include files can be loaded through this library section. Some cannot and are shipped with the Gateway.
  • LoRaCode (Version 1.0.0, see library shipped)
  • gBase64 (changed name from Adam Rudd's Base64 version)
  • TinyGPS++ (Version 1.0.0)

Through Library Manager:

  • ArduinoJson (version 6.12.0)
  • Heltec ESP32 Dev-Boards (Version 1.0.6)
  • Heltec ESL8266 Dev-Boards (Version 1.0.2)
  • SPI (Version 1.0.0)
  • SPIFFS (Version 1.0.0)
  • Streaming (Version 5.0.0)
  • Ticker (Version 1.1.0)
  • Time (Version 1.5.0)
  • Update (Version 1.0.0)
  • Webserver (Version 1.0.0)
  • WiFiClientSecure (Version 1.0.0)
  • WifiEsp (Version 2.2.2)
  • Wire (Version 1.0.1)
  • ESP_WifiManager (Version 1.0.2 by Khoi Hoang)
  1. Compile the code and download the executable over USB to the gateway. If all is right, you should see the gateway starting up on the Serial Monitor.
  2. Note the IP address that the device receives from your router. Use that IP address in a browser on your computer to connect to the gateway with the browser.

Now your gateway should be running. Use the webpage to set "debug" to 1 and you should be able to see packages coming in on the Serial monitor.

Configuration

There are two ways of changing the configuration of the single channel gateway:

  1. Changing the configGway.h and the configNode.h file at compile-time
  2. Run the http:// web interface to change settings at run time.

Where you have a choice, option 2 is far more friendly and useful.

Editing the configGway.h file

The configGway.h file contains the user configurable gateway settings. All have their definitions set through #define statements. In general, setting a #define to 1 will enable the function and setting it to 0 will disable it.

Also, some settings can be initialised by setting their value with a #define but can be changed at runtime in the web interface. For some settings, disabling the function with a #define will remove the function from the webserver as well.

NOTE regarding memory usage: The ESP8266 has an enormous amount of memory available for program space and SPIFFS filesystem. However the memory available for heap and variables is limited to about 80K bytes (For the ESP-32 this is higher). The user is advised to turn off functions not used in order to save on memory usage. If the heap drops below 18 KBytes some functions may not behave as expected (in extreme case the program may crash).

Editing the configNode.h file

The configNode.h file is used to set teh WiFi access point and the structure of known sensors to the 1-channel gateway. Setting the known WiFi access points (SSID and password) must be done at compile time.

When the gateway is not just used as a gateway but also for debugging purposes, the used can specify not only the name of the sensor node but also decrypt for certain nodes the message.

Setting USB

The user can determine whether or not the USB console is used for output messages. When setting _DUSB to 0 all output by Serial is disabled (actually the Serial statements are not included in the code).

#define _DUSB 1

Selecting Class mode of operation

Define the class of operation that is supported by the gateway. Class A is supported and contains the basic operation for battery sensors.

Class B contains the beacon/battery mode of operation. The Gateway will send ou a beacon to the connected sensors which enables them to synchronize downlink messagaging.

Class C (Continuous) mode of operation contains support for devices that are probably NOT battery operated and will listen to the network at all times. As a result the latency of these devices is also shorter than for class A devices. Class C devices are not dependent on battery power and will extend the receive windows until the next transmission window. In fact, only transmissions will make the device abort listening as long as this tranmission lasts. Class C devices cannot do Class B operation.

#define _CLASS "A"

All devices will start as class A devices, and may decide to "upgrade" to class B or C. Also the gateway may or may not support Class B, which is a superset of class A. NOTE: Only class A is supported

Selecting you standard pin-out

We support five pin-out configurations out-of-the-box, see below. If you use one of these, just set the parameter to the right value. If your pin definitions are different, update the loraModem.h and oLED.h file to reflect these settings. 1: HALLARD 2: COMRESULT pin out 3: ESP32/Wemos based board 4: ESP32/TTGO based ESP32 boarda 5: ESP32/Heltec Wifi LoRA 32(V2)

#define _PIN_OUT 1

Forcing a SPIFF format at startup

The following parameter shoudl be set to 0 under normal circumstances. It does allow the system to foce formatting of the SPIFFS filesystem.

#define SPIFF_FORMAT 0

Setting Spreading Factor

Set the _SPREADING factor to the desired SF7, SF8 - SF12 value. Please note that this value is closely related to the value used for _CAD. If _CAD is enabled, the value of _SPREADING is not used by the gateway as it has all sreading factors enabled.

#define _SPREADING SF9

Please note that the default frequency used is 868.1 MHz which can be changed in the loraModem.h file. The user is advised NOT to change this etting and only use the default 868.1 MHz frequency.

Channel Activity Detection

Channel Activity Detection (CAD) is a function of the LoRa RFM95 chip to detect incoming messages (activity). These incoming messages might arrive on any of the well know spreading factors SF7-SF12. By enabling CAD, the gateway can receive messages of any of the spreading factors.

Actually it is used in normal operation to tell the receiver that another signal is using the channel already.

The CAD functionality comes at a (little) price: The chip will not be able to receive very weak signals as the CAD function will use the RSSI register setting of the chip to determine whether or not it received a signal (or just noise). As a result, very weak signals are not received which means that the range of the gateway will be reduced in CAD mode.

#define _CAD 1

Over the Air Updates (OTA)

As from version 4.0.6 the gateway allows over the air updating if the setting A_OTA is on. The over the air software requires once setting of the 4.0.6 version over USB to the gateway, after which the software is (default) enabled for use.

The first release only supports OTA function using the IDE which in practice means the IDE has to be on the same network segment as the gateway.

Note: You have to use Bonjour software (Apple) on your network somewhere. A version is available for most platforms (shipped with iTunes for windows for example). The Bonjour software enables the gateway to use mDNS to resolve the gateway ID set by OTA after which download ports show up in the IDE.

Todo: The OTA software has not (yet) been tested in conjuction with the WiFiManager software.

#define A_OTA 1

Enable Webserver

This setting enables the webserver. Although the webserver itself takes a lot of memory, it greatly helps to configure the gatewayat run-time and inspects its behaviour. It also provides statistics of last messages received. The A_REFRESH parameter defines whether the webserver should renew every X seconds.

#define A_SERVER 1 // Define local WebServer only if this define is set
#define A_REFRESH 1 // is the webserver enabled to refresh yes/no? (yes is OK) #define A_SERVERPORT 80 // local webserver port
#define A_MAXBUFSIZE 192 // Must be larger than 128, but small enough to work

The A_REFRESH parameter defines whether or not we can set the refresh yes/no setting in the webbrowser. The setting in the webbrowser is normally put on "no" as a default, but we can leave the define on "1" to enabled that setting in the webbrowser.

Strict LoRa behaviour

In order to have the gateway send downlink messages on the pre-set spreading factor and on the default frequency, you have to set the _STRICT_1CH parameter to 1. Note that when it is not set to 1, the gateway will respond to downlink requests with the frequency and spreading factor set by the backend server. And at the moment TTN responds to downlink messages for SF9-SF12 in the RX2 timeslot and with frequency 869.525MHz and on SF12 (according to the LoRa standard when sending in the RX2 timeslot).

#define _STRICT_1CH 0

You are advised not to change the default setting of this parameter.

Enable OLED panel

By setting the OLED you configure the system to work with OLED panels over I2C. Some panels work by both SPI and I2C where I2c is solwer. However, since SPI is use for RFM95 transceiver communication you are stronly discouvared using one of these as they will not work with this software. Instead choose a OLED solution that works over I2C.

#define OLED 1

The following values are defined for OLED:

  1. 0.9 inch OLED screen for I2C bus
  2. 1.1 inch OLED screen for I2C bus

Define to gather statistics

When this is defined (==1) we will gather the statistics of every message and output it to the SPIFFS filesystem. We make sure that we use a number of files with each a fixed number of records for statistics. The REC number tells us how many records are allowed in each statistics file. As soon as the REC number is higher than the number of records allowed, we open a new file. Once the number of files exceeds the NUM amount of statistics files, we delete the oldeest file and open a new file. When selecting the "log" button on top of the GUI screen, all rthe log files are ouptu to the USB Serial device. This way, we can examine far more records than fitting the GUI screen or the Serial output.

#define STAT_LOG 1

Setting the I2C SDA/SCL pins is done in the configGway.h file right after the #define of OLED. Standard the ESP8266 uses pins D1 and D2 for the I2C bus SCL and SDA lines but these can be changed by the user. Normally thsi is not necessary. The OLED functions are found in the _loraModem.ino file, and can be adapted to show other fields. The functions are called when a message is received(!) and therefore potentionally this will add to the instability of the ESP as these functions may require more time than expected. If so, swithc off the OLED function or build in a function in the main loop() that displays in user time (not interrupt).

Setting TTN server

The gateway allows to connect to 2 servers at the same time (as most LoRa gateways do BTW). You have to connect to at least one standard LoRa router, in case you use The Things Network (TTN) than make sure that you set:

#define _TTNSERVER "router.eu.thethings.network"
#define _TTNPORT 1700

In case you setup your own server, you can specify as follows using your own router URL and your own port:

#define _THINGSERVER "your_server.com" // Server URL of the LoRa udp.js server program
#define _THINGPORT 1701 // Your UDP server should listen to this port

Gateway Identity

Set the identity parameters for your gateway:

#define _DESCRIPTION "ESP-Gateway"
#define _EMAIL "[email protected]"
#define _PLATFORM "ESP8266"
#define _LAT 52.00
#define _LON 5.00
#define _ALT 0

Using the gateway as a sensor node

It is possible to use the gateway as a node. This way, local/internal sensor values are reported. This is a cpu and memory intensive function as making a sensor message involves EAS and CMAC functions.

#define GATEWAYNODE 0

Further below in the configNode.h configuration file, it is possible to set the address and other LoRa information of the gateway node.

Connect to WiFi with WiFiManager

The easiest way to configure the Gateway on WiFi is by using the WiFimanager function. This function works out of the box. WiFiManager will put the gateway in accesspoint mode so that you can connect to it as a WiFi accesspoint.

#define _WIFIMANAGER 0

If Wifi Manager is enabled, make sure to define the name of the accesspoint if the gateway is in accesspoint mode and the password.

#define AP_NAME "ESP8266-Gway-Things4U"
#define AP_PASSWD "ttnAutoPw"

The standard access point name used by the gateway is "ESP8266 Gway" and its password is "ttnAutoPw". After binding to the access point with your mobile phone or computer, go to htp://192.168.4.1 in a browser and tell the gateway to which WiFi network you want it to connect, and specify the password.

The gateway will then reset and bind to the given network. If all goes well you are now set and the ESP8266 will remember the network that it must connect to. NOTE: As long as the accesspoint that the gateway is bound to is present, the gateway will not any longer work with the wpa list of known access points. If necessary, you can delete the current access point in the webserver and power cycle the gateway to force it to read the wpa array again.

Editing the configNode.h file

Specify the gateway node data (as with T-beam)

#if GATEWAYNODE==1
#define _DEVADDR { 0x26, 0x01, 0x15, 0x3D }
#define _APPSKEY { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define _NWKSKEY { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define _SENSOR_INTERVAL 300
#endif

Specify a name for known nodes in configNode.h

  • In configNode.h It is possible to substitue the address for known nodes with a chosen name. This will greatly enhance the readibility of the statistics overview especially for your own nodes, Now you will find names for your own nodes in the webserver.
  • set the TRUSTED_NODES to either 0 (no names), 1 (specify names for known nodes) and 2 (Do not show or transfer to TTN other than known nodes)
  • Although this will work with OTAA nodes as well, please remind that OTAA nodes will change their LORA id with every reboot. So for these nodes this function does not add much value.

Other Settings configNode.h

  • static char *wpa[WPASIZE][2] contains the array of known WiFi access points the Gateway will connect to. Make sure that the dimensions of the array are correctly defined in the WPASIZE settings. Note: When the WiFiManager software is enabled (it is by default) there must at least be one entry in the wpa file, wpa[0] is used for storing WiFiManager information.
  • Only the sx1276 (and HopeRF 95) radio modules are supported at this time. The sx1272 code should be working without much work, but as I do not have one of these modules available I cannot test this.

Webserver

The built-in webserver can be used to display status and debugging information. Also the webserver allows the user to change certain settings at run-time such as the debug level or switch on and off the CAD function. It can be accessed with the following URL: http://:80 where is the IP given by the router to the ESP8266 at startup. It is probably something like 192.168.1.XX The webserver shows various configuration settings as well as providing functions to set parameters.

The following parameters can be set using the webServer.

  • Debug Level (0-4)
  • CAD mode on or off (STD mode)
  • Switch frequency hopping on and off (Set to OFF)
  • When frequency Hopping is off: Select the frequency the gateway will work with. NOTE: Frequency hopping is experimental and does not work correctly.
  • When CAD mode is off: Select the Spreading Factor (SF) the gateway will work with

Dependencies

The software is dependent on several pieces of software, the Arduino IDE for ESP8266 being the most important. Several other libraries are also used by this program, make sure you install those libraries with the IDE:

  • gBase64 library, The gBase library is actually a base64 library made by Adam Rudd (url=https://github.com/adamvr/arduino-base64). I changed the name because I had another base64 library installed on my system and they did not coexist well.
  • Time library (http://playground.arduino.cc/code/time)
  • Arduino JSON; Needed to decode downstream messages
  • SimpleTimer; ot yet used, but reserved for interrupt and timing
  • WiFiManager
  • ESP8266 Web Server
  • Streaming library, used in the wwwServer part
  • AES library (taken from ideetron.nl) for downstream messages
  • Time

For convenience, the libraries are also found in this github repository in the libraries directory. Please note that they are NOT part of the ESP 1channel gateway and may have their own licensing. However, these libraries are not part of the single-channel Gateway software.

Pin Connections

See http://things4u.github.io in the hardware section for building and connection instructions.

Dependencies

The following dependencies are valid for the Single Channel gateway:

  • ArduinoJson 6, version 6.10.0 of Benoit Blanchon
  • gBase64 library, adapted by me to work in the expected way

To-DO

The following things are still on my wish list to make to the single channel gateway:

  • Receive downstream message with commands from the server. These can be used to configure the gateway through downlink messages (such as setting the SF)
  • Support for ESP32 and RFM95 on 433 MHz (seems to work now)
  • Display for each node the last time it was seen
  • Use the SPIFFS for storing .css files
  • Look at Class B and C support

License

The source files of the gateway sketch in this repository is made available under the MIT license. The libraries included in this repository are included for convenience only and all have their own license, and are not part of the ESP 1ch gateway code.

esp-1ch-gateway's People

Contributors

joerg555 avatar platenspeler avatar romi2002 avatar sayzard avatar vspiewak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-1ch-gateway's Issues

mDNS lookup on esp32

Hello Maarten!

Old problem with mDNS on ESP32. If use "loraserver.local" as ttnserver on ESP8266 - all good, works, but not on ESP32, dies cause cannot resolve hostname. You might not see issue if using public servers, those work always, but mDNS causes problem. On setup where there is no DNS server mDNS is very useful.
Would you consider something like this in the code (better code up to you :), please?
I added it into _utils for myself. Seems to be working for both esp8266 and esp32 (ttgo) boards I have.

IPAddress resolveHost(char * svr) {
IPAddress svrIP;
String svrName = String(svr);
Serial.print("Server ");
Serial.println(svrName);
if (svrName.endsWith(".local")) {
#if ESP32_ARCH==1
svrName=svrName.substring(0,svrName.length()-6);
svrIP = MDNS.queryHost(svrName);
for (byte i=0; i<5; i++) {
svrIP = MDNS.queryHost(svrName);
if (svrIP.toString() != "0.0.0.0") break;
Serial.println("ReTrying to resolve mDNS");
delay(1000);
}
#else
if (!WiFi.hostByName(svr, svrIP)) // Use DNS to get server IP once
{
die("Setup:: ERROR hostByName");
};
#endif
} else {
if (!WiFi.hostByName(svr, svrIP)) // Use DNS to get server IP once
{
die("Setup:: ERROR hostByName");
};
}
return svrIP;
}

Call it for all 3 servers, ntp, ttn and thingserver, cause for me ntp is also .local on server.
From setup:
ttnServer=resolveHost(_TTNSERVER);

Thanks!
Reggie

OLED does not working

Hello,
i have Heltec Wireless Stick with oled.
I have enabled oled in setting. I have check pinout setting with heltec library and all looks fine. Unfortunatelly oled does nothing.
Have you any idea why or how to debug?
Here is serial debug:
SPIFFS begin
Do Asserts
.CH= 0
.SF= 9
.FCNT= 0
.DEBUG= 1
.PDEBUG= 96
.CAD= 1
.HOP= 0
.NODE= 0
.BOOTS= 8
.RESETS= 0
.WIFIS= 6
.VIEWS= 0
.REFR= 0
.REENTS= 0
.NTPETIM= 0
.NTPERR= 0
.WAITERR= 0
.WAITOK= 0
.NTPS= 6
.FILEREC= 0
.FILENO= 0
.FORMAT= 0
.DELAY= 0
.TRUSTED= 1
.EXPERT= 0
.SEEN= 1
.MONITOR= 1
readGwayCfg:: return OK
MAC: 10:52:1c:5a:d1:30, len=17
0:0:2. WlanConnect SSID=uLIOT
WlanStatus:: CONNECTED ssid=uLIOT
Host=esp32-5ad130 WiFi Connected to uLIOT on IP=192.168.1.46
Local UDP port=1700
UDP Connection successful
Gateway ID: 10521cffff5ad130, Listening at SF9 on 868.10 MHz.
resolveHost:: OK=nl.pool.ntp.org IP=162.159.200.123
Time set=Fri 16-10-2020 09:53:16
resolveHost:: OK=router.eu.thethings.network IP=52.169.76.203
setupOta:: Started
Ready IP address: 192.168.1.46
WWW Server started on port 80
OLED_ADDR=0x3C
--- Setup() ended, Starting loop() ---

can I "fake" the connection to the internet?

I've doing some modifications to this code and I added the functionality to re-send the received package (Repeater Mode). But this would only make sense if I could take out the necessity of being connected to the internet. Is that possible?

'rstTime' was not declared in this scope

/home/icity/Arduino/ESP-sc-gway/ESP-sc-gway.ino: In function 'void loop()':
ESP-sc-gway:832: error: 'rstTime' was not declared in this scope
if ((nowSeconds - rstTime) >= _RST_INTERVAL) { // Wake up every xx seconds

In Arduino 1.6.x and 1.8.x but rstTime seems to be declared at uint32_t rstTime = 0;

ff not defined if _STRICT_1CH = 0

in file _txRx.ino this line was commented.
//const float ff = root["txpk"]["freq"]; // eg 869.525

This throw an not defined error if _STRICT_1CH = 0

downlink time control

As you said, Getting downlink to work reliably is very difficult. Is there any way to make the time more accurate?

REPEATER isn't working?

I've been using this project for the last few days and it helped me alot.
I was needing something to do like a "Mesh" network, using the ESP32 to receive a package and then send it again to the gateway.
This code has an "REPEATER" option, but It seens like it doesnt do nothing... am I correct?

Downlink not working

Hi,
at first my compliments for the good work. I'm using gateway since version "V.5.3.3.H; 180825a", now upgraded at "V.6.2.3.E.EU868; PlatformIO 200223a"
Platform is Heltek WiFi Lora 32 (V2) that perfectly work uplinks but not by downlinks.
here a piece of debug (please note stateMachine: S_CAD opmode(OPMODE_RX_SINGLE) is a piece of output I placed just before calling opmode(OPMODE_RX_SINGLE) in the stateMachine function)
It seems that PKT_PULL_RESP arrives very late...
Any suggestion?
Thanks in advance

02:49:39.494 -> stateMachine: S_CAD opmode(OPMODE_RX_SINGLE)
02:49:51.163 -> initLoraModem: SX1276 starting
02:49:51.163 -> initLoraModem: SX1276 start OK
02:49:51.196 -> readUdp:: PKT_PULL_RESP received from IP=52.169.76.203
02:49:51.230 -> txLoraModem:: powe: 14, freq: 868100000, crc: 0, iiq: 0X40
02:49:51.230 -> loraWait:: Error wait time < 0
02:49:51.230 -> txLoraModem: opmode(OPMODE_TX)
02:50:04.354 -> stateMachine: S_SCAN opmode(OPMODE_RX_SINGLE)

board reboot from API

Maarten,

I experience issue that at some random time gateway kinda works, sends stats to loraserver, but no lora data received. Power cycle helps.
I added:

// reboot
server.on("/REBOOT", {
sendWebPage("",""); // Send the webPage string
server.sendHeader("Location", String("/"), true);
server.send ( 302, "text/plain", "");
ESP.restart();
});

to _wwwServer.
Then I can monitor packets received on node-red for example and send reboot to gateway which fixes issue. Not perfect, but works.
At least I did not see any other way to reboot gateway board. Or is there any?
Would you consider adding this to code, please?

Thanks!
Reggie

compile error

hi folks,
everytime when i compile i get an error with missing function checkMIC (undefined reference. I hav tryed this with VSC and arduino ide. how can i solve this?

i fond the function in _sensor but the error cames from _txRx

thanks

Contant reboot when webserver on port 80

Hello all,
In case someone experiences constant gateway reboots and scratches heads why did it work before and not any more after reflashing gateway.
Gateway is crashing with no obvious reason after connecting to wifi and starting web server. Reset reason did not give any hint. Looks like this:
"
SPIFFS begin
Do Asserts
.CH= 0
.SF= 9
.FCNT= 0
.DEBUG= 1
.PDEBUG= 96
.CAD= 1
.HOP= 0
.NODE= 0
.BOOTS= 0
.RESETS= 0
.WIFIS= 11
.VIEWS= 0
.REFR= 0
.REENTS= 0
.NTPETIM= 0
.NTPERR= 0
.NTPS= 11
.FILEREC= 0
.FILENO= 0
.FILENUM= 0
.DELAY= 0
.TRUSTED= 1
.EXPERT= 0
.SEEN= 1
.MONITOR= 1
readGwayCfg:: return OK
MAC: 24:0a:c4:a6:1b:ec, len=17
0:0:1. WlanConnect SSID=i8ny
WlanStatus:: CONNECTED ssid=i8ny
Host=esp32-a61bec WiFi Connected to i8ny on IP=192.168.1.144
Local UDP port=1700
UDP Connection successful
Gateway ID: 240ac4ffffa61bec, Listening at SF9 on 868.10 MHz.
resolveHost:: OK=time.b41 IP=192.168.10.10
Time set=Monday 6-4-2020 20:23:37
resolveHost:: OK=loraserver.b41 IP=192.168.10.20
setupOta:: Started
Ready IP address: 192.168.1.144
readSeen:: No more info left in file, i=4
WWW Server started on port 80
OLED_ADDR=0x3C
--- Setup() ended, Starting loop() ---
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6364
entry 0x400806b8
SPIFFS begin
"
Some other board was giving meditation error, but that did not give any hint either. Code was perfectly working before.
2 ways to solve it:

  • disable web server, though not useful
  • specify web server port other than 80, I used 88. Then you connect to gw with http://: of course

No idea why it was not showing up before (consistently, I was able to get it working before), but seems to me it is kinda race condition, if other process starts on port 80 before web server, gateway crashes when web server starts on same port. Same code was working for me before and once I already stumbled on this behaviour, but after changing gw board, it started to work, I blamed board back then. Now, after last recompilation, I could not get it running at all with any board.
Crazy thing is that it shows up on any version of gateway code. I tried with esp32, esp8266, changed esp platform versions. Arduino, platform.io - does not matter, same crash.

Reggie

Problem on TTGO T-Beam :: need help

Hi things4u

!!! THANKS for your work !!!
It's a great project and I would like to get it running on my TTGO T-Beam v1.0

i compiled your project and started it on my TTGO T-Beam v1.0
But now I'm stuck in an endloop boot loop -> see 'DEBUG Output' below (ERROR hostByName NTP) ...
furthermore I also have some problems with the hardware configuration (_PIN_OUT==x, OLED, ...).
that would be my exact hardware https://github.com/lewisxhe/TTGO-T-Beam -> someone can help me here ...
note: the Paxcounter (https://github.com/cyberman54/ESP32-Paxcounter) runs quite well on this Board!

`
..:: DEBUG Output ::..
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
ESP32 defined, freq=868100000
ARDUINO_ARCH_ESP32 defined
SPIFFS init success
readConfig:: Starting
.readConfig:: reading line=SSID=ADW20-IoT
SSID= ADW20-IoT
.readConfig:: reading line=PASS=xxXXxx
PASS= iotADW20
.readConfig:: reading line=CH=0
CH= 0
.readConfig:: reading line=SF=9
SF= 9
.readConfig:: reading line=FCNT=0
FCNT= 0
.readConfig:: reading line=DEBUG=1
DEBUG= 1
.readConfig:: reading line=PDEBUG=64
PDEBUG=64
.readConfig:: reading line=CAD=1
CAD=1
.readConfig:: reading line=HOP=0
HOP=0
.readConfig:: reading line=NODE=0
NODE= 0
.readConfig:: reading line=BOOTS=202
BOOTS= 202
.readConfig:: reading line=RESETS=0
RESETS= 0
.readConfig:: reading line=WIFIS=203
WIFIS= 203
.readConfig:: reading line=VIEWS=0
VIEWS= 0
.readConfig:: reading line=REFR=0
REFR= 0
.readConfig:: reading line=REENTS=0
REENTS= 0
.readConfig:: reading line=NTPETIM=0
NTPETIM= 0
.readConfig:: reading line=NTPERR=0
NTPERR= 0
.readConfig:: reading line=NTPS=0
NTPS= 0
.readConfig:: reading line=FILEREC=0
FILEREC= 0
.readConfig:: reading line=FILENO=0
FILENO= 0
.readConfig:: reading line=FILENUM=0
FILENUM= 0
.readConfig:: reading line=DELAY=0
DELAY= 0
.readConfig:: reading line=EXPERT=0
EXPERT= 0
readConfig:: Fini

Assert=Do Asserts
debug=1
readConfig:: Starting
.readConfig:: reading line=SSID=ADW20-IoT
SSID= ADW20-IoT
.readConfig:: reading line=PASS=xxXXxx
PASS= iotADW20
.readConfig:: reading line=CH=0
CH= 0
.readConfig:: reading line=SF=9
SF= 9
.readConfig:: reading line=FCNT=0
FCNT= 0
.readConfig:: reading line=DEBUG=1
DEBUG= 1
.readConfig:: reading line=PDEBUG=64
PDEBUG=64
.readConfig:: reading line=CAD=1
CAD=1
.readConfig:: reading line=HOP=0
HOP=0
.readConfig:: reading line=NODE=0
NODE= 0
.readConfig:: reading line=BOOTS=202
BOOTS= 202
.readConfig:: reading line=RESETS=0
RESETS= 0
.readConfig:: reading line=WIFIS=203
WIFIS= 203
.readConfig:: reading line=VIEWS=0
VIEWS= 0
.readConfig:: reading line=REFR=0
REFR= 0
.readConfig:: reading line=REENTS=0
REENTS= 0
.readConfig:: reading line=NTPETIM=0
NTPETIM= 0
.readConfig:: reading line=NTPERR=0
NTPERR= 0
.readConfig:: reading line=NTPS=0
NTPS= 0
.readConfig:: reading line=FILEREC=0
FILEREC= 0
.readConfig:: reading line=FILENO=0
FILENO= 0
.readConfig:: reading line=FILENUM=0
FILENUM= 0
.readConfig:: reading line=DELAY=0
DELAY= 0
.readConfig:: reading line=EXPERT=0
EXPERT= 0
readConfig:: Fini

MAC: 24:6f:28:99:be:28, len=17
WlanConnect:: Init para 0
0:1:3. WiFi connect SSID=ADW20-IoT, pass=xxXXxx
A WlanStatus:: CONNECTED to ADW20-IoT
Host esp32-99be28 WiFi Connected to ADW20-IoT on IP=10.10.10.77
Local UDP port=1700
Connection successful
Gateway ID: 246F28FFFF99BE28, Listening at SF9 on 868.10 MHz.
Setup:: ERROR hostByName NTP
abort() was called at PC 0x400db3ae on core 1

Backtrace: 0x4008cc2c:0x3ffb1ed0 0x4008ce5d:0x3ffb1ef0 0x400db3ae:0x3ffb1f10 0x400ddb59:0x3ffb1f30 0x400e7c83:0x3ffb1fb0 0x40089341:0x3ffb1fd0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_d...................
..................
...............
`

where to put the Gateway Key ?

got it running, but TTN stil says it is offline.
ill gues i have to put the Gateway Key somewhere to identify my gateway
where do i put that ?

Downlink and some other things

Hello Maarten!

Thank you for long awaited new version!

Couple things:

  • does not compile with "#define STAT_LOG 0"
  • would be nice to have on initial display "SSID=xxx IP=x.x.x.x" not "WIFI" instead of "IP", cause that is IP address shown there afterall
  • gateway dies immediately after 1st lora packet :
    Host esp32-a612cc WiFi Connected to i on IP=192.168.1.160
    Local UDP port=1700
    Connection successful
    Gateway ID: 240AC4FFFFA612CC, Listening at SF9 on 868.10 MHz.
    setupOta:: Started
    Ready
    IP address: 192.168.1.160
    Time: Wednesday 19:10:09
    Gateway configuration saved
    WWW Server started on port 80
    OLED_ADDR=0x3C

A readUdp:: NTP msg rcvd
G addLog:: fileno=19, rec=99: 1 4 B4 0 24 A C4 FF FF A6 12 CC {"rxpk":[{"tmst":58315399,"chan":0,"rfch":0,"freq":868.099975,"stat":1,"modu":"LORA","datr":"SF9BW125","codr":"4/5","lsnr":13,"rssi":-90,"size":31,"data":"QIcBIxMAVBAB/Jk20RFKB6FE9iIEh5ajboqhU4ODgQ=="}]}
A readUdp:: Error: PKT_PULL_RESP sendPacket failed
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d3e82 PS : 0x00060a30 A0 : 0x800db14d A1 : 0x3ffb1f00
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x3ffc207c A5 : 0x3ffbecf8
A6 : 0x00000003 A7 : 0x00060423 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000022 A11 : 0x00000000 A12 : 0x3ffc207c A13 : 0x3ffbecf8
A14 : 0x00000000 A15 : 0x3ffb0060 SAR : 0x0000000e EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff3

Backtrace: 0x400d3e82:0x3ffb1f00 0x400db14a:0x3ffb1f20 0x400de0cb:0x3ffb1f50 0x400de5ec:0x3ffb1f90 0x400eaf21:0x3ffb1fb0 0x40089341:0x3ffb1fd0

Rebooting...
ets Jun 8 2016 00:22:57

helps changing "JsonObject root = jsonBuffer.to" to "JsonObject root = jsonBuffer.as" as described in v5 issues

All that with Arduino 1.8.9. Gateway TTGO with OLED. ESP32 1.0.4. loraserver.io as server.

Cheers!
Reggie

Gateway does not send downlink to APB device

Hello, I'm trying to send a downlink message to APB devices.
I configured my gateway for US902_928.
The downlink to TTN must be SF9, but the terminal shows SF12. The file configGway.h has _RX2_SF 9, as it should be.

Terminal:

sendPacket:: token=1536, {"txpk":{"imme":false,"tmst":407270414,"freq":923.3,"rfch":0,"powe":20,"modu":"LORA","datr":"SF12BW500","codr":"4/5","ipol":true,"size":22,"ncrc":true,"data":"YMgXAyaKBQADQAIAcQM1AP8BZUMRKg=="}}

txLoraModem:: end=micr=309.606519, tmst=309.606678, wait=159, freq=923.299, sf=12, bw=244, powe=15, crc=0, imme=0, iiq=40, prea=8, rfch=0, ncrc=1, size=22, strict=1, a=26:03:17:c8:, size=22, data

PlatformIO compile error

I followed the steps as explained in this documentation:
https://things4u.github.io/Projects/SingleChannelGateway/HardwareGuide/3_Hardware_Install/31_PlatformIO.html

But when I compile the code in platformIO I get the following errors:

Compiling .pio/build/Gateway_138/libfc7/LoRaCode/LoRaCode.cpp.o
Archiving .pio/build/Gateway_138/lib0a5/libaes.a
lib/LoRaCode/LoRaCode.cpp:38:17: fatal error: ESP.h: No such file or directory

compilation terminated.
Archiving .pio/build/Gateway_138/lib1a9/libArduinoJson.a
*** [.pio/build/Gateway_138/libfc7/LoRaCode/LoRaCode.cpp.o] Error 1

I tried to search for a ESP.h library in platformIO but I was not able to find anything.

Could this library use a LoRaWAN node?

Hi everyone,
This project is excellent for single channel LoRaWan gateway.
I see there is Gateway node mode for the gateway.

Could I make it become a LoRaWAN node?
So the LoRaWAN node (without WiFi) send packets to this LoRaWAN gateway via LoRaWAN.

Thanks a lot.

WifiManager

I am using version 6.1.4 and when I use WifiManager I get the following output continously

*WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params! *WM: freeing allocated params!

I see I can still get node payloads and the gateway seems to be working ok, is this normal or its a bug?

Web page is not working :(

I'm using a Wemos D1 mini + RFM95. On the IDE terminal, the gateway seems to be working, is connected to my wifi network and I get an IP, but when I used it in a web browser, I can't view any web page...

I tried the WifiManager and is running good, I can configure an wifi network through the browser...

Anyone can help me?

Setting #define OLED 0 breaks compilation

If I set #define OLED 0 it won't compile with following error message :

SP-sc-gway:305: error: 'msg_oLED' was not declared in this scope
   msg_oLED("FORMAT");
                    ^
ESP-sc-gway:367: error: 'msg_oLED' was not declared in this scope
  msg_oLED("WIFI STA");
                     ^
ESP-sc-gway:484: error: 'msg_lLED' was not declared in this scope
  msg_lLED("GET TIME",".");
                         ^
/Users/tavis/code/arduino-projects/ESP-1ch-Gateway/ESP-sc-gway/_wwwServer.ino: In lambda function:
_wwwServer:1300: error: 'msg_oLED' was not declared in this scope
   msg_oLED("FORMAT");  

Wemos D1-mini board esp8266 can not work

I download the code to Wemos D1-mini board, get the wrong log in serial port as follows:
;$\0l恟�$�鈔 ?l?b|帎���抮�b?b�騨n�lnn�b bpp?b�lrl
Can someone help me to solve this problem?
thanks!

Compile error

The compilation fails due to missing SECS_IN_HOUR definition.

_utils:375:57: error: 'SECS_IN_HOUR' was not declared in this scope

 *t = (time_t)(secs - 2208988800UL + NTP_TIMEZONES * SECS_IN_HOUR);

I modified the _utils file from SECS_IN_HOUR to SECS_PER_HOUR and it compiled just fine.

resolveHost:: ERROR hostByName

Trying to run the gateway on a TTGO T-Beam (even with adjusted pins) I get resolveHost:: ERROR hostByName .

11:24:47.509 -> readConfig:: Starting
11:24:47.544 -> .SSID= XXXXXXX
11:24:47.544 -> .PASS= YYYYYYY
11:24:47.544 -> .CH= 0
11:24:47.544 -> .SF= 9
11:24:47.544 -> .FCNT= 0
11:24:47.544 -> .DEBUG= 1
11:24:47.544 -> .PDEBUG= 64
11:24:47.544 -> .CAD= 1
11:24:47.544 -> .HOP= 0
11:24:47.544 -> .NODE= 0
11:24:47.544 -> .BOOTS= 1
11:24:47.544 -> .RESETS= 0
11:24:47.544 -> .WIFIS= 3
11:24:47.544 -> .VIEWS= 0
11:24:47.544 -> .REFR= 0
11:24:47.544 -> .REENTS= 0
11:24:47.544 -> .NTPETIM= 0
11:24:47.544 -> .NTPERR= 0
11:24:47.544 -> .NTPS= 0
11:24:47.544 -> .FILEREC= 0
11:24:47.544 -> .FILENO= 0
11:24:47.544 -> .FILENUM= 0
11:24:47.544 -> .DELAY= 0
11:24:47.544 -> .TRUSTED= 1
11:24:47.544 -> .EXPERT= 0
11:24:47.544 -> .SEEN= 0
11:24:47.544 -> .MONITOR= 0
11:24:47.544 -> readConfig:: Fini
11:24:47.544 ->
11:24:47.544 -> MAC: 24:6f:28:97:91:e0, len=17
11:24:47.654 -> 0:1:3. WiFi connect SSID=XXXXXXX, pass=YYYYYYY
11:24:56.683 -> Host esp32-9791e0 WiFi Connected to XXXXXXX on IP=192.168.0.38
11:24:57.867 -> Gateway ID: 246F28FFFF9791E0, Listening at SF9 on 868.10 MHz.
11:24:58.155 -> resolveHost:: ERROR hostByName
11:24:58.228 -> abort() was called at PC 0x400dddf6 on core 1
11:24:58.228 ->
11:24:58.228 -> Backtrace: 0x4008f200:0x3ffb1e30 0x4008f431:0x3ffb1e50 0x400dddf6:0x3ffb1e70 0x400ddf5e:0x3ffb1e90 0x400e1706:0x3ffb1f30 0x400ef47f:0x3ffb1fb0 0x4008b915:0x3ffb1fd0
11:24:58.228 ->
11:24:58.228 -> Rebooting...
11:24:58.261 -> ets Jun 8 2016 00:22:57
11:24:58.261 ->
11:24:58.261 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
11:24:58.261 -> configsip: 0, SPIWP:0xee
11:24:58.261 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
11:24:58.261 -> mode:DIO, clock div:1
11:24:58.261 -> load:0x3fff0018,len:4
11:24:58.261 -> load:0x3fff001c,len:1044
11:24:58.261 -> load:0x40078000,len:8896
11:24:58.261 -> load:0x40080400,len:5816
11:24:58.261 -> entry 0x400806ac
11:25:01.628 -> readConfig:: Starting
11:25:01.664 -> .SSID= XXXXXXX
11:25:01.699 -> .PASS= YYYYYYY
11:25:01.699 -> .CH= 0
11:25:01.699 -> .SF= 9
11:25:01.699 -> .FCNT= 0
11:25:01.699 -> .DEBUG= 1
11:25:01.699 -> .PDEBUG= 64
11:25:01.699 -> .CAD= 1
11:25:01.699 -> .HOP= 0
11:25:01.699 -> .NODE= 0
11:25:01.699 -> .BOOTS= 2
11:25:01.699 -> .RESETS= 0
11:25:01.699 -> .WIFIS= 4
11:25:01.699 -> .VIEWS= 0
11:25:01.699 -> .REFR= 0
11:25:01.699 -> .REENTS= 0
11:25:01.699 -> .NTPETIM= 0
11:25:01.699 -> .NTPERR= 0
11:25:01.699 -> .NTPS= 0
11:25:01.699 -> .FILEREC= 0
11:25:01.699 -> .FILENO= 0
11:25:01.699 -> .FILENUM= 0
11:25:01.699 -> .DELAY= 0
11:25:01.699 -> .TRUSTED= 1
11:25:01.699 -> .EXPERT= 0
11:25:01.699 -> .SEEN= 0
11:25:01.699 -> .MONITOR= 0
11:25:01.699 -> readConfig:: Fini
11:25:01.699 ->
11:25:01.769 -> WARNING:: readSeen, history file not exists /gwayNum.txt
11:25:02.830 -> readConfig:: Starting
11:25:02.865 -> .SSID= XXXXXXX
11:25:02.865 -> .PASS= YYYYYYY
11:25:02.865 -> .CH= 0
11:25:02.865 -> .SF= 9
11:25:02.865 -> .FCNT= 0
11:25:02.865 -> .DEBUG= 1
11:25:02.865 -> .PDEBUG= 64
11:25:02.865 -> .CAD= 1
11:25:02.865 -> .HOP= 0
11:25:02.865 -> .NODE= 0
11:25:02.865 -> .BOOTS= 2
11:25:02.865 -> .RESETS= 0
11:25:02.865 -> .WIFIS= 4
11:25:02.865 -> .VIEWS= 0
11:25:02.865 -> .REFR= 0
11:25:02.865 -> .REENTS= 0
11:25:02.865 -> .NTPETIM= 0
11:25:02.865 -> .NTPERR= 0
11:25:02.865 -> .NTPS= 0
11:25:02.865 -> .FILEREC= 0
11:25:02.865 -> .FILENO= 0
11:25:02.865 -> .FILENUM= 0
11:25:02.865 -> .DELAY= 0
11:25:02.865 -> .TRUSTED= 1
11:25:02.865 -> .EXPERT= 0
11:25:02.865 -> .SEEN= 0
11:25:02.865 -> .MONITOR= 0
11:25:02.865 -> readConfig:: Fini
11:25:02.865 ->
11:25:02.865 -> MAC: 24:6f:28:97:91:e0, len=17
11:25:02.975 -> 0:1:3. WiFi connect SSID=XXXXXXX, pass=YYYYYYY

ESP32 wemos with hand soldered lora module

Hey, First of all, awesome work you did here!
I am not sure what is going on cause i can't seem to really debug it well.
Soldered a little gateway together by hand using the wiring of the sparkfuns lora 1ch gateway schemetics, only leaving out the RST pin since there is no need for it. Checked the wiring 3 times but can't seem to get it working, maybe i am missing something but i keep getting a abort, here is the output from the Serial:

entry 0x400806ac
SPIFFS begin
Format SPIFFS Filesystem Done
Do Asserts
readConfig ERR:: file=/gwayConfig.txt does not exist ..
readConfig:: Error reading config file
setup:: readGwayCfg: ERROR readCfgCfg Failed
MAC: 30:ae:a4:37:e6:1c, len=17
0:0:1. WlanConnect SSID=Boogmakerstraat 45
WlanStatus:: NO SSID
..1:0:1. WlanConnect SSID=Boogmakerstraat 45
WlanStatus:: CONNECTED ssid=Boogmakerstraat 45
Host=esp32-37e61c WiFi Connected to Boogmakerstraat 45 on IP=192.168.1.108
Local UDP port=1700
UDP Connection successful
Gateway ID: 30aea4ffff37e61c, Listening at SF9 on 868.10 MHz.
resolveHost:: OK=nl.pool.ntp.org IP=94.228.143.152
Time set=Sunday 8-3-2020 17:39:53
resolveHost:: OK=router.eu.thethings.network IP=52.169.76.203
setupOta:: Started
Ready IP address: 192.168.1.108
WARNING:: readSeen, history file not exists /gwayNum.txt
WWW Server started on port 80
Unknown transceiver=0, pins.rst =14, pins.ss =18, pins.dio0 =26, pins.dio1 =33, pins.dio2 =32

abort() was called at PC 0x400dea6c on core 1

Backtrace: 0x4008c468:0x3ffb1e40 0x4008c699:0x3ffb1e60 0x400dea6c:0x3ffb1e80 0x400dec15:0x3ffb1eb0 0x400e2dfd:0x3ffb1ee0 0x400ecd97:0x3ffb1fb0 0x40088bb1:0x3ffb1fd0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
SPIFFS begin
Format SPIFFS Filesystem Done
Do Asserts
readConfig ERR:: file=/gwayConfig.txt does not exist ..

If you need any more info please let me know, would really like this to work!

Kind regards,
Daniël

WDT resetting after connected to SSID.

Im getting a constant reset after the I get connected to the SSID. My setup is NODEMCU 1.0 LOLIN + RFM95W, got SPIFFS enabled, No GPS or OLED attached (they are disabled), wifimanager as well.

I set the NTP server to my country's one: ar.pool.ntp.org

Do Asserts
.CH=	0
.SF=	7
.FCNT=	0
.DEBUG=	1
.PDEBUG=	96
.CAD=	1
.HOP=	0
.NODE=	0
.BOOTS=	0
.RESETS=	0
.WIFIS=	1
.VIEWS=	0
.REFR=	0
.REENTS=	0
.NTPETIM=	0
.NTPERR=	0
.NTPS=	0
.FILEREC=	0
.FILENO=	0
.FILENUM=	0
.DELAY=	0
.TRUSTED=	1
.EXPERT=	0
.SEEN=	1
.MONITOR=	1
readGwayCfg:: return OK
MAC: 60:01:94:3c:86:34, len=17
Host=************WiFi Connected to WayFay2 on IP=192.168.43.60
Local UDP port=1700
UDP Connection successful
Gateway ID: ***************, Listening at SF7 on 903.90 MHz.
resolveHost:: OK=ar.pool.ntp.org IP=168.96.251.197

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
ets_main.c 

TTGO ESP32 V2.1 - compile fail

Hi

Thanks for a great project. I am trying to get a single channel gateway running on a TTGo LoRa32 v2.1 hardware. When compiling I get this error:

WARNING: library ESP32WebServer claims to run on ESP32 architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s).
In file included from /Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino:74:0:
/Users/study/Documents/Arduino/libraries/ESP32WebServer/src/ESP32WebServer.h:162:15: error: cannot declare field 'ESP32WebServer::_server' to be of abstract type 'WiFiServer'
WiFiServer _server;
^
In file included from /Applications/Arduino.app/Contents/Java/libraries/WiFi/src/WiFi.h:32:0,
from /Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino:69:
/Applications/Arduino.app/Contents/Java/libraries/WiFi/src/WiFiServer.h:31:7: note: because the following virtual functions are pure within 'WiFiServer':
class WiFiServer : public Server {
^
In file included from /Users/study/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/cores/esp32/Arduino.h:152:0,
from /var/folders/_q/8cmyshtd06gfj04gz2t8mp5w0000gn/T/arduino-sketch-A301C915104278530327603DD625734A/sketch/ESP-sc-gway.ino.cpp:1:
/Users/study/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/cores/esp32/Server.h:28:18: note: virtual void Server::begin(uint16_t)
virtual void begin(uint16_t port=0) =0;
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino: In function 'void setup()':
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino:357:7: error: 'class WiFiClass' has no member named 'mode'
WiFi.mode(WIFI_STA); // WiFi settings for connections
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino:357:12: error: 'WIFI_STA' was not declared in this scope
WiFi.mode(WIFI_STA); // WiFi settings for connections
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino:358:7: error: 'class WiFiClass' has no member named 'setAutoConnect'
WiFi.setAutoConnect(true);
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino:388:8: error: 'class WiFiClass' has no member named 'setHostname'
WiFi.setHostname( hostname );
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/ESP-sc-gway.ino:400:28: error: 'class WiFiClass' has no member named 'getHostname'
response += String(WiFi.getHostname());
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino: In function 'int WlanStatus()':
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino:40:9: error: 'class WiFiClass' has no member named 'setAutoReconnect'
WiFi.setAutoReconnect(true); // Reconect to this AP if DISCONNECTED
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino: In function 'int WlanConnect(int)':
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino:238:9: error: 'class WiFiClass' has no member named 'mode'
WiFi.mode(WIFI_STA);
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino:238:14: error: 'WIFI_STA' was not declared in this scope
WiFi.mode(WIFI_STA);
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino:268:9: error: 'class WiFiClass' has no member named 'persistent'
WiFi.persistent(false);
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino:269:9: error: 'class WiFiClass' has no member named 'mode'
WiFi.mode(WIFI_OFF); // this is a temporary line, to be removed after SDK update to 1.5.4
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_WiFi.ino:269:14: error: 'WIFI_OFF' was not declared in this scope
WiFi.mode(WIFI_OFF); // this is a temporary line, to be removed after SDK update to 1.5.4
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_udpSemtech.ino: In function 'int sendUdp(IPAddress, int, uint8_t*, int)':
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_udpSemtech.ino:362:57: error: invalid operands of types 'const char [35]' and 'char*' to binary 'operator+'
mPrint("sendUdp: WlanConnect connected to="+WiFi.SSID()+". Server IP="+ String(WiFi.localIP().toString()) );
^
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_wwwServer.ino: In function 'void wifiConfig()':
/Users/study/Downloads/development/sensor/lora32/ESP-1ch-Gateway-v6.0/ESP-sc-gway/_wwwServer.ino:1093:19: error: 'class WiFiClass' has no member named 'getHostname'
response +=WiFi.getHostname(); response+="";
^
Multiple libraries were found for "ESP32WebServer.h"
Used: /Users/study/Documents/Arduino/libraries/ESP32WebServer
Not used: /Users/study/Documents/Arduino/libraries/src
Error during build: exit status 1

Any suggestions on resolving this?

I've tried different versions of the ESP32WebServer library and no success.

I compile using arduino-cli (although the Arduino IDE has the same error)

arduino-cli compile --fqbn esp32:esp32:ttgo-lora32-v1 ESP-sc-gway

Thanks

Downlink not working

Dear everyone,
I installed the gateway on TTGO LoRa32 V1 moudle and everything worked fine except of the downlink. I successfully send uplinks to the TTN, but cant send downlink via TTN.
When i configured the gateway CAD was 1 and STRICT_1CH is 1 too. Wifi Manager is 0.
Im simulating downlink via TTN, i see the scheduled message on the console, but the downlink doesn't sent. I keep seeing the uplinks arrived. I set the gateway to class A.
Any tips? Any way to debug it?
Ori

ack_lost, uplinks_missed and uplinks_lost with lorawan-server

Hi guys,

I'm seeing a lot of ack_lost, uplinks_missed and uplinks_lost events with lorawan_server.
Both gateway and server are located in the same room on the same network. How do I even start to figure out why the errors?
Note: the data seem coming through (from device to server via gateway).

I've set debug to 3 via web ui and looking at serial monitor I don't see any obvious problem.
Typical output is below:

Hi guys,

I'm seeing a lot of ack_lost, uplinks_missed and uplinks_lost events with lorawan_server.
Both gateway and server are located in the same room on the same network. How do I even start to figure out why the errors?
Note: the data seem coming through (from device to server via gateway).

I've set debug to 3 via web ui and looking at serial monitor I don't see any obvious problem.
Typical output is below (first three IP bytes are represented as MYSUBNET):

Thu 14-05-2020 17:04:27- UP ESP-sc-gway:: PKT_PULL_DATA message sent: micr=592.976816
Thu 14-05-2020 17:04:27- loop:: readUdp available
Thu 14-05-2020 17:04:27- Dwn readUdp:: message ident=4
Thu 14-05-2020 17:04:27- Dwn readUdp PKT_PULL_ACK: micr=593.493082, size=4 From MYSUBNET.5, port 1680
, data: 1:F:BD:4:
Thu 14-05-2020 17:04:27- Dwn readUdp:: ret=4, data=1 15 189 4
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- S_RX no INTR:: 0
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- RX HEADER:: 16
Thu 14-05-2020 17:04:28- R rxPkt:: CRC used
Thu 14-05-2020 17:04:28- UP receivePkt:: rxPkt: t=Thu 14-05-2020 17:04:28, f=0, sf=10, a=56:ed:0c:fb:, flags=50, addr=0, len=26
Thu 14-05-2020 17:04:28- RXDONE:: dT=388169I=RXDONE HEADER , F=0, SF=10, E=0, S=RX , eT=9339533, dT=417994
Thu 14-05-2020 17:04:28- UP receivePacket:: start: micr=594.846694, tmst=406.992917
R buildPacket:: pRSSI=-83 RSSI: -129 SNR: 12 Length: 26 -> 40 FB C ED 56 80 30 0 1 E4 D A5 12 3 F A5 80 28 C9 54 D7 48 C7 B1 4F 66
Thu 14-05-2020 17:04:28- UP RXPK:: {"rxpk":[{"chan":0,"rfch":0,"freq":868.099975,"stat":1,"modu":"LORA","datr":"SF10BW125","codr":"4/5","lsnr":12,"rssi":-83,"size":26,"data":"QPsM7VaAMAAB5A2lEgMPpYAoyVTXSMexT2Y=","tmst":594866936}]} , length=209
Thu 14-05-2020 17:04:28- sendUdp: WlanConnect connected to=MYSSID. Server IP=MYSUBNET.103
Thu 14-05-2020 17:04:28- UP receivePacket:: sendUdp: micr=594.898051, tmst=594.866936
Thu 14-05-2020 17:04:28- receivePacket:: No Index
Thu 14-05-2020 17:04:28- loop:: readUdp available
Thu 14-05-2020 17:04:28- Dwn readUdp:: message ident=1
Thu 14-05-2020 17:04:28- Dwn PKT_PUSH_ACK:: size=4, From MYSUBNET.5
Thu 14-05-2020 17:04:28- Dwn readUdp:: ret=4, data=1 47 161 1
Thu 14-05-2020 17:04:29- loop:: readUdp available
Thu 14-05-2020 17:04:29- Dwn readUdp:: message ident=3
Thu 14-05-2020 17:04:29- Dwn PKT_PULL_RESP:: sendPacket: micros=595486920
Thu 14-05-2020 17:04:29- Dwn sendPacket:: {"txpk":{"imme":false,"tmst":595866936,"freq":868.099975,"rfch":0,"powe":10,"modu":"LORA","datr":"SF10BW125","codr":"4/5","ipol":true,"size":13,"data":"YPsM7VaBCgAGAWhZlg=="}}<
Thu 14-05-2020 17:04:29- sendPacket:: data=YPsM7VaBCgAGAWhZlg==
Thu 14-05-2020 17:04:29- loraPacket:: RX1: micros=595516147
Thu 14-05-2020 17:04:29- Dwn sendPacket:: TX tmst=595866936
T Payload=60:FB:C:ED:56:81:A:0:6:1:68:59:96:
Thu 14-05-2020 17:04:29- sendPacket:: STRICT=1
Thu 14-05-2020 17:04:29- Dwn txLoraModem:: end: micr=595.867404, tmst=595.866936, wait=(468), SF=10, Freq=868100000, a=56:ed:0c:fb:
Thu 14-05-2020 17:04:29- Dwn PKT_PULL_RESP:: txLoraModem done: micr=595.868491, tmst=595.866936, wait=(1555), SF=10, Freq=868100000, a=56:ed:0c:fb:
Thu 14-05-2020 17:04:29- Dwn txLoraModem fini:: I= -- , F=0, SF=7, E=1, S=TX , eT=974481, dT=396640
Thu 14-05-2020 17:04:29- Dwn readUdp:: PKT_PULL_RESP from IP=MYSUBNET.5, micros=595890665, wait=399538
Thu 14-05-2020 17:04:29- UP readUdp:: PKT_TX_ACK: protocol version 1
Thu 14-05-2020 17:04:29- Dwn readUdp:: ret=179, data=1 86 110 3 116 120 112 107 0 105 109 109 101 0 116 109 115 116 0 102 114 101 113 0 114 102 99 104 0 112 111 119 101 0 109 111 100 117 0 76 79 82 65 0 100 97 116 114 0 83 70 49 48 66 87 49 50 53 0 99 111 100 114 0 52 47 53 0 105 112 111 108 0 115 105 122 101 0 100 97 116 97 0 89 80 115 77 55 86 97 66 67 103 65 71 65 87 104 90 108 103 61 61 0 49 48 66 87 49 50 53 34 44 34 99 111 100 114 34 58 34 52 47 53 34 44 34 105 112 111 108 34 58 116 114 117 101 44 34 115 105 122 101 34 58 49 51 44 34 100 97 116 97 34 58 34 89 80 115 77 55 86 97 66 67 103 65 71 65 87 104 90 108 103 61 61 34 125 125
Thu 14-05-2020 17:04:30- Dwns TXDONE:: OK: rcvd=596.156352, diff=0.289474
Thu 14-05-2020 17:04:30- TXDONE:: done OK
Thu 14-05-2020 17:04:42- SCAN:: I=CDDONE CDDETD , F=0, SF=7, E=0, S=RX , eT=13414520, dT=2241
Thu 14-05-2020 17:04:42- S_RX no INTR:: 0
Thu 14-05-2020 17:04:42- S_RX no INTR:: 0
Thu 14-05-2020 17:04:42- S_RX no INTR:: 0
Thu 14-05-2020 17:04:42- RXTOUT:: I=RXTOUT , F=0, SF=7, E=0, S=RX , eT=13423856, dT=11551
Thu 14-05-2020 17:04:47- sendUdp: WlanConnect connected to=MYSSID. Server IP=MYSUBNET.103
Thu 14-05-2020 17:04:47- M PKT_PULL_DATA request, len=12
1:F7:F:2:24:6F:28:FF:FF:B1:BF:84:
Thu 14-05-2020 17:04:47- UP ESP-sc-gway:: PKT_PULL_DATA message sent: micr=612.976953
Thu 14-05-2020 17:04:47- loop:: readUdp available
Thu 14-05-2020 17:04:47- Dwn readUdp:: message ident=4
Thu 14-05-2020 17:04:47- Dwn readUdp PKT_PULL_ACK: micr=612.993816, size=4 From MYSUBNET.5, port 1680
, data: 1:F7:F:4:
Thu 14-05-2020 17:04:47- Dwn readUdp:: ret=4, data=1 247 15 4
Thu 14-05-2020 17:05:00- REINIT:: 31 I= -- , F=0, SF=7, E=1, S=SCAN , eT=17632933, dT=2301
Thu 14-05-2020 17:05:07- sendUdp: WlanConnect connected to=MYSSID. Server IP=MYSUBNET.103
Thu 14-05-2020 17:05:07- M PKT_PULL_DATA request, len=12
1:D9:68:2:24:6F:28:FF:FF:B1:BF:84:
Thu 14-05-2020 17:05:07- UP ESP-sc-gway:: PKT_PULL_DATA message sent: micr=632.977030
Thu 14-05-2020 17:05:07- loop:: readUdp available
Thu 14-05-2020 17:05:07- Dwn readUdp:: message ident=4
Thu 14-05-2020 17:05:07- Dwn readUdp PKT_PULL_ACK: micr=632.993875, size=4 From MYSUBNET.5, port 1680
, data: 1:D9:68:4:
Thu 14-05-2020 17:05:07- Dwn readUdp:: ret=4, data=1 217 104 4
Thu 14-05-2020 17:05:11- SCAN:: I=CDDONE CDDETD , F=0, SF=7, E=0, S=RX , eT=28807010, dT=2370
Thu 14-05-2020 17:05:11- S_RX no INTR:: 0
Thu 14-05-2020 17:05:11- S_RX no INTR:: 0
Thu 14-05-2020 17:05:11- S_RX no INTR:: 0
Thu 14-05-2020 17:05:11- RXTOUT:: I=RXTOUT , F=0, SF=7, E=0, S=RX , eT=28816403, dT=11727
Thu 14-05-2020 17:05:20- UP ESP-sc-gway:: RST_DATA message sent: micr=645.993085
Thu 14-05-2020 17:05:23- SCAN:: I=CDDONE CDDETD , F=0, SF=7, E=0, S=RX , eT=12484708, dT=2283
Thu 14-05-2020 17:05:23- S_RX no INTR:: 0
Thu 14-05-2020 17:05:23- S_RX no INTR:: 0
Thu 14-05-2020 17:05:23- S_RX no INTR:: 0
Thu 14-05-2020 17:05:23- RXTOUT:: I=RXTOUT , F=0, SF=7, E=0, S=RX , eT=12494021, dT=11585
Thu 14-05-2020 17:05:27- sendUdp: WlanConnect connected to=MYSSID. Server IP=MYSUBNET.103
Thu 14-05-2020 17:05:27- M PKT_PULL_DATA request, len=12
1:F4:D9:2:24:6F:28:FF:FF:B1:BF:84:
Thu 14-05-2020 17:05:27- UP ESP-sc-gway:: PKT_PULL_DATA message sent: micr=652.976872
Thu 14-05-2020 17:05:27- loop:: readUdp available
Thu 14-05-2020 17:05:27- Dwn readUdp:: message ident=4
Thu 14-05-2020 17:05:27- Dwn readUdp PKT_PULL_ACK: micr=653.493085, size=4 From MYSUBNET.5, port 1680
, data: 1:F4:D9:4:
Thu 14-05-2020 17:05:27- Dwn readUdp:: ret=4, data=1 244 217 4
Thu 14-05-2020 17:05:28- M stat update: <224> {"stat":{"time":"2020-05-14 17:05:28 CET","lati":52.23736,"long":5.97865,"alti":14,"rxnb":4,"rxok":4,"rxfw":4,"ackr":0.0,"dwnb":0,"txnb":0,"pfrm":"ESP32","mail":"My e-mail","desc":"Mihies Gateway to Hell"}}
Thu 14-05-2020 17:05:28- sendUdp: WlanConnect connected to=MYSSID. Server IP=MYSUBNET.103
Thu 14-05-2020 17:05:28- Send Pushdata sendstat
Thu 14-05-2020 17:05:28- loop:: readUdp available
Thu 14-05-2020 17:05:28- Dwn readUdp:: message ident=1
Thu 14-05-2020 17:05:28- Dwn PKT_PUSH_ACK:: size=4, From MYSUBNET.5
Thu 14-05-2020 17:05:28- Dwn readUdp:: ret=4, data=1 60 168 1
Thu 14-05-2020 17:05:30- SCAN:: I=CDDONE CDDETD , F=0, SF=7, E=0, S=RX , eT=6700312, dT=2376
Thu 14-05-2020 17:05:30- S_RX no INTR:: 0
Thu 14-05-2020 17:05:30- S_RX no INTR:: 0
Thu 14-05-2020 17:05:30- S_RX no INTR:: 0
Thu 14-05-2020 17:05:30- S_RX no INTR:: 0
Thu 14-05-2020 17:05:30- RXTOUT:: I=RXTOUT , F=0, SF=7, E=0, S=RX , eT=6713261, dT=15290
Thu 14-05-2020 17:05:47- sendUdp: WlanConnect connected to=MYSSID. Server IP=MYSUBNET.103
Thu 14-05-2020 17:05:47- M PKT_PULL_DATA request, len=12
1:35:E5:2:24:6F:28:FF:FF:B1:BF:84:
Thu 14-05-2020 17:05:47- UP ESP-sc-gway:: PKT_PULL_DATA message sent: micr=672.976849
Thu 14-05-2020 17:05:47- loop:: readUdp available
Thu 14-05-2020 17:05:47- Dwn readUdp:: message ident=4
Thu 14-05-2020 17:05:47- Dwn readUdp PKT_PULL_ACK: micr=672.993680, size=4 From MYSUBNET.5, port 1680
, data: 1:35:E5:4:
Thu 14-05-2020 17:05:47- Dwn readUdp:: ret=4, data=1 53 229 4
Thu 14-05-2020 17:05:49- SCAN:: I=CDDONE CDDETD , F=0, SF=7, E=0, S=RX , eT=18823241, dT=2351
Thu 14-05-2020 17:05:49- S_RX no INTR:: 0
Thu 14-05-2020 17:05:49- S_RX no INTR:: 0
Thu 14-05-2020 17:05:49- S_RX no INTR:: 0
Thu 14-05-2020 17:05:49- RXTOUT:: I=RXTOUT , F=0, SF=7, E=0, S=RX , eT=18832644, dT=11718

Error base64 platformIO

Hello!

The following error is occurring in my build:

'base64' has not been declared
_base64Authorization = base64 :: encode (auth, false / * doNewLines * /);

I tested it with include <Base64.h> and include <gBase64.h>
I installed the library base64.
None worked. Same mistake in both.

Why not Platformio?

Hi! Arduino IDE is really outdated environment. One of it's problems is dependency management - you need to copy them manually. It's not possible to reliably update and set versions.

Platformio does have library management and env setup is only click compile. It will download all necessary and needed versions of libs and arduino framework.

Also, with platformio its easy to integrate CI service (like Travis CI or Github Actions) to automate code checks (linters, build checks and so on) as well as automatic releases.

For example, marlin 2.0 firmware migrated to platformio, so its not something "special".

Is there are any plans to migrate the development to platformio?

View device keys

Hello!

I'm trying to get the keys for the devices, like nwkKey, appKey and ID.
I saw that in the configNode.h file there is a struct with these values, but I couldn't get them.

Can you help me?

a lot of uplinks missed

First of all, I want to thank the creators of this repository. Such a useful code!
I've been missing a lot of uplinks. Last week I made my first test outside, but i received a lot of messages like this one:
"Thu 11-08-2020 17:04:42- SCAN:: I=CDDONE CDDETD , F=0, SF=7, E=0, S=RX , eT=13414520, dT=2241""
instead of the UP RXPK.

It works, but I've been missing a lot of packages... is there something I can do?

Save settings issues

Hello Maarten,

Spotted couple issues with V.6.2.5.EU868; PlatformIO 200524i:

  1. Cannot save settings, always revert to defaults - to me in _loraFiles.ino readConfig should have initConfig(c); outside the loop, to run only once before while loop
  2. when changing SF from web gui, SF not saved in file - writeGwayCfg(_CONFIGFILE, &gwayConfig ); missing in _wwwserver.ino file server.on("/SF=xxxx +1 and -1

Best regards,
Reggie

Overcoming payload length limitation of 155 bytes

Dear Mr. Westenberg,

First of all, I would like to thank you for creating the ESP-1ch-Gateway. I made extensive use of it and it is really valuable to me.
A problem I came across is that there seems to be a limitation with regard to the payload length. My end device sends 228 bytes long payload that doesn't get through the unmodified ESP-1ch-Gateway software. It seems that it only allows for up to 155 bytes long payloads.
I experimented with various modifications to the software and ended up with the following:

_txRx.ino
char b64[384]; // originally 256

loraModem.h
#define PAYLOAD_LENGTH 0xFF // originally 0x40
#define MAX_PAYLOAD_LENGTH 0xFF // originally 0x80

uint8_t payLoad[256];  // originally 128						

struct LoraUp {
	uint8_t		payLoad[256];   // originally 128

configGway.h
#define _SPIFFS_FORMAT 1
#define _SPREADING SF7
#define _CAD 0
#define A_SERVER 0
#define A_MAXBUFSIZE 256 // originally 192
#define A_OTA 0
#define _STAT_LOG 0
#define _LOCALSERVER 0
#define _TRUSTED_NODES 0
#define _TRUSTED_DECODE 0

Basically, I have increased various arrays which I thought might be too small. Additionally, I tried to turn off just everything that is not essential to the uplink operation. I didn't test the downlink operation, however. With these modifications the 228 byte long end-device payload somehow gets through.
Although the modifications seem to work, I am well aware that my insight into the internal workings of the software is insufficient. It would be most welcome and appreciated if somebody could do that in a qualified manner in order to properly extend the functionality and overcome the limitations of the software.
I'm not sure if that's an issue, but I came across currentAddr > 64 and payLength>=128 in the _loraModem.ino that might also need some attention.

Best regards,

Radovan

wmbus

can fsk 868.95 be received with your gateway ... european wmbus

Getting errror with latest v6.2.x

User exception (panic/abort/assert)
Abort called

>>>stack>>>

ctx: cont
sp: 3ffffe60 end: 3fffffc0 offset: 0000
3ffffe60:  3ffe9882 3fff229c 3fff2066 40202b54  
3ffffe70:  000000fe 00000000 00000000 00000000  
3ffffe80:  00000000 00000000 00000000 3fff1a60  
3ffffe90:  00000000 00000000 00000032 3ffe942b  
3ffffea0:  000000ff 3ffffef0 3fff2b20 40217d2a  
3ffffeb0:  40218435 00000032 3ffe942b 40217d40  
3ffffec0:  000000ff 3ffffef0 3fff2b20 40203bf1  
3ffffed0:  00000000 3ffffef0 80fe9615 402165a6  
3ffffee0:  000000ff 3ffe85a3 3fff2b20 40203d2a  
3ffffef0:  40218400 00000064 80fe942b 4021842a  
3fffff00:  3ffe9297 3ffe85a3 3fff240c 4020d0d3  
3fffff10:  0000007d 000000b7 feefeffe feefeffe  
3fffff20:  633a3836 61333a36 3a30653a 623a6437  
3fffff30:  fe000037 38707365 2d363632 64373065  
3fffff40:  3fff3600 000d000f 80efeffe 40226c48  
3fffff50:  cb4ca934 8000003d 3fff3600 003d003f  
3fffff60:  80efeffe 40002e00 1a19010a 80efeffe  
3fffff70:  5e43eb19 feefeffe feefeffe feefeffe  
3fffff80:  3fff28e8 feefeffe feefeffe feefeffe  
3fffff90:  feefeffe feefeffe feefeffe 3fff2c50  
3fffffa0:  3fffdad0 00000000 3fff2c10 402178c4  
3fffffb0:  feefeffe feefeffe 3ffe8d28 401012dd  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3456, room 16 
tail 0
chksum 0x84
csum 0x84
v11ae243e
~ld

ESP Exception decoder:


Decoding stack results
0x40202b54: setFreq(unsigned int) at C:\Users\Rajendra\Documents\Arduino\sumeet\ESP-1ch-Gateway-v6.0\ESP-sc-gway/_loraModem.ino line 262
0x40217d2a: Twi::writeTo(unsigned char, unsigned char*, unsigned int, unsigned char) at C:\Users\Rajendra\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_si2c.cpp line 328
0x40218435: __attachInterruptFunctionalArg(uint8_t, voidFuncPtrArg, void*, int, bool) at C:\Users\Rajendra\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_wiring_digital.cpp line 182
0x40217d40: Twi::writeTo(unsigned char, unsigned char*, unsigned int, unsigned char) at C:\Users\Rajendra\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_si2c.cpp line 45
0x40203bf1: receivePkt(unsigned char*) at C:\Users\Rajendra\Documents\Arduino\sumeet\ESP-1ch-Gateway-v6.0\ESP-sc-gway/_loraModem.ino line 583
0x402165a6: String::concat(char const*, unsigned int) at C:\Users\Rajendra\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\WString.cpp line 332
0x40203d2a: SerialStat(unsigned char) at C:\Users\Rajendra\Documents\Arduino\sumeet\ESP-1ch-Gateway-v6.0\ESP-sc-gway/_utils.ino line 294
0x40218400: __attachInterruptFunctionalArg(uint8_t, voidFuncPtrArg, void*, int, bool) at C:\Users\Rajendra\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_wiring_digital.cpp line 194
0x4021842a: __attachInterruptFunctionalArg(uint8_t, voidFuncPtrArg, void*, int, bool) at C:\Users\Rajendra\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_wiring_digital.cpp line 181
0x4020d0d3: wwwFile(String) at C:\Users\Rajendra\Documents\Arduino\sumeet\ESP-1ch-Gateway-v6.0\ESP-sc-gway/_wwwServer.ino line 150
0x402178c4: __wrap_system_restart_local() at C:\Users\Rajendra\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_postmortem.cpp line 201

reboot in loop after two weeks

Hi there
i've tested this gw, for about two weeks but last day is not working i'was in loop reboot,
i've try to re-upload the code but is the same, reboot and not woking,
another sketch es ttnmapper is working ...
below the error mesage:

readConfig:: Starting
00:20:00.342 -> .SSID= ******
00:20:00.375 -> .PASS= *****
00:20:00.375 -> .CH= 0
00:20:00.375 -> .SF= 7
00:20:00.375 -> .FCNT= 0
00:20:00.375 -> .DEBUG= 1
00:20:00.375 -> .PDEBUG= 64
00:20:00.375 -> .CAD= 1
00:20:00.375 -> .HOP= 0
00:20:00.375 -> .NODE= 0
00:20:00.375 -> .BOOTS= 2
00:20:00.375 -> .RESETS= 0
00:20:00.375 -> .WIFIS= 30
00:20:00.375 -> .VIEWS= 41
00:20:00.375 -> .REFR= 1
00:20:00.375 -> .REENTS= 0
00:20:00.375 -> .NTPETIM= 1579007021
00:20:00.375 -> .NTPERR= 10
00:20:00.375 -> .NTPS= 57
00:20:00.375 -> .FILEREC= 25
00:20:00.375 -> .FILENO= 1
00:20:00.375 -> .FILENUM= 1
00:20:00.375 -> .DELAY= 0
00:20:00.375 -> .TRUSTED= 1
00:20:00.375 -> .EXPERT= 0
00:20:00.375 -> .SEEN= 1
00:20:00.375 -> .MONITOR= 0
00:20:00.375 -> readConfig:: Fini
00:20:00.375 ->
00:20:01.169 -> assertion "offset == dataSize" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/nvs_flash/src/nvs_storage.cpp", line 438, function: esp_err_t nvs::Storage::readMultiPageBlob(uint8_t, const char*, void*, size_t)
00:20:01.202 -> abort() was called at PC 0x40127e6f on core 0
00:20:01.202 ->
00:20:01.202 -> Backtrace: 0x4008cc2c:0x3ffaf8b0 0x4008ce5d:0x3ffaf8d0 0x40127e6f:0x3ffaf8f0 0x40108a31:0x3ffaf920 0x40108a9c:0x3ffaf9a0 0x40107b62:0x3ffafa00 0x40108099:0x3ffafa40 0x40117bf7:0x3ffafa60 0x40117dcf:0x3ffafab0 0x40115e16:0x3ffafad0 0x40112a86:0x3ffafaf0 0x4008fd7b:0x3ffafb10 0x40089341:0x3ffafb50
00:20:01.259 ->
00:20:01.259 -> Rebooting...
thanks in advantage
Simone.

Gateway Reboots after Downlink attempt

Hi,
Sincere compliments and kudos for the good work. I have been using gateway since version "V.5.3.3.H; 180825a", now upgraded at "V.6.2.3.E.EU868; PlatformIO 200223a"
The issue arose in V.5.3.3 whenever I sent a message. I realized that payLength was zero. I was running into the issue on V.5.3.3 which I fixed locally by adding the following in _loraModem.ino line 780

 if (payLength>0)
 {
	sendPkt(payLoad, payLength);
 }

The error in this version is as follows:

Stack smashing protect failure!

abort() was called at PC 0x400f3960 on core 1

Backtrace: 0x4008cc2c:0x3ffb18c0 0x4008ce5d:0x3ffb18e0 0x400f3960:0x3ffb1900 0x400d6cde:0x3ffb1920 0x400d71e5:0x3ffb1980 0x400e042a:0x3ffb19f0 0x400e2ca3:0x3ffb1f60 0x400ef4c5:0x3ffb1fb0 0x40089341:0x3ffb1fd0

That translates to :
Decoding stack results
0x4008cc2c: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 155
0x4008ce5d: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 170
0x400f3964: __stack_chk_fail at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/stack_check.c line 36
0x400d6cde: printDwn(LoraDown*, String&) at C:\Users\KJ\Documents\Arduino\ESP-1ch-Gateway-master_v6\ESP-sc-gway/_utils.ino line 94
0x400d71e9: txLoraModem(LoraDown*) at .../_loraModem.ino line 801
0x400e042e: readUdp(int) at .../_udpSemtech.ino line 342
0x400e2ca7: loop() at .../ESP-sc-gway.ino line 690
0x400ef4c9: loopTask(void*) at ...\main.cpp line 19
0x40089341: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

I tried the same approach and tried fixing it as
if (LoraDown->size>0)
But I still see the reboot issue. For now reverting back to V5.3.3

Webinterface not working?

Hi,

I compiled the software with platformio and the gateway is working perfect.
Only problem what i have is that i cannot reach the webinterface??

nc -vv IP 80 is connecting, so a TCP socket is working but through the browser nothing/nada.

I build the Gateway_21 with a Wemos D1.

Support for sim800l

Hi, thank you for this great tool, It would be great if we can be able to use a gprs/3g/4g module with this gateway

ESP-1ch-Gateway not yet working with TTGO T-Beam V1.0

Hi Maarten,
as already discussed I have a TTGO T-Beam V1.0 which needs a different setup, especially when it comes to the Power Management IC AXP192:

T-Beam version V1.0 official Pinout schema (according gto http://www.lilygo.cn/claprod_view.aspx?TypeId=62&Id=1224&FId=t28:62:28):
image

Pins T_BEAM(AXP192) T_BEAM_V07
LORA_SCK 5 5
LORA_MISO 19 19
LORA_MOSI 27 27
LORA_SS 18 18
LORA_DI0 26 26
LORA_RST 23 23
GPS_RX_PIN 34 12
GPS_TX_PIN 12 15
I2C_SDA 21 21
I2C_SCL 22 22
PMU_IRQ 35 N/A
USER BUTTON 38 39
GPS_PPS 37 N/A
Modules T_BEAM_V10 T_BEAM_V07
GPS LDO3 No support
LORA LDO2 No support
OLED DCDC1 No support

A sample of that code can be found here:
https://github.com/lewisxhe/TTGO-T-Beam/blob/master/TTGO-T-Beam.ino

Best
--Wolfgang

Heltech ESP32 error just after the NTP

I hae just tried to set this up on one of my Heltec ESP32 modules. for some reason the first issue is with the NTP server name. I tried the default one and used the NZ NTP server name however neither seemed to work.

The next issue seems to be just after that where the system errors out and reboots.

Any sugestions as to how to track this down?

`A WlanStatus:: CONNECTED to SPARK-XT6HVY
Host esp32-65e438 WiFi Connected to SPARK-XT6HVY on IP=192.168.1.78
Local UDP port=1700
Connection successful
Gateway ID: D8A01DFFFF65E438, Listening at SF9 on 868.10 MHz.
Setup:: ERROR hostByName NTP
abort() was called at PC 0x400dc802 on core 1

Backtrace: 0x4008cc20:0x3ffb1ed0 0x4008ce51:0x3ffb1ef0 0x400dc802:0x3ffb1f10 0x400de5d1:0x3ffb1f30 0x400e9cdf:0x3ffb1fb0 0x40088ba1:0x3ffb1fd0

`

permanent setting to listen on specific channel

Hi All,

Where can I set in the code, that the gateway listens on specific chanel instead on channel 0. I managed to set on the WEB GUI but since i have SPIFFS format 1 on every boot i have to change the channel.

Tried to set #define EU863_870 1 to

> #define EU863_870 2

no effect, the gw reports it's still listening on 868.100MHz

Tried to change the first value in freq plan

{ 868100000, 125, 7, 12, 868300000, 125, 7, 12}, // Channel 0, 868.1 MHz/125 primary

no effect neither,

Thanks in advance.

Error with ESP32 and WIFIMANAGER=1

Hi!
Wenn compiling the V6.0 sketch on a TTGO ESP32 Lora board with:

#define _WIFIMANAGER 1

I get the following error, when WIFIMANAGER=0, the sketch can be compiled without errors (Tnx for te sketch!):

ESP-1ch-Gateway-v6.0/libraries/WiFiManager/WiFiManager.h:22:30: fatal error: user_interface.h: No such file or directory

I guess the lib is only for ESP8266? Is there a solution for an ESP32?

How to add support for IN865-867

I want to use it for India and need to add 865Mhz support.
How can I achieve it with this version.

IN865-867
Uplink:

865.0625 - SF7BW125 to SF12BW125
865.4025 - SF7BW125 to SF12BW125
865.9850 - SF7BW125 to SF12BW125
Downlink:

Uplink channels 1-3 (RX1)
866.550 - SF10BW125 (RX2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.