I have a board that already has an ESP32-S3-Wroom module and the RF95 lora board. However, I am doing something wrong with building the firmware…
Here is the URL to the schematics: https://raw.githubusercontent.com/Makerfabs/SenseLora-4G-Gateway/refs/heads/main/hardware/SenseLora%204G%20Gateway.png
Here is the URL to working Arduino code: SenseLora-4G-Gateway/example/Send_lora_data_to_datacake/Send_lora_data_to_datacake.ino at main · Makerfabs/SenseLora-4G-Gateway · GitHub
So I know the pins that I need to use. However, after I flash the device, the console log is just full of the following. I am able to see the device in the Android meshtastic app, but I can’t connect to it. If I have the app open, the following keep repeating. If I close the app, the log stops.
start advertising
*** App connected
55:63:36:8c:ef:ff
main loop started
*** App disconnected
start advertising
*** App connected
4a:66:b8:b8:b7:27
main loop started
*** App disconnected
start advertising
*** App connected
74:8c:c6:73:2c:c3
main loop started
*** App disconnected
Here is my platformio.ini file:
[env:private_hw]
extends = esp32_base
board = esp32doit-devkit-v1
build_flags =
${esp32_base.build_flags}
-D PRIVATE_HW
-faligned-new
-std=c++17 ; Ensure C++17 standard
-I variants/private_hw
Here is my variant.h file:
#ifndef PRIVATE_HW_VARIANT_H
#define PRIVATE_HW_VARIANT_H
// LoRa (SX1276/RF95) Pin Definitions
#define LORA_MOSI 11 // SPI MOSI for LoRa
#define LORA_MISO 13 // SPI MISO for LoRa
#define LORA_SCK 12 // SPI Clock for LoRa
#define LORA_CS 4 // LoRa Chip Select
#define LORA_RST 5 // LoRa Reset
#define LORA_DIO0 6 // LoRa DIO0
#define LORA_DIO1 7 // LoRa DIO1
// Additional parameters for LoRa radio module
#define FREQUENCY 868 // LoRa frequency in MHz
#define BANDWIDTH 125.0 // LoRa bandwidth in kHz
#define SPREADING_FACTOR 12 // LoRa spreading factor
#define CODING_RATE 6 // LoRa coding rate
#define OUTPUT_POWER 20 // LoRa output power in dBm
#define PREAMBLE_LEN 8 // LoRa preamble length
#define GAIN 0 // LoRa gain
#define LORA_RESET LORA_RST // Alias LORA_RESET to LORA_RST
// Use the RF95 module for LoRa
#define USE_RF95
// Other optional components for power, buttons, or sensors could go here
#endif // PRIVATE_HW_VARIANT_H
Can anyone help me identify what I might be doing wrong?