From 71c0cf9b9a5e0d1f8a7b1c4249950f1717629dc3 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 26 Nov 2022 08:11:32 -0600 Subject: [PATCH 1/4] Don't set DIO2 switch if TXEN is defined --- src/mesh/SX126xInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/SX126xInterface.cpp b/src/mesh/SX126xInterface.cpp index 5559a7063..ea7600dfc 100644 --- a/src/mesh/SX126xInterface.cpp +++ b/src/mesh/SX126xInterface.cpp @@ -70,7 +70,7 @@ bool SX126xInterface::init() #if defined(SX126X_TXEN) && (SX126X_TXEN != RADIOLIB_NC) // lora.begin sets Dio2 as RF switch control, which is not true if we are manually controlling RX and TX if (res == RADIOLIB_ERR_NONE) - res = lora.setDio2AsRfSwitch(true); + res = lora.setDio2AsRfSwitch(false); #endif #if 0 From a5ba3dd44567d96b92596a5c63d347b386a4fdf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 26 Nov 2022 16:03:17 +0100 Subject: [PATCH 2/4] revert protobuf change to develop --- .gitmodules | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 238eda7de..e6f376a0b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ [submodule "protobufs"] path = protobufs url = https://github.com/meshtastic/protobufs.git - branch = develop From 7c9cada50e4ac77937c10661d4413cc84a5cdec9 Mon Sep 17 00:00:00 2001 From: caveman99 Date: Sat, 26 Nov 2022 15:04:12 +0000 Subject: [PATCH 3/4] [create-pull-request] automated change --- protobufs | 2 +- src/mesh/generated/localonly.pb.h | 2 +- src/mesh/generated/module_config.pb.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protobufs b/protobufs index 3aca01ac8..afa460569 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 3aca01ac82487de8aa3d5eefdd907b4d80714501 +Subproject commit afa4605699e9ba9e2d0f0407bbc32dcd133f76af diff --git a/src/mesh/generated/localonly.pb.h b/src/mesh/generated/localonly.pb.h index f2c12b104..054cae4db 100644 --- a/src/mesh/generated/localonly.pb.h +++ b/src/mesh/generated/localonly.pb.h @@ -151,7 +151,7 @@ extern const pb_msgdesc_t LocalModuleConfig_msg; /* Maximum encoded size of messages (where known) */ #define LocalConfig_size 385 -#define LocalModuleConfig_size 296 +#define LocalModuleConfig_size 361 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/module_config.pb.h b/src/mesh/generated/module_config.pb.h index d4e54642a..12018203e 100644 --- a/src/mesh/generated/module_config.pb.h +++ b/src/mesh/generated/module_config.pb.h @@ -96,8 +96,8 @@ typedef struct _ModuleConfig_ExternalNotificationConfig { typedef struct _ModuleConfig_MQTTConfig { bool enabled; char address[32]; - char username[32]; - char password[32]; + char username[64]; + char password[64]; bool encryption_enabled; bool json_enabled; } ModuleConfig_MQTTConfig; @@ -386,12 +386,12 @@ extern const pb_msgdesc_t ModuleConfig_CannedMessageConfig_msg; #define ModuleConfig_AudioConfig_size 22 #define ModuleConfig_CannedMessageConfig_size 49 #define ModuleConfig_ExternalNotificationConfig_size 22 -#define ModuleConfig_MQTTConfig_size 105 +#define ModuleConfig_MQTTConfig_size 169 #define ModuleConfig_RangeTestConfig_size 10 #define ModuleConfig_SerialConfig_size 26 #define ModuleConfig_StoreForwardConfig_size 22 #define ModuleConfig_TelemetryConfig_size 18 -#define ModuleConfig_size 107 +#define ModuleConfig_size 172 #ifdef __cplusplus } /* extern "C" */ From 082aa07e7fa069ba9daadebee1c67e0f1022a73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 26 Nov 2022 17:00:33 +0100 Subject: [PATCH 4/4] update batch scripts to further check filename. --- bin/device-install.bat | 5 ++++- bin/device-install.sh | 5 +++-- bin/device-update.bat | 5 ++++- bin/device-update.sh | 7 ++++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/bin/device-install.bat b/bin/device-install.bat index 419e8d6bd..15c2db352 100755 --- a/bin/device-install.bat +++ b/bin/device-install.bat @@ -26,7 +26,7 @@ IF "__%FILENAME%__" == "____" ( echo "Missing FILENAME" goto HELP ) -IF EXIST %FILENAME% ( +IF EXIST %FILENAME% IF x%FILENAME:update=%==x%FILENAME% ( echo Trying to flash update %FILENAME%, but first erasing and writing system information" %PYTHON% -m esptool --baud 115200 erase_flash %PYTHON% -m esptool --baud 115200 write_flash 0x00 %FILENAME% @@ -37,6 +37,9 @@ IF EXIST %FILENAME% ( ) else ( echo "Invalid file: %FILENAME%" goto HELP +) else ( + echo "Invalid file: %FILENAME%" + goto HELP ) :EOF diff --git a/bin/device-install.sh b/bin/device-install.sh index a55e553c7..bc14d440b 100755 --- a/bin/device-install.sh +++ b/bin/device-install.sh @@ -14,6 +14,7 @@ Flash image file to device, but first erasing and writing system information" -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous). -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON") -f FILENAME The .bin file to flash. Custom to your device type and region. + EOF } @@ -44,7 +45,7 @@ shift "$((OPTIND-1))" shift } -if [ -f "${FILENAME}" ]; then +if [ -f "${FILENAME}" ] && [ "${FILENAME}" != *"update"* ]; then echo "Trying to flash ${FILENAME}, but first erasing and writing system information" "$PYTHON" -m esptool erase_flash "$PYTHON" -m esptool write_flash 0x00 ${FILENAME} @@ -52,8 +53,8 @@ if [ -f "${FILENAME}" ]; then "$PYTHON" -m esptool write_flash 0x300000 littlefs-*.bin else - echo "Invalid file: ${FILENAME}" show_help + echo "Invalid file: ${FILENAME}" fi exit 0 diff --git a/bin/device-update.bat b/bin/device-update.bat index 103fbad6e..2ac649be4 100755 --- a/bin/device-update.bat +++ b/bin/device-update.bat @@ -26,12 +26,15 @@ IF "__%FILENAME%__" == "____" ( echo "Missing FILENAME" goto HELP ) -IF EXIST %FILENAME% ( +IF EXIST %FILENAME% IF NOT x%FILENAME:update=%==x%FILENAME% ( echo Trying to flash update %FILENAME% %PYTHON% -m esptool --baud 115200 write_flash 0x10000 %FILENAME% ) else ( echo "Invalid file: %FILENAME%" goto HELP +) else ( + echo "Invalid file: %FILENAME%" + goto HELP ) :EOF diff --git a/bin/device-update.sh b/bin/device-update.sh index bd06fb25a..0959f0e3c 100755 --- a/bin/device-update.sh +++ b/bin/device-update.sh @@ -12,6 +12,7 @@ Flash image file to device, leave existing system intact." -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous). -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON") -f FILENAME The *update.bin file to flash. Custom to your device type. + EOF } @@ -42,12 +43,12 @@ shift "$((OPTIND-1))" shift } -if [ -f "${FILENAME}" ]; then - echo "Trying to flash update ${FILENAME}." +if [ -f "${FILENAME}" ] && [ $FILENAME == *"update"* ]; then + printf "Trying to flash update ${FILENAME}" $PYTHON -m esptool --baud 115200 write_flash 0x10000 ${FILENAME} else - echo "Invalid file: ${FILENAME}" show_help + echo "Invalid file: ${FILENAME}" fi exit 0