From c0082eb095f158157e6bf79dc3558c9f0506480a Mon Sep 17 00:00:00 2001 From: Frank Sautter Date: Mon, 27 Feb 2023 01:51:26 +0100 Subject: [PATCH] support for LilyGO TTGO LORA32 v2 board Added hint to connect LORA_IO1 to GPIO33 for LMIC to work --- platformio_orig.ini | 6 ++++++ src/hal/ttgov2.h | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/platformio_orig.ini b/platformio_orig.ini index 6890db52..41aa06b0 100644 --- a/platformio_orig.ini +++ b/platformio_orig.ini @@ -1,6 +1,7 @@ ; ---> SELECT ONE TARGET BOARD FROM FOLLOWING ROWS <--- ; ; Note: For "LILYGO TTGO ESP32-Paxcounter LoRa32 V2.1 1.6.1" select board ttgov21new.h +; Note: For "LILYGO TTGO ESP32-Paxcounter LoRa32 V2.0 1.6.0" select board ttgov2.h and add bodge wire from LORA_IO1 to GPIO33 ; ; [board] @@ -126,6 +127,11 @@ upload_protocol = custom [env:usb] upload_protocol = esptool +upload_speed = 921600 +monitor_speed = 115200 +; necessary for macos - adjust devicename accordingly +;upload_port = /dev/tty.usbserial-xxxxxxx +;monitor_port = /dev/tty.usbserial-xxxxxxx [env:dev] upload_protocol = esptool diff --git a/src/hal/ttgov2.h b/src/hal/ttgov2.h index 37d58359..028d4416 100644 --- a/src/hal/ttgov2.h +++ b/src/hal/ttgov2.h @@ -1,13 +1,14 @@ // clang-format off // upload_speed 921600 -// board ttgo-lora32-v1 +// board ttgo-lora32-v2 +// https://github.com/LilyGO/TTGO-LORA32 #ifndef _TTGOV2_H #define _TTGOV2_H #include -// Hardware related definitions for TTGO V2 Board +// Hardware related definitions for LilyGO TTGO LORA32 V2 Board #define HAS_LORA 1 // comment out if device shall not send data via LoRa #define CFG_sx1276_radio 1 // HPD13A LoRa SoC @@ -34,8 +35,10 @@ // Pins for LORA chip SPI interface come from board file, we need some // additional definitions for LMIC -#define LORA_RST LMIC_UNUSED_PIN +// ******************************************************************************************** +//! LORA_IO1 is not connected on LilyGO TTGO V2 - bodge wire from LORA_IO1 to GPIO33 necessary #define LORA_IO1 (33) +// ******************************************************************************************** #define LORA_IO2 LMIC_UNUSED_PIN #endif