UART Lilygo to D1 Mini (RX-TX) #97
-
Hi folks, I'm trying to send data received from a Lora sensor on a Lilygo/TTGO ESP32 Lora module to a D1 Mini module through serial (UART). Both modules can be seen below. I've connected the Lora TXD port to the RX port on the D1, but when I do so, the Lora module stops sending data. When the wire is removed, it starts sending data. I have #define FDRS_DEBUG enabled. Here's how I have the UART_Gateway setup: #include <fdrs_globals.h> #define UNIT_MAC 0x04 // The address of this gateway // Actions -- Define what happens when a packet arrives at each interface: #define ESPNOWG_ACT #define USE_LORA // Peer addresses // Peer Actions //Pins for UART data interface (ESP32 only) // SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32 #define SPI_SCK 5 // LoRa Configuration -- Needed only if using LoRa //433E6 for Asia // Buffer Delays - in milliseconds - Uncomment to enable any buffer //#define ESPNOW1_DELAY 0 // FastLED -- Not yet fully implemented // WiFi and MQTT Credentials -- Needed for MQTT only if "fdrs_globals.h" is not included //#define MQTT_AUTH //Enable MQTT authentication // MQTT Topics |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
When you say it stops sending data are you talking about serial data or LoRa data? How do you know it stops sending data? What shows you that? Do you have a ground wire connected between the two modules? What difference does making a ground connection between both modules make? |
Beta Was this translation helpful? Give feedback.
-
Any difference if you connect another wire between Rx on the LoRa board and TX on the MQTT board? If you power down the MQTT board even when the TX -> RX wire is present I assume that the Incoming LoRa and Sending serial messages come back? Seems like LoRa packets are not being received when you have the TX -> RX wire connected. What does the startup of the LoRa board look like when the MQTT board is already powered up and you then power up the LoRa board? What messages do you see on startup? |
Beta Was this translation helpful? Give feedback.
-
I think you're using the wrong Tx pin for data. Your config defines pin 15 as the Tx for data, so try switching to that for starters. On ESP8266 the serial port is singular and has fixed pins, but on ESP32 we can define a second serial port on which to send the data. |
Beta Was this translation helpful? Give feedback.
I think you're using the wrong Tx pin for data. Your config defines pin 15 as the Tx for data, so try switching to that for starters.
On ESP8266 the serial port is singular and has fixed pins, but on ESP32 we can define a second serial port on which to send the data.