You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Farm-Data-Relay-System/FDRS_Gateway2000/README.md

30 lines
1.3 KiB
Markdown

3 years ago
# Gateway 2.000
3 years ago
This is the FDRS Multiprotocol Gateway sketch. The device listens for packets over ESP-NOW, UART, LoRa, and/or MQTT, then retransmits the packets over these interfaces using rules defined in the configuration file.
3 years ago
3 years ago
The most commonly used configuration tells the device to take any ESP-NOW packet it receives and output the data over the serial port (UART):
3 years ago
```
3 years ago
#define UNIT_MAC 0x00
3 years ago
#define ESPNOWG_ACT sendSerial();
```
The companion for this device, connected via serial, takes any data it receives from the serial port and sends it via MQTT:
```
#define USE_WIFI
#define SERIAL_ACT sendMQTT();
```
Splitting the gateway into two devices allows you to use ESP-NOW and WiFi simultaneously without channel conflicts. You can also connect the first device to a computer with a USB-UART adapter and get the data that way, eliminating WiFi altogether.
3 years ago
If you have sensors that are out of range of your first gateway, you can use a gateway as a repeater. First set the UNIT_MAC to 0x01, then send general ESP-NOW traffic to the address of the first gateway:
3 years ago
```
3 years ago
#define UNIT_MAC 0x01
3 years ago
#define ESPNOWG_ACT sendESPNOW(0x00);
3 years ago
```
3 years ago
![Basic](/FDRS_Gateway2000/Basic_Setup.png)
![Basic](/FDRS_Gateway2000/Basic_LoRa_Setup.png)
![Basic](/FDRS_Gateway2000/Advanced_Setup_LoRa.png)