From 6c6f1eb16ca39b925c200a79dc6cd8ccfc9938ef Mon Sep 17 00:00:00 2001 From: Thomas Kuschel Date: Sun, 18 Oct 2026 03:07:22 +0200 Subject: [PATCH] FIX parameter for SX1276 and 433.175 MHz --- src/config.hpp | 8 ++++---- src/lora.cpp | 2 ++ src/main.cpp | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/config.hpp b/src/config.hpp index 2bf686a..247a17b 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -47,10 +47,10 @@ namespace Config { constexpr gpio_num_t LORA_IRQ_PIN = GPIO_NUM_26; // Semtech SX1276 LoRa Configuration Parameters - // 433.175 MHz is calculated by: 433175000 / (32000000 / 2^19) = 7096525 = 0x06C4CD - constexpr uint8_t LORA_FRF_MSB = 0x06; - constexpr uint8_t LORA_FRF_MID = 0xC4; - constexpr uint8_t LORA_FRF_LSB = 0xCD; + // 433.175 MHz is calculated by: 433175000 / (32000000 / 2^19) = 7097139.2 = 0x6c4b33 // wrong: 0x06C4CD + constexpr uint8_t LORA_FRF_MSB = 0x6C; + constexpr uint8_t LORA_FRF_MID = 0x4B; + constexpr uint8_t LORA_FRF_LSB = 0x33; // Modem Config 1: BW 250kHz (0x80), CR 4/6 (0x04), Explicit Header (0x00) -> 0x84 constexpr uint8_t LORA_MODEM_CONFIG_1 = 0x84; diff --git a/src/lora.cpp b/src/lora.cpp index 2478cc5..3ffaa8c 100644 --- a/src/lora.cpp +++ b/src/lora.cpp @@ -213,6 +213,8 @@ void LoraController::run() { setModeReceiver(); extern DisplayController* display; // Reference the global display singleton + ESP_LOGI(TAG, "LoRa RX was initialized and is running"); + while (true) { if (xSemaphoreTake(m_isrSemaphore, portMAX_DELAY) == pdTRUE) { uint32_t irqFlags = readRegister(0x12); diff --git a/src/main.cpp b/src/main.cpp index e075a76..25dbe45 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,7 +37,7 @@ i2c* i2c_bus = nullptr; DisplayController* display = nullptr; /** - * @brief Global pointer tracking the Semtech SX1276 core radio frquency + * @brief Global pointer tracking the Semtech SX1276 core radio frequency */ LoraController* lora_module = nullptr; @@ -130,7 +130,7 @@ extern "C" { //display->printMessage(0, "FoxMesh " Config::PROJECT_VERSION " \x86" "OE3TKT"); snprintf(msg, sizeof(msg), "FoxMesh %s OE3TKT", Config::PROJECT_VERSION); display->printMessage(1, msg); - display->printMessage(2, "Bärbel frühstückt ©"); + //display->printMessage(2, "Bärbel frühstückt ©"); } // Main system watchdog and status monitor loop while (true) {