From b070af39cc88e2f579f9ebe6dc72cc8eae432c2f Mon Sep 17 00:00:00 2001 From: pelgraine Date: Sun, 5 Apr 2026 08:57:47 +1000 Subject: [PATCH] t5s3 wifi remote repeater --- examples/simple_repeater/main.cpp | 10 ++- examples/simple_repeater/wifimqtt.cpp | 1 - .../lilygo_t5s3_epaper_pro/platformio.ini | 67 ++++++++++++++++++- variants/lilygo_tdeck_pro/platformio.ini | 4 +- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/examples/simple_repeater/main.cpp b/examples/simple_repeater/main.cpp index 51fb0b8f..1bbe7cb4 100644 --- a/examples/simple_repeater/main.cpp +++ b/examples/simple_repeater/main.cpp @@ -99,7 +99,8 @@ void setup() { // --------------------------------------------------------------------------- // SD card init — needed for MQTT config (/remote/mqtt.cfg, /remote/wifi.cfg) - // SD, LoRa, and e-ink share the same SPI bus on T-Deck Pro. + // T-Deck Pro: SD shares display SPI bus (HSPI via displaySpi) + // T5S3: SD shares LoRa SPI bus (SCK=14, MOSI=13, MISO=21) // --------------------------------------------------------------------------- #if defined(HAS_4G_MODEM) || defined(MECK_WIFI_REMOTE) { @@ -119,7 +120,12 @@ void setup() { delay(100); for (int i = 0; i < 3; i++) { - #ifdef SDCARD_CS + #if defined(LilyGo_T5S3_EPaper_Pro) + // T5S3: SD shares LoRa SPI bus — create local HSPI reference + static SPIClass sdSpi(HSPI); + sdSpi.begin(P_LORA_SCLK, P_LORA_MISO, P_LORA_MOSI, SDCARD_CS); + if (SD.begin(SDCARD_CS, sdSpi, 4000000)) { sdCardReady = true; break; } + #elif defined(SDCARD_CS) extern SPIClass displaySpi; if (SD.begin(SDCARD_CS, displaySpi)) { sdCardReady = true; break; } #else diff --git a/examples/simple_repeater/wifimqtt.cpp b/examples/simple_repeater/wifimqtt.cpp index b37ca267..8ee657e2 100644 --- a/examples/simple_repeater/wifimqtt.cpp +++ b/examples/simple_repeater/wifimqtt.cpp @@ -270,7 +270,6 @@ bool WiFiMQTT::connectWiFi() { } time_t now = time(nullptr); if (now > 1700000000) { - extern AutoDiscoverRTCClock rtc_clock; rtc_clock.setCurrentTime((uint32_t)now); Serial.printf(" OK (%lu)\n", (unsigned long)now); } else { diff --git a/variants/lilygo_t5s3_epaper_pro/platformio.ini b/variants/lilygo_t5s3_epaper_pro/platformio.ini index c213cda8..3b97a3b6 100644 --- a/variants/lilygo_t5s3_epaper_pro/platformio.ini +++ b/variants/lilygo_t5s3_epaper_pro/platformio.ini @@ -166,4 +166,69 @@ lib_deps = densaugeo/base64 @ ~1.4.0 adafruit/Adafruit GFX Library@^1.11.0 https://github.com/mverch67/FastEPD/archive/0df1bff329b6fc782e062f611758880762340647.zip - https://github.com/lewisxhe/SensorLib/archive/refs/tags/v0.3.4.zip \ No newline at end of file + https://github.com/lewisxhe/SensorLib/archive/refs/tags/v0.3.4.zip + + ; --------------------------------------------------------------------------- +; T5S3 WiFi Remote Repeater — WiFi MQTT backhaul, remote management +; Same MQTT protocol as T-Deck Pro remote repeater builds. +; Uses FastEPD for parallel e-ink display. +; Flash: pio run -e meck_wifi_repeater_t5s3 -t upload +; --------------------------------------------------------------------------- +[env:meck_wifi_repeater_t5s3] +extends = LilyGo_T5S3_EPaper_Pro +build_src_filter = ${LilyGo_T5S3_EPaper_Pro.build_src_filter} + + + - + + + + + +<../examples/simple_repeater/*.cpp> +build_flags = + ${LilyGo_T5S3_EPaper_Pro.build_flags} + -D FIRMWARE_VERSION='"Meck T5S3 WiFi Rptr v0.1"' + -D FIRMWARE_BUILD_DATE='"5 Apr 2026"' + -D DISPLAY_CLASS=FastEPDDisplay + -D USE_EINK + -D MECK_WIFI_REMOTE + -D MECK_REMOTE_REPEATER=1 + -D DISABLE_WIFI_OTA=1 + -D MAX_NEIGHBOURS=50 + -D HAS_SDCARD=1 + -D RADIOLIB_EXCLUDE_CC1101=1 + -D RADIOLIB_EXCLUDE_NRF24=1 + -D RADIOLIB_EXCLUDE_RF69=1 + -D RADIOLIB_EXCLUDE_SX1231=1 + -D RADIOLIB_EXCLUDE_SX1233=1 + -D RADIOLIB_EXCLUDE_SI443X=1 + -D RADIOLIB_EXCLUDE_RFM2X=1 + -D RADIOLIB_EXCLUDE_SX127X=1 + -D RADIOLIB_EXCLUDE_SX1272=1 + -D RADIOLIB_EXCLUDE_SX1278=1 + -D RADIOLIB_EXCLUDE_STM32WLX=1 + -D RADIOLIB_EXCLUDE_LR11X0=1 + -D RADIOLIB_EXCLUDE_LLCC68=1 + -D RADIOLIB_EXCLUDE_SX128X=1 + -D RADIOLIB_EXCLUDE_AFSK=1 + -D RADIOLIB_EXCLUDE_AX25=1 + -D RADIOLIB_EXCLUDE_HELLSCHREIBER=1 + -D RADIOLIB_EXCLUDE_MORSE=1 + -D RADIOLIB_EXCLUDE_RTTY=1 + -D RADIOLIB_EXCLUDE_SSTV=1 + -D RADIOLIB_EXCLUDE_APRS=1 + -D RADIOLIB_EXCLUDE_LORAWAN=1 + -D RADIOLIB_EXCLUDE_PAGER=1 + -D RADIOLIB_EXCLUDE_FSK4=1 + -D RADIOLIB_EXCLUDE_BELL=1 +lib_deps = + ${LilyGo_T5S3_EPaper_Pro.lib_deps} + knolleary/PubSubClient@^2.8 + adafruit/Adafruit GFX Library@^1.11.0 + https://github.com/mverch67/FastEPD/archive/0df1bff329b6fc782e062f611758880762340647.zip + https://github.com/lewisxhe/SensorLib/archive/refs/tags/v0.3.4.zip +lib_ignore = + ESP32 BLE Arduino + AsyncTCP + RPAsyncTCP + ESPAsyncWebServer + AsyncElegantOTA + ESP32-audioI2S + esp32_codec2_arduino \ No newline at end of file diff --git a/variants/lilygo_tdeck_pro/platformio.ini b/variants/lilygo_tdeck_pro/platformio.ini index 6c4ffb72..63a38525 100644 --- a/variants/lilygo_tdeck_pro/platformio.ini +++ b/variants/lilygo_tdeck_pro/platformio.ini @@ -328,7 +328,7 @@ build_flags = -D MECK_REMOTE_REPEATER=1 -D MAX_NEIGHBOURS=50 -D FIRMWARE_VERSION='"Meck RemRptr v0.3"' - -D FIRMWARE_BUILD_DATE='"4 April 2026"' + -D FIRMWARE_BUILD_DATE='"5 April 2026"' -D RADIOLIB_EXCLUDE_CC1101=1 -D RADIOLIB_EXCLUDE_NRF24=1 -D RADIOLIB_EXCLUDE_RF69=1 @@ -382,7 +382,7 @@ build_src_filter = ${LilyGo_TDeck_Pro.build_src_filter} build_flags = ${LilyGo_TDeck_Pro.build_flags} -D FIRMWARE_VERSION='"Meck WiFi Rptr v0.3"' - -D FIRMWARE_BUILD_DATE='"4 April 2026"' + -D FIRMWARE_BUILD_DATE='"5 April 2026"' -D MAX_NEIGHBOURS=50 -D MECK_WIFI_REMOTE -D MECK_REMOTE_REPEATER=1