Troubleshooting

meshtastic on DFRobot LoraWan ESP32-S3 not working

userHead Silver.Nodashi 2026-03-15 22:59:35 171 Views2 Replies

Has anyone successfully setup meshtastic on the DFRobot LoraWAN ESP32-S3 (https://wiki.dfrobot.com/dfr1195/)? 

 

I flashed the firmware from the Wiki, using the online Meshtastic flasher, but when I try and connect to the Meshtastic device using the Android Meshtastic App, nothing happens. I can see the device in under bluetooh devices, then I click on and then Pair, but then nothing happens. 

 

When I connect to the serial port, using https://client.meshtastic.org, it just loads and loads and loads. 

 

The LCD screen also doesn't show anything. 

 

 

 

 

2026-03-21 00:15:41

Hey Silver,

I'm a user having the same experience. 
I went on a trip investigating the screen. I still didn't fix it but I'll throw out what I found so far.
 

I made some micropython drivers for the screen and LoRa just to debug it. I was able to get both working in micropython as standalone tests.
I've been building the meshtastic firmware from https://github.com/meshtastic/firmware

It's my first experience with DFRobot and meshtastic so I am not the reference we need.

I was sucessful in making a .bin for LoRa but not the screen. The .bin that dfr offered for meshtastic backlights my screen but nothing else. Mine I can't get to backlight. I was having build issues with the screen drivers and defines. I will offer up my config files but I hope dfRobot provides these with working screen, that way we can add buzzers, accelerometers etc.

 

We really need these config files files from DFRobot or get lucky and stumble upon how to configure it. Having this firmware only accessible from DFRobot is also not great as we want to be able to update and configure our boards how we like.

 

I was following the platformIO meshtastic build instrunctions: https://meshtastic.org/docs/development/firmware/build/
on the local PC I added a dfr1195 folder to the variants/esp32s3 folder https://github.com/meshtastic/firmware/tree/develop/variants/esp32s3

Then I add these files, build and upload
*** Warning not official config files - I hope these will be superseded - there is probably wrong stuff in here - but it fundamentally “works” but not the screen ***

 

pins_arduino.h
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "soc/soc_caps.h"
#include <stdint.h>

#define DISPLAY_HEIGHT 80
#define DISPLAY_WIDTH 160

#define USB_VID 0x303a
#define USB_PID 0x1001

// UART pins
static const uint8_t TX = 43;
static const uint8_t RX = 44;

// I2C pins
static const uint8_t SDA = 8;
static const uint8_t SCL = 9;

// Default SPI (SPI2 for LoRa radio)
static const uint8_t SS = 10;      // LORA_CS
static const uint8_t MOSI = 6;     // LORA_MOSI
static const uint8_t MISO = 5;     // LORA_MISO
static const uint8_t SCK = 7;      // LORA_SCK

// Analog pins
static const uint8_t A0 = 1;
static const uint8_t A1 = 2;
static const uint8_t A2 = 3;
static const uint8_t A3 = 4;
static const uint8_t A4 = 5;
static const uint8_t A5 = 6;
static const uint8_t A6 = 7;
static const uint8_t A7 = 8;
static const uint8_t A8 = 9;
static const uint8_t A9 = 10;
static const uint8_t A10 = 11;
static const uint8_t A11 = 12;
static const uint8_t A12 = 13;
static const uint8_t A13 = 14;
static const uint8_t A14 = 15;
static const uint8_t A15 = 16;
static const uint8_t A16 = 17;
static const uint8_t A17 = 18;
static const uint8_t A18 = 19;
static const uint8_t A19 = 20;

// Touch pins
static const uint8_t T1 = 1;
static const uint8_t T2 = 2;
static const uint8_t T3 = 3;
static const uint8_t T4 = 4;
static const uint8_t T5 = 5;
static const uint8_t T6 = 6;
static const uint8_t T7 = 7;
static const uint8_t T8 = 8;
static const uint8_t T9 = 9;
static const uint8_t T10 = 10;
static const uint8_t T11 = 11;
static const uint8_t T12 = 12;
static const uint8_t T13 = 13;
static const uint8_t T14 = 14;

static const uint8_t Vext = 48;
static const uint8_t LED = 21;
static const uint8_t RST_OLED = 15;
static const uint8_t SCL_OLED = 13;
static const uint8_t SDA_OLED = 11;

static const uint8_t RST_LoRa = 41;
static const uint8_t BUSY_LoRa = 40;
static const uint8_t DIO0 = 4;

#endif /* Pins_Arduino_h */

platformio.ini
[env:dfr1195]
board_level = extra
extends = esp32s3_base
board = ESP32-S3-WROOM-1-N4
upload_protocol = esptool
upload_speed = 921600
lib_deps =
 ${esp32s3_base.lib_deps}
build_flags = 
 ${esp32s3_base.build_flags}
 -D PRIVATE_HW
 -I variants/esp32s3/dfr1195
build_unflags =
 ${esp32s3_base.build_unflags}
 -DARDUINO_USB_MODE=1
 

variant.h

#define I2C_SDA 8
#define I2C_SCL 9

// DFR1195: DFRobot LoRaWAN board with ST7735 80x160 display and SX1262 radio
//#define ST7735S 1 // there are different (sub-)versions of ST7735
//#define ST7735_CS 17      // LCD_CS
//#define ST7735_RS 14      // LCD_DC
//#define ST7735_SDA 11     // LCD_MO (LovyanGFX calls MOSI "SDA")
//#define ST7735_SCK 12     // LCD_SCK
//#define ST7735_RESET 15   // LCD_RST
//#define ST7735_MISO 13
//#define ST7735_BUSY -1
//#define TFT_BL 16         // LCD_BL
//#define ST7735_SPI_HOST SPI2_HOST
//#define SPI_FREQUENCY 40000000
//#define SPI_READ_FREQUENCY 16000000
//#define SCREEN_ROTATE
//#define TFT_HEIGHT DISPLAY_WIDTH
//#define TFT_WIDTH DISPLAY_HEIGHT
//#define TFT_OFFSET_X 24
//#define TFT_OFFSET_Y 0
//#define TFT_INVERT false
//#define SCREEN_TRANSITION_FRAMERATE 3 // fps
//#define DISPLAY_FORCE_SMALL_FONTS
//#define USE_TFTDISPLAY 1

#define VEXT_ENABLE 48 // display
#define VEXT_ON_VALUE HIGH

// LoRa SPI2 pins (shared with display)
#define LORA_MOSI 6
#define LORA_MISO 5
#define LORA_SCK 7

// LoRa Radio (SX1262 via SPI2)
#define USE_SX1262

// SX1262 pins (from test code)
#define LORA_CS 10        // Chip select (from test code)
#define LORA_RESET 41     // Reset pin (from test code)
#define LORA_DIO1 4       // IRQ pin (from test code)
#define LORA_DIO2 40      // GPIO/BUSY pin (from test code)
#define LORA_RXEN 42

#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_DIO2
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 3.3

#define UART_TX 43
#define UART_RX 44

// GPS not present by default
#define GPS_DEFAULT_NOT_PRESENT 1

// Button
#define BUTTON_PIN 0
#define BUTTON_PIN2 18

#define LED_POWER 21
//#define PIN_LED 21

// Power management
#define BATTERY_PIN 1
#define ADC_CHANNEL ADC1_CHANNEL_0
 


The issue(build time linker error) comes when I uncomment the screen info in variant.h and the screen driver “LovyanGFX” to lib_deps

lib_deps =

  ${esp32s3_base.lib_deps}

  lovyan03/[email protected]

userHeadPic Albert.James
Albert.James wrote:

I was able to get LoRa and the screen working with the following (interested if it works for others too):

pins_arduino.h
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#include <variant.h>


#define USB_VID 0x303a
#define USB_PID 0x1001

// Serial
static const uint8_t TX = UART_TX;
static const uint8_t RX = UART_RX;

// Default SPI will be mapped to Radio
static const uint8_t SS = LORA_CS;
static const uint8_t SCK = LORA_SCK;
static const uint8_t MOSI = LORA_MOSI;
static const uint8_t MISO = LORA_MISO;

// The default Wire will be mapped to PMU and RTC
static const uint8_t SCL = I2C_SCL;
static const uint8_t SDA = I2C_SDA;

#endif /* Pins_Arduino_h */

platformio.ini
[env:dfr1195-diy]
extends = esp32s3_base
; board assumes the lowest spec WROOM module: 4 MB (Quad SPI) Flash, No PSRAM
board = ESP32-S3-WROOM-1-N4
board_level = extra
lib_deps =
 ${esp32s3_base.lib_deps}
 lovyan03/[email protected]
build_flags =
 ${esp32s3_base.build_flags}
 -D PRIVATE_HW
 -I variants/esp32s3/diy/dfr1195-diy
 -fno-lto
build_unflags =
 ${esp32s3_base.build_unflags}
 -flto

variant.h
#define ST7735S 1 // there are different (sub-)versions of ST7735
#define ST7735_CS 17      // LCD_CS
#define ST7735_RS 14      // LCD_DC
#define ST7735_SDA 11     // LCD_MO
#define ST7735_SCK 12     // LCD_SCK
#define ST7735_RESET 15   // LCD_RST
#define ST7735_MISO 13 //-1
#define ST7735_BUSY -1
#define TFT_BL 16         // LCD_BL
#define ST7735_SPI_HOST SPI3_HOST
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define SCREEN_ROTATE
#define TFT_HEIGHT 160
#define TFT_WIDTH 80
#define TFT_OFFSET_X 24
#define TFT_OFFSET_Y -1
#define TFT_INVERT false
#define FORCE_LOW_RES 1
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
#define DISPLAY_FORCE_SMALL_FONTS
#define TFT_BACKLIGHT_ON LOW
#define USE_TFTDISPLAY 1

#define VEXT_ENABLE 48 // display
#define VEXT_ON_VALUE LOW

#define SX126X_CS 10
#define LORA_SCK 7
#define LORA_MOSI 6
#define LORA_MISO 5
#define SX126X_RESET 41
#define SX126X_BUSY 40
#define SX126X_DIO1 4
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_RXEN 42

#define LED_POWER 21
#define LED_STATE_ON 21

#define BUTTON_PIN 0 
#define ALT_BUTTON_PIN 18

#define I2C_SDA 8
#define I2C_SCL 9

#define UART_TX 43
#define UART_RX 44

#define SX126X_MAX_POWER 22

#define HAS_SCREEN 1

#define USE_SX1262
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define LORA_CS SX126X_CS
#define LORA_DIO1 SX126X_DIO1

2026-03-24 11:26:20
1 Replies