From 1c546b5f8b68186c9a4524fd1d10f803e2d30d9d Mon Sep 17 00:00:00 2001 From: iranl Date: Fri, 21 Mar 2025 22:24:45 +0100 Subject: [PATCH] MQTT mempool --- platformio.ini | 7 +++++++ src/Config.h | 2 +- src/networkDevices/NetworkDevice.cpp | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/platformio.ini b/platformio.ini index 22a8574..73ddde7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -44,6 +44,13 @@ build_flags = -DNUKI_MUTEX_RECURSIVE -DNUKI_64BIT_TIME -DETH_SPI_SUPPORTS_NO_IRQ + -DEMC_RX_BUFFER_SIZE=1440 + -DEMC_TX_BUFFER_SIZE=1440 + -DEMC_MIN_FREE_MEMORY=8192 + -DEMC_TASK_STACK_SIZE=10240 + -DEMC_USE_MEMPOOL=1 + -DEMC_NUM_POOL_ELEMENTS=64 + -DEMC_SIZE_POOL_ELEMENTS=256 -Wno-ignored-qualifiers -Wno-missing-field-initializers -Wno-type-limits diff --git a/src/Config.h b/src/Config.h index bdc85df..219041c 100644 --- a/src/Config.h +++ b/src/Config.h @@ -5,7 +5,7 @@ #define NUKI_HUB_VERSION "9.10" #define NUKI_HUB_VERSION_INT (uint32_t)910 #define NUKI_HUB_BUILD "unknownbuildnr" -#define NUKI_HUB_DATE "2025-03-03" +#define NUKI_HUB_DATE "2025-03-21" #define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest" #define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json" diff --git a/src/networkDevices/NetworkDevice.cpp b/src/networkDevices/NetworkDevice.cpp index b921d71..7ce2c65 100644 --- a/src/networkDevices/NetworkDevice.cpp +++ b/src/networkDevices/NetworkDevice.cpp @@ -33,7 +33,7 @@ void NetworkDevice::init() { _useEncryption = true; Log->println("MQTT over TLS."); - _mqttClientSecure = new espMqttClientSecure(espMqttClientTypes::UseInternalTask::NO); + _mqttClientSecure = new espMqttClientSecure(espMqttClientTypes::UseInternalTask::YES); _mqttClientSecure->setCACert(caDest); File file2 = SPIFFS.open("/mqtt_ssl.crt"); @@ -70,7 +70,7 @@ void NetworkDevice::init() if (!_useEncryption) { Log->println("MQTT without TLS."); - _mqttClient = new espMqttClient(espMqttClientTypes::UseInternalTask::NO); + _mqttClient = new espMqttClient(espMqttClientTypes::UseInternalTask::YES); } if(_preferences->getBool(preference_mqtt_log_enabled, false) || _preferences->getBool(preference_webserial_enabled, false)) @@ -103,7 +103,7 @@ void NetworkDevice::update() { if (_mqttEnabled) { - getMqttClient()->loop(); + //getMqttClient()->loop(); } }