The actual allowed values may vary by chip. Check the datasheet and/or RadioLib documentation.
#
#### ```#define LORA_FREQUENCY n```
#### `#define LORA_FREQUENCY n`
LoRa frequency in MHz. Allowed values range from 137.0 MHz to 1020.0 MHz.
#### ```#define LORA_SF n```
#### `#define LORA_SF n`
LoRa spreading factor. Allowed values range from 6 to 12.
#### ```#define LORA_BANDWIDTH n```
#### `#define LORA_BANDWIDTH n`
LoRa bandwidth in kHz. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz.
#### ```#define LORA_CR n```
#### `#define LORA_CR n`
LoRa coding rate denominator. Allowed values range from 5 to 8.
#### ```#define LORA_SYNCWORD n```
#### `#define LORA_SYNCWORD n`
LoRa sync word. Can be used to distinguish different networks. Note that 0x34 is reserved for LoRaWAN.
#### ```#define LORA_INTERVAL n```
#### `#define LORA_INTERVAL n`
Interval between LoRa buffer releases. Must be longer than transmission time-on-air.
## WiFi and MQTT Configuration
WiFi and MQTT parameters are generally configured in the 'src/fdrs_globals.h' file. Be sure to use the correct topic when sending MQTT commands. The following values may be set in the gateway configuration file if the user wishes to override the global value:
#### ```#define WIFI_SSID "cccc"``` and ``` WIFI_PASS "cccc" ```
#### `#define WIFI_SSID "cccc"` and ` WIFI_PASS "cccc" `
WiFi credentials
#### ```#define MQTT_ADDR "n.n.n.n"``` or ```MQTT_ADDR "cccc"```
#### `#define MQTT_ADDR "n.n.n.n"` or `MQTT_ADDR "cccc"`
The address of the MQTT server, either the IP address or domain name.
#### ```#define MQTT_PORT n ```
#### `#define MQTT_PORT n `
The port of the MQTT server.
#### ```#define MQTT_AUTH ```
#### `#define MQTT_AUTH `
Enable this if using MQTT authentication
#### ```#define MQTT_USER "cccc"``` and ```MQTT_PASS "cccc"```
#### `#define MQTT_USER "cccc"` and `MQTT_PASS "cccc"`
#
### SSD1306 OLED Display
Built on the [ThingPulse OLED SSD1306 Library](https://github.com/ThingPulse/esp8266-oled-ssd1306)
#### ```#define OLED_HEADER "cccc"```
#### `#define OLED_HEADER "cccc"`
The message to be displayed at the top of the screen.
#### ```#define OLED_SDA n``` and ```OLED_SCL n```
#### `#define OLED_SDA n` and `OLED_SCL n`
OLED I²C pins.
#### ```#define OLED_RST n```
#### `#define OLED_RST n`
OLED reset pin. Use '-1' if not present or known.
#
### Miscellaneous
#### ```#define FDRS_DEBUG```
#### `#define FDRS_DEBUG`
Enables debugging messages to be sent over the serial port and OLED display.
#### ```#define RXD2 (pin)``` and ```TXD2 (pin)```
#### `#define DBG_LEVEL n`
Sets the level of verbosity in debug messages. '0' (default) shows only the most important system messages, '1' will show additional debug messages for troubleshooting, and '2' will show all messages, including those used in development. Much gratitude to [Jeff Lehman](https://github.com/aviateur17) for this feature!
#### `#define RXD2 (pin)` and `TXD2 (pin)`
Configures a second, data-only UART interface on ESP32. The ESP8266 serial interface is not configurable, and thus these options don't apply.
#### ```#define USE_LR```
#### `#define USE_LR`
Enables ESP-NOW Long-Range mode. Requires ESP32.
## User-Defined Functions
This feature allows the user to send data from the gateway itself. For example: the battery level or ambient temperature at the gateway.
Calling ```scheduleFDRS(function, interval);``` after initializing FDRS will schedule ```function()``` to be called every ```interval``` milliseconds.
Calling `scheduleFDRS(function, interval);` after initializing FDRS will schedule `function()` to be called every `interval` milliseconds.
Within this function, the user may utilize the same ```loadFDRS()``` and ```sendFDRS()``` commands used by sensors. After the data is sent, it triggers ```INTERNAL_ACT``` where it can be routed to the front-end.
Within this function, the user may utilize the same `loadFDRS()` and `sendFDRS()` commands used by sensors. After the data is sent, it triggers `INTERNAL_ACT` where it can be routed to the front-end.