From cfad226b2ba8d0f04cf188772ade250171f79187 Mon Sep 17 00:00:00 2001 From: geeksville Date: Fri, 17 Jul 2020 14:11:27 -0700 Subject: [PATCH 1/5] use new ttgo-lora build names --- bin/build-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-all.sh b/bin/build-all.sh index 64eb82b35..3f32d2286 100755 --- a/bin/build-all.sh +++ b/bin/build-all.sh @@ -8,7 +8,7 @@ COUNTRIES="US EU433 EU865 CN JP" #COUNTRIES=US #COUNTRIES=CN -BOARDS="ttgo-lora32-v2 ttgo-lora32-v1 tbeam heltec tbeam0.7" +BOARDS="tlora-v2 tlora-v1 tlora-v2-1-1.6 tbeam heltec tbeam0.7" #BOARDS=tbeam OUTDIR=release/latest From cfedc97cd0a81d146b0516ee8da39411873c42dd Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 18 Jul 2020 08:49:42 -0700 Subject: [PATCH 2/5] Show NVS flash utilization at boot (for debugging ble things?) --- src/esp32/main-esp32.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/esp32/main-esp32.cpp b/src/esp32/main-esp32.cpp index dcc80aa66..0a0b98cde 100644 --- a/src/esp32/main-esp32.cpp +++ b/src/esp32/main-esp32.cpp @@ -7,6 +7,8 @@ #include "sleep.h" #include "target_specific.h" #include "utils.h" +#include +#include bool bluetoothOn; @@ -83,13 +85,19 @@ void esp32Setup() DEBUG_MSG("Total PSRAM: %d\n", ESP.getPsramSize()); DEBUG_MSG("Free PSRAM: %d\n", ESP.getFreePsram()); + nvs_stats_t nvs_stats; + auto res = nvs_get_stats(NULL, &nvs_stats); + assert(res == ESP_OK); + DEBUG_MSG("NVS: UsedEntries %d, FreeEntries %d, AllEntries %d\n", nvs_stats.used_entries, nvs_stats.free_entries, + nvs_stats.total_entries); + // enableModemSleep(); // Since we are turning on watchdogs rather late in the release schedule, we really don't want to catch any // false positives. The wait-to-sleep timeout for shutting down radios is 30 secs, so pick 45 for now. #define APP_WATCHDOG_SECS 45 - auto res = esp_task_wdt_init(APP_WATCHDOG_SECS, true); + res = esp_task_wdt_init(APP_WATCHDOG_SECS, true); assert(res == ESP_OK); res = esp_task_wdt_add(NULL); From 08c77caaa977aaa21749392d4d5936e92d420f70 Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 18 Jul 2020 08:54:52 -0700 Subject: [PATCH 3/5] fix #266 ble forced to re-pair details below The NVS copies of hte BLE pairing info for clients were getting corrupted occasionally. So I went googling and found some plausible bug reports but nothing that was an exact match. Then I looked at the arduino-esp32 binaries for the ESP-IDF framework. They were fairly old (Jan 20). Looking through the commits on ESP-IDF release3.3 it seems like there have been a few fixes for mutual exclusion errors wrt bluetooth. So I punted and tried updating ESP-IDF to latest and everything seems fairly solid now. Currently running a long test run with three nodes. --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 49caac25b..dbdf97fbf 100644 --- a/platformio.ini +++ b/platformio.ini @@ -90,7 +90,7 @@ build_flags = # board_build.ldscript = linker/esp32.extram.bss.ld lib_ignore = segger_rtt platform_packages = - framework-arduinoespressif32 @ https://github.com/meshtastic/arduino-esp32.git#71ed4002c953d8c87f44ed27e34fe0735f99013e + framework-arduinoespressif32 @ https://github.com/meshtastic/arduino-esp32.git#7a78d82f1b5cf64715a14d2f096b8dd775948ac1 ; The 1.0 release of the TBEAM board [env:tbeam] From d9f43d3e2fa3680a5fd78f846ce18552ece3902a Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 18 Jul 2020 09:12:51 -0700 Subject: [PATCH 4/5] update protobufs related to https://github.com/meshtastic/Meshtastic-device/issues/269 --- proto | 2 +- src/mesh/mesh.pb.h | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/proto b/proto index ab281311c..0523977d1 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit ab281311c49f2a9099d66fc6d211dca96d9603b3 +Subproject commit 0523977d1f6c378cf78859044e2edbdba45150fa diff --git a/src/mesh/mesh.pb.h b/src/mesh/mesh.pb.h index 2093bd69c..23ed6b5db 100644 --- a/src/mesh/mesh.pb.h +++ b/src/mesh/mesh.pb.h @@ -45,6 +45,10 @@ typedef struct _ChannelSettings { ChannelSettings_ModemConfig modem_config; ChannelSettings_psk_t psk; char name[12]; + uint32_t bandwidth; + uint32_t spread_factor; + uint32_t coding_rate; + uint32_t channel_num; } ChannelSettings; typedef PB_BYTES_ARRAY_T(240) Data_payload_t; @@ -241,7 +245,7 @@ typedef struct _ToRadio { #define RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}} #define SubPacket_init_default {0, {Position_init_default}, 0, 0, 0, 0, {0}, 0} #define MeshPacket_init_default {0, 0, 0, {SubPacket_init_default}, 0, 0, 0, 0, 0} -#define ChannelSettings_init_default {0, _ChannelSettings_ModemConfig_MIN, {0, {0}}, ""} +#define ChannelSettings_init_default {0, _ChannelSettings_ModemConfig_MIN, {0, {0}}, "", 0, 0, 0, 0} #define RadioConfig_init_default {false, RadioConfig_UserPreferences_init_default, false, ChannelSettings_init_default} #define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, {0, 0, 0}} #define NodeInfo_init_default {0, false, User_init_default, false, Position_init_default, 0, 0} @@ -257,7 +261,7 @@ typedef struct _ToRadio { #define RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}} #define SubPacket_init_zero {0, {Position_init_zero}, 0, 0, 0, 0, {0}, 0} #define MeshPacket_init_zero {0, 0, 0, {SubPacket_init_zero}, 0, 0, 0, 0, 0} -#define ChannelSettings_init_zero {0, _ChannelSettings_ModemConfig_MIN, {0, {0}}, ""} +#define ChannelSettings_init_zero {0, _ChannelSettings_ModemConfig_MIN, {0, {0}}, "", 0, 0, 0, 0} #define RadioConfig_init_zero {false, RadioConfig_UserPreferences_init_zero, false, ChannelSettings_init_zero} #define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, {0, 0, 0}} #define NodeInfo_init_zero {0, false, User_init_zero, false, Position_init_zero, 0, 0} @@ -271,6 +275,10 @@ typedef struct _ToRadio { /* Field tags (for use in manual encoding/decoding) */ #define ChannelSettings_tx_power_tag 1 #define ChannelSettings_modem_config_tag 3 +#define ChannelSettings_bandwidth_tag 6 +#define ChannelSettings_spread_factor_tag 7 +#define ChannelSettings_coding_rate_tag 8 +#define ChannelSettings_channel_num_tag 9 #define ChannelSettings_psk_tag 4 #define ChannelSettings_name_tag 5 #define Data_typ_tag 1 @@ -436,7 +444,11 @@ X(a, STATIC, SINGULAR, BOOL, want_ack, 11) X(a, STATIC, SINGULAR, INT32, tx_power, 1) \ X(a, STATIC, SINGULAR, UENUM, modem_config, 3) \ X(a, STATIC, SINGULAR, BYTES, psk, 4) \ -X(a, STATIC, SINGULAR, STRING, name, 5) +X(a, STATIC, SINGULAR, STRING, name, 5) \ +X(a, STATIC, SINGULAR, UINT32, bandwidth, 6) \ +X(a, STATIC, SINGULAR, UINT32, spread_factor, 7) \ +X(a, STATIC, SINGULAR, UINT32, coding_rate, 8) \ +X(a, STATIC, SINGULAR, UINT32, channel_num, 9) #define ChannelSettings_CALLBACK NULL #define ChannelSettings_DEFAULT NULL @@ -597,12 +609,12 @@ extern const pb_msgdesc_t ManufacturingData_msg; #define RouteDiscovery_size 88 #define SubPacket_size 274 #define MeshPacket_size 313 -#define ChannelSettings_size 60 -#define RadioConfig_size 253 +#define ChannelSettings_size 84 +#define RadioConfig_size 277 #define RadioConfig_UserPreferences_size 188 #define NodeInfo_size 132 #define MyNodeInfo_size 110 -#define DeviceState_size 5403 +#define DeviceState_size 5427 #define DebugString_size 258 #define FromRadio_size 322 #define ToRadio_size 316 From 39b0a89821cbd9f62241716e0b4fc108db16e65e Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 18 Jul 2020 13:19:35 -0700 Subject: [PATCH 5/5] 0.8.1 --- bin/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/version.sh b/bin/version.sh index 5ef29cacd..bc2cd88af 100644 --- a/bin/version.sh +++ b/bin/version.sh @@ -1,3 +1,3 @@ -export VERSION=0.7.11 \ No newline at end of file +export VERSION=0.8.1 \ No newline at end of file