From 5759b3bbd879124ef8ad708685a5f22dc857a361 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Fri, 31 Dec 2021 15:43:29 +0530 Subject: [PATCH 1/4] fix #840: Enable device time request by default --- src/lmic/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lmic/config.h b/src/lmic/config.h index abd0538c..9a857d47 100644 --- a/src/lmic/config.h +++ b/src/lmic/config.h @@ -169,7 +169,7 @@ // enable support for MCMD_DeviceTimeReq and MCMD_DeviceTimeAns // this is always defined, and non-zero to enable it. #if !defined(LMIC_ENABLE_DeviceTimeReq) -# define LMIC_ENABLE_DeviceTimeReq 0 +# define LMIC_ENABLE_DeviceTimeReq 1 #endif // LMIC_ENABLE_user_events From 850596d39614218f2b2564fb8623f49a01123352 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Mon, 3 Jan 2022 15:02:35 +0530 Subject: [PATCH 2/4] This is v4.2.0-pre1 --- README.md | 4 ++++ src/lmic/lmic.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3756ea0d..e374774e 100644 --- a/README.md +++ b/README.md @@ -1242,6 +1242,10 @@ function uflt12f(rawUflt12) ## Release History +- HEAD has the following changes. + + - Enable device time request by default in config file ([#840](https://github.com/mcci-catena/arduino-lmic/issues/840)). + - v4.1.1 is a patch release. - Fix US-like regions when network server disables all channels before setting others up ([#819](https://github.com/mcci-catena/arduino-lmic/issues/819)). diff --git a/src/lmic/lmic.h b/src/lmic/lmic.h index b854da41..d2153b3e 100644 --- a/src/lmic/lmic.h +++ b/src/lmic/lmic.h @@ -106,7 +106,7 @@ extern "C"{ ((((major)*UINT32_C(1)) << 24) | (((minor)*UINT32_C(1)) << 16) | (((patch)*UINT32_C(1)) << 8) | (((local)*UINT32_C(1)) << 0)) #define ARDUINO_LMIC_VERSION \ - ARDUINO_LMIC_VERSION_CALC(4, 1, 1, 0) /* 4.1.1 */ + ARDUINO_LMIC_VERSION_CALC(4, 2, 0, 1) /* 4.2.0-1 */ #define ARDUINO_LMIC_VERSION_GET_MAJOR(v) \ ((((v)*UINT32_C(1)) >> 24u) & 0xFFu) From 54944736c0f526e7250bdb35c5441164a1a8f964 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 4 Jan 2022 18:49:44 +0530 Subject: [PATCH 3/4] fix #840: update CI tests based on default config of network-time request --- ci/platformio.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ci/platformio.sh b/ci/platformio.sh index 11d70c01..f9c09571 100755 --- a/ci/platformio.sh +++ b/ci/platformio.sh @@ -54,14 +54,17 @@ then PLATFORMIO_BUILD_FLAGS='-D CFG_in866 -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --lib . --board heltec_wifi_lora_32 'examples/ttn-abp/ttn-abp.ino' # Compile "ttn-otaa-network-time" example in all regions - PLATFORMIO_BUILD_FLAGS='-D CFG_us915 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=1 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' - PLATFORMIO_BUILD_FLAGS='-D CFG_eu868 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=1 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' - PLATFORMIO_BUILD_FLAGS='-D CFG_au915 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=1 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' - PLATFORMIO_BUILD_FLAGS='-D CFG_as923 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=1 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' - PLATFORMIO_BUILD_FLAGS='-D CFG_as923jp -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=1 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' - PLATFORMIO_BUILD_FLAGS='-D CFG_kr920 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=1 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' - PLATFORMIO_BUILD_FLAGS='-D CFG_in866 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=1 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' - + PLATFORMIO_BUILD_FLAGS='-D CFG_us915 -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' + PLATFORMIO_BUILD_FLAGS='-D CFG_eu868 -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' + PLATFORMIO_BUILD_FLAGS='-D CFG_au915 -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' + PLATFORMIO_BUILD_FLAGS='-D CFG_as923 -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' + PLATFORMIO_BUILD_FLAGS='-D CFG_as923jp -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' + PLATFORMIO_BUILD_FLAGS='-D CFG_kr920 -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' + PLATFORMIO_BUILD_FLAGS='-D CFG_in866 -D CFG_sx1276_radio -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --project-option="lib_deps=Time" --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa-network-time/ttn-otaa-network-time.ino' + + # Compile "ttn-otaa" example in US and EU with Device-time request disabled + PLATFORMIO_BUILD_FLAGS='-D CFG_us915 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=0 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa/ttn-otaa.ino' + PLATFORMIO_BUILD_FLAGS='-D CFG_eu868 -D CFG_sx1276_radio -D LMIC_ENABLE_DeviceTimeReq=0 -D COMPILE_REGRESSION_TEST -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS' platformio ci --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa/ttn-otaa.ino' # Compile "ttn-otaa" example in US with debugging to Serial interface PLATFORMIO_BUILD_FLAGS='-D COMPILE_REGRESSION_TEST -D LMIC_DEBUG_LEVEL=2 -D LMIC_PRINTF_TO=Serial' platformio ci --lib . --board heltec_wifi_lora_32 'examples/ttn-otaa/ttn-otaa.ino' From 7c73957df130e96a0caf044c88d97d3da91951b0 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 4 Jan 2022 18:50:11 +0530 Subject: [PATCH 4/4] update README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e374774e..27678e79 100644 --- a/README.md +++ b/README.md @@ -343,6 +343,8 @@ Disable or enable support for device network-time requests (LoRaWAN MAC request If disabled, stub routines are provided that will return failure (so you don't need conditional compiles in client code). +By default, device network-time requests were disabled in versions prior to `v4.2.0-pre1`. As of v4.2.0-pre1, the default is that device network-time requests are enabled. + ### Rarely changed variables The remaining variables are rarely used, but we list them here for completeness.