From 8d07cd9da9737a73b6a9c1f35a3427f8db25ed91 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 27 Jul 2020 10:58:01 +0200 Subject: [PATCH 01/46] Add timeout parameter to lte_send_at_cmd timeout=0 means wait forever... --- esp32/lte/lteppp.c | 2 +- esp32/mods/modlte.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index 3e92dab996..61e96eeccf 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -256,7 +256,7 @@ bool lteppp_wait_at_rsp (const char *expected_rsp, uint32_t timeout, bool from_m if (timeout_cnt > 0) { timeout_cnt--; } - } while (timeout_cnt > 0 && 0 == rx_len); + } while ((timeout_cnt > 0 || timeout == 0) && 0 == rx_len); memset(lteppp_trx_buffer, 0, LTE_UART_BUFFER_SIZE); uint16_t len_count = 0; diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index a705bf35d6..ba3cc8d14b 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -1231,6 +1231,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m lte_check_inppp(); STATIC const mp_arg_t allowed_args[] = { { MP_QSTR_cmd, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_obj = mp_const_none} }, }; // parse args mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -1241,7 +1242,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m if (MP_OBJ_IS_STR_OR_BYTES(args[0].u_obj)) { size_t len; - lte_push_at_command_ext((char *)(mp_obj_str_get_data(args[0].u_obj, &len)), LTE_RX_TIMEOUT_MAX_MS, NULL, len); + lte_push_at_command_ext((char *)(mp_obj_str_get_data(args[0].u_obj, &len)), args[0].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, len); } else { @@ -1253,7 +1254,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m vstr_add_str(&vstr, modlte_rsp.data); while(modlte_rsp.data_remaining) { - lte_push_at_command_ext("Pycom_Dummy", LTE_RX_TIMEOUT_MAX_MS, NULL, strlen("Pycom_Dummy") ); + lte_push_at_command_ext("Pycom_Dummy", args[0].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, strlen("Pycom_Dummy") ); vstr_add_str(&vstr, modlte_rsp.data); } return mp_obj_new_str_from_vstr(&mp_type_str, &vstr); From 09e39fe6dc5da7b0d6e02492d5d0c3bff850744f Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 27 Jul 2020 11:59:32 +0200 Subject: [PATCH 02/46] Update modlte.c Fix timeout parameter check --- esp32/mods/modlte.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index ba3cc8d14b..d5aaed6967 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -1242,7 +1242,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m if (MP_OBJ_IS_STR_OR_BYTES(args[0].u_obj)) { size_t len; - lte_push_at_command_ext((char *)(mp_obj_str_get_data(args[0].u_obj, &len)), args[0].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, len); + lte_push_at_command_ext((char *)(mp_obj_str_get_data(args[0].u_obj, &len)), args[1].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, len); } else { @@ -1254,7 +1254,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m vstr_add_str(&vstr, modlte_rsp.data); while(modlte_rsp.data_remaining) { - lte_push_at_command_ext("Pycom_Dummy", args[0].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, strlen("Pycom_Dummy") ); + lte_push_at_command_ext("Pycom_Dummy", args[1].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, strlen("Pycom_Dummy") ); vstr_add_str(&vstr, modlte_rsp.data); } return mp_obj_new_str_from_vstr(&mp_type_str, &vstr); From d93abce3084c2e3d43c7c2b1ab228a5acb7d9a18 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 27 Jul 2020 12:09:30 +0200 Subject: [PATCH 03/46] Update modlte.c Assign LTE_RX_TIMEOUT_MAX_MS as default value --- esp32/mods/modlte.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index d5aaed6967..49d6ef993c 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -1231,7 +1231,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m lte_check_inppp(); STATIC const mp_arg_t allowed_args[] = { { MP_QSTR_cmd, MP_ARG_OBJ, {.u_obj = mp_const_none} }, - { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_obj = mp_const_none} }, + { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = LTE_RX_TIMEOUT_MAX_MS} }, }; // parse args mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -1242,7 +1242,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m if (MP_OBJ_IS_STR_OR_BYTES(args[0].u_obj)) { size_t len; - lte_push_at_command_ext((char *)(mp_obj_str_get_data(args[0].u_obj, &len)), args[1].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, len); + lte_push_at_command_ext((char *)(mp_obj_str_get_data(args[0].u_obj, &len)), args[1].u_int, NULL, len); } else { @@ -1254,7 +1254,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m vstr_add_str(&vstr, modlte_rsp.data); while(modlte_rsp.data_remaining) { - lte_push_at_command_ext("Pycom_Dummy", args[1].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args[1].u_int, NULL, strlen("Pycom_Dummy") ); + lte_push_at_command_ext("Pycom_Dummy", args[1].u_int, NULL, strlen("Pycom_Dummy") ); vstr_add_str(&vstr, modlte_rsp.data); } return mp_obj_new_str_from_vstr(&mp_type_str, &vstr); From 86665a21e77f80d53bd8fb1ea9ce2c4e7fdc7e09 Mon Sep 17 00:00:00 2001 From: Roberto Colistete Jr Date: Wed, 5 Aug 2020 02:53:19 -0300 Subject: [PATCH 04/46] PYCOM : make option MICROPY_FLOAT_IMPL --- esp32/Makefile | 11 +++++++++++ esp32/mpconfigport.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/esp32/Makefile b/esp32/Makefile index 0ab16d2762..fadc7325bf 100644 --- a/esp32/Makefile +++ b/esp32/Makefile @@ -123,6 +123,17 @@ CFLAGS_XTENSA_PSRAM = -mfix-esp32-psram-cache-issue CFLAGS = $(CFLAGS_XTENSA) $(CFLAGS_XTENSA_PSRAM) $(CFLAGS_XTENSA_OPT) -nostdlib -std=gnu99 -g3 -ggdb -fstrict-volatile-bitfields -Iboards/$(BOARD) CFLAGS_SIGFOX = $(CFLAGS_XTENSA) -O2 -nostdlib -std=gnu99 -g3 -ggdb -fstrict-volatile-bitfields -Iboards/$(BOARD) +# Configure floating point support +ifeq ($(MICROPY_FLOAT_IMPL),double) +CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_DOUBLE +else +ifeq ($(MICROPY_FLOAT_IMPL),none) +CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_NONE +else +CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT +endif +endif + LDFLAGS = -nostdlib -Wl,-Map=$(@:.elf=.map) -Wl,--no-check-sections -u call_user_start_cpu0 LDFLAGS += -Wl,-static -Wl,--undefined=uxTopUsedPriority -Wl,--gc-sections diff --git a/esp32/mpconfigport.h b/esp32/mpconfigport.h index 9870415bd2..e6d2228138 100644 --- a/esp32/mpconfigport.h +++ b/esp32/mpconfigport.h @@ -101,7 +101,9 @@ #define MICROPY_PY_UTIMEQ (1) #define MICROPY_CPYTHON_COMPAT (1) #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ) +#ifndef MICROPY_FLOAT_IMPL // can be configured by make option #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) +#endif #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NORMAL) #define MICROPY_OPT_COMPUTED_GOTO (1) #define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0) From a06c0146db129a1e82242b13b3b5e95c6f3a7789 Mon Sep 17 00:00:00 2001 From: Roberto Colistete Jr Date: Thu, 6 Aug 2020 22:06:51 -0300 Subject: [PATCH 05/46] PYCOM : improved option MICROPY_FLOAT_IMPL --- esp32/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esp32/Makefile b/esp32/Makefile index fadc7325bf..758ca21036 100644 --- a/esp32/Makefile +++ b/esp32/Makefile @@ -130,9 +130,11 @@ else ifeq ($(MICROPY_FLOAT_IMPL),none) CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_NONE else +ifeq ($(MICROPY_FLOAT_IMPL),single) CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT endif endif +endif LDFLAGS = -nostdlib -Wl,-Map=$(@:.elf=.map) -Wl,--no-check-sections -u call_user_start_cpu0 LDFLAGS += -Wl,-static -Wl,--undefined=uxTopUsedPriority -Wl,--gc-sections From 38f90197b3800291f7fcc2c77753a3963b8413d6 Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Wed, 21 Oct 2020 18:46:59 +0200 Subject: [PATCH 06/46] Fix memory leak happens after Bluetooth disconnect, fix a problem in Bluetooth.deinit() and fix Bluetooth connection resume after machine.wakeup(True) --- esp32/mods/modbt.c | 91 ++++++++++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 32 deletions(-) diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index a800f80c35..47594e21b5 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -265,7 +265,6 @@ static esp_ble_adv_params_t bt_adv_params = { static bool mod_bt_allow_resume_deinit; static uint16_t mod_bt_gatts_mtu_restore = 0; -static bool mod_bt_is_conn_restore_available; static nvs_handle modbt_nvs_handle; static uint8_t tx_pwr_level_to_dbm[] = {-12, -9, -6, -3, 0, 3, 6, 9}; @@ -324,7 +323,6 @@ void modbt_init0(void) { esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); mod_bt_allow_resume_deinit = false; - mod_bt_is_conn_restore_available = false; } void modbt_deinit(bool allow_reconnect) @@ -363,11 +361,14 @@ void modbt_deinit(bool allow_reconnect) xEventGroupWaitBits(bt_event_group, MOD_BT_GATTS_DISCONN_EVT | MOD_BT_GATTS_CLOSE_EVT, true, true, 1000/portTICK_PERIOD_MS); } + esp_ble_gattc_app_unregister(MOD_BT_CLIENT_APP_ID); + esp_ble_gatts_app_unregister(MOD_BT_SERVER_APP_ID); + esp_bluedroid_disable(); esp_bluedroid_deinit(); esp_bt_controller_disable(); + esp_bt_controller_deinit(); bt_obj.init = false; - mod_bt_is_conn_restore_available = false; xEventGroupClearBits(bt_event_group, MOD_BT_GATTC_MTU_EVT | MOD_BT_GATTS_MTU_EVT | MOD_BT_GATTS_DISCONN_EVT | MOD_BT_GATTS_CLOSE_EVT); } } @@ -393,34 +394,39 @@ void bt_resume(bool reconnect) esp_ble_gatt_set_local_mtu(mod_bt_gatts_mtu_restore); - bt_connection_obj_t *connection_obj = NULL; - - if(MP_STATE_PORT(btc_conn_list).len > 0) + // If this list has 0 elements it means there were no active connections + if(MP_STATE_PORT(btc_conn_list).len > 0 && reconnect) { - /* Get the Last gattc connection obj before sleep */ - connection_obj = ((bt_connection_obj_t *)(MP_STATE_PORT(btc_conn_list).items[MP_STATE_PORT(btc_conn_list).len - 1])); - } + /* Enable Scan */ + modbt_start_scan(MP_OBJ_NEW_SMALL_INT(-1)); + mp_hal_delay_ms(50); + while(!bt_obj.scanning){ + /* Wait for scanning to start */ + } - if (reconnect) - { - /* Check if there was a gattc connection Active before sleep */ - if (connection_obj != NULL) { - if (connection_obj->conn_id >= 0) { - /* Enable Scan */ - modbt_start_scan(MP_OBJ_NEW_SMALL_INT(-1)); - mp_hal_delay_ms(50); - while(!bt_obj.scanning){ - /* Wait for scanning to start */ - } - /* re-connect to Last Connection */ - mp_obj_list_remove((void *)&MP_STATE_PORT(btc_conn_list), connection_obj); - mp_obj_list_append((void *)&MP_STATE_PORT(btc_conn_list), modbt_connect(mp_obj_new_bytes((const byte *)connection_obj->srv_bda, 6))); + /* Re-connect to all previously existing connections */ + // Need to save the old connections into a temporary list because during connect the original list is manipulated (items added) + mp_obj_list_t btc_conn_list_tmp; + mp_obj_list_init(&btc_conn_list_tmp, 0); + for (mp_uint_t i = 0; i < MP_STATE_PORT(btc_conn_list).len; i++) { + bt_connection_obj_t *connection_obj = ((bt_connection_obj_t *)(MP_STATE_PORT(btc_conn_list).items[i])); + mp_obj_list_append(&btc_conn_list_tmp, connection_obj); + } - mod_bt_is_conn_restore_available = true; + // Connect to the old connections + for (mp_uint_t i = 0; i < btc_conn_list_tmp.len; i++) { + bt_connection_obj_t *connection_obj = ((bt_connection_obj_t *)(btc_conn_list_tmp.items[i])); + // Initiates re-connection + bt_connection_obj_t *new_connection_obj = modbt_connect(mp_obj_new_bytes((const byte *)connection_obj->srv_bda, 6)); + // If new connection object has been created then overwrite the original one so from the MicroPython code the same reference can be used + if(new_connection_obj != mp_const_none) { + memcpy(connection_obj, new_connection_obj, sizeof(bt_connection_obj_t)); + // As modbt_connect appends the new connection to the original list, it needs to be removed because it is not needed + mp_obj_list_remove((void *)&MP_STATE_PORT(btc_conn_list), new_connection_obj); } } - /* See if there was an averstisment active before Sleep */ + /* See if there was an advertisement active before Sleep */ if(bt_obj.advertising) { esp_ble_gap_start_advertising(&bt_adv_params); } @@ -554,8 +560,7 @@ static void set_pin(uint32_t new_pin) static void close_connection (int32_t conn_id) { for (mp_uint_t i = 0; i < MP_STATE_PORT(btc_conn_list).len; i++) { bt_connection_obj_t *connection_obj = ((bt_connection_obj_t *)(MP_STATE_PORT(btc_conn_list).items[i])); - /* Only reset Conn Id if it is a normal disconnect not module de-init to mark conn obj to be restored */ - if (connection_obj->conn_id == conn_id && (!mod_bt_allow_resume_deinit)) { + if (connection_obj->conn_id == conn_id) { connection_obj->conn_id = -1; mp_obj_list_remove((void *)&MP_STATE_PORT(btc_conn_list), connection_obj); } @@ -1408,7 +1413,13 @@ static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ EventBits_t uxBits; if (bt_obj.busy) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "operation already in progress")); + // Only drop exception if not called from bt_resume() API, otherwise return with mp_const_none on error + if(mod_bt_allow_resume_deinit == false) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "operation already in progress")); + } + else { + return mp_const_none; + } } if (bt_obj.scanning) { @@ -1427,13 +1438,20 @@ static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ if (ESP_OK != esp_ble_gattc_open(bt_obj.gattc_if, bufinfo.buf, BLE_ADDR_TYPE_PUBLIC, true)) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); } + MP_THREAD_GIL_EXIT(); if (xQueueReceive(xScanQueue, &bt_event, timeout) == pdTRUE) { MP_THREAD_GIL_ENTER(); if (bt_event.connection.conn_id < 0) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "connection refused")); + // Only drop exception if not called from bt_resume() API, otherwise return with mp_const_none on error + if(mod_bt_allow_resume_deinit == false) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "connection refused")); + } + else { + return mp_const_none; + } } // setup the object @@ -1452,6 +1470,7 @@ static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ } memcpy(conn->srv_bda, bt_event.connection.srv_bda, 6); mp_obj_list_append((void *)&MP_STATE_PORT(btc_conn_list), conn); + return conn; } else @@ -1459,7 +1478,14 @@ static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ MP_THREAD_GIL_ENTER(); (void)esp_ble_gap_disconnect(bufinfo.buf); - nlr_raise(mp_obj_new_exception_msg(&mp_type_TimeoutError, "timed out")); + + // Only drop exception if not called from bt_resume() API, otherwise return with mp_const_none on error + if(mod_bt_allow_resume_deinit == false) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_TimeoutError, "timed out")); + } + else { + return mp_const_none; + } } return mp_const_none; } @@ -2272,8 +2298,9 @@ STATIC mp_obj_t bt_conn_disconnect(mp_obj_t self_in) { if (self->conn_id >= 0) { esp_ble_gattc_close(bt_obj.gattc_if, self->conn_id); esp_ble_gap_disconnect(self->srv_bda); - /* Only reset Conn Id if it is a normal disconnect not module de-init to mark conn obj to be restored */ - if(!mod_bt_allow_resume_deinit) + /* Only reset Conn Id if it is needed that the connection should be established again after wakeup + * otherwise this connection will be completely removed in close_connection() call triggered by ESP_GATTC_DISCONNECT_EVT event */ + if(mod_bt_allow_resume_deinit) { self->conn_id = -1; } From ca10cd1e52687cda8431d245bcd041f29f62bee0 Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sat, 24 Oct 2020 14:13:11 +0200 Subject: [PATCH 07/46] Fix a problem when machine.sleep(resume_wifi_ble=True) drops exception when Pybytes & SmartConfig is used, but no WLAN connection has been established --- esp32/mods/modmachine.c | 4 +- esp32/mods/modwlan.c | 101 ++++++++++++++++++++++++++++------------ esp32/mods/modwlan.h | 2 +- 3 files changed, 75 insertions(+), 32 deletions(-) diff --git a/esp32/mods/modmachine.c b/esp32/mods/modmachine.c index fc9e2e8b26..9b1acd228d 100644 --- a/esp32/mods/modmachine.c +++ b/esp32/mods/modmachine.c @@ -435,13 +435,13 @@ STATIC mp_obj_t machine_sleep (uint n_args, const mp_obj_t *arg) { } modbt_deinit(reconnect); - wlan_deinit(NULL); + // TRUE means wlan_deinit is called from machine_sleep + wlan_deinit(mp_const_true); if(ESP_OK != esp_light_sleep_start()) { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "Wifi or BT not stopped before sleep")); } - /* resume wlan */ wlan_resume(reconnect); /* resume bt */ diff --git a/esp32/mods/modwlan.c b/esp32/mods/modwlan.c index 9b222b64c4..cdb9f387f9 100644 --- a/esp32/mods/modwlan.c +++ b/esp32/mods/modwlan.c @@ -96,14 +96,14 @@ wlan_obj_t wlan_obj = { .irq_enabled = false, .pwrsave = false, .is_promiscuous = false, - .sta_conn_timeout = false + .sta_conn_timeout = false, + .country = NULL }; /* TODO: Maybe we can add possibility to create IRQs for wifi events */ static EventGroupHandle_t wifi_event_group; -static bool mod_wlan_is_deinit = false; static uint16_t mod_wlan_ap_number_of_connections = 0; /* Variables holding wlan conn params for wakeup recovery of connections */ @@ -135,6 +135,7 @@ SemaphoreHandle_t smartConfigTimeout_mutex; static const int ESPTOUCH_DONE_BIT = BIT1; static const int ESPTOUCH_STOP_BIT = BIT2; +static const int ESPTOUCH_SLEEP_STOP_BIT = BIT3; static bool wlan_smart_config_enabled = false; /****************************************************************************** @@ -202,24 +203,36 @@ void wlan_pre_init (void) { wlan_obj.mutex = xSemaphoreCreateMutex(); timeout_mutex = xSemaphoreCreateMutex(); smartConfigTimeout_mutex = xSemaphoreCreateMutex(); - memcpy(wlan_obj.country.cc, (const char*)"NA", sizeof(wlan_obj.country.cc)); // create Smart Config Task xTaskCreatePinnedToCore(TASK_SMART_CONFIG, "SmartConfig", SMART_CONF_TASK_STACK_SIZE / sizeof(StackType_t), NULL, SMART_CONF_TASK_PRIORITY, &SmartConfTaskHandle, 1); } void wlan_resume (bool reconnect) { - if (!wlan_obj.started && mod_wlan_is_deinit) { - - mod_wlan_is_deinit = false; - - if(reconnect) - { - wifi_country_t* country = NULL; - - if(strcmp((const char*)wlan_obj.country.cc, "NA")) - { - country = &(wlan_obj.country); + // Configure back WLAN as it was before if reconnect is TRUE + if(reconnect) { + // If SmartConfig enabled then re-start it + if(wlan_smart_config_enabled) { + // Do initial configuration as at this point the Wifi Driver is not initialized + wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); + ESP_ERROR_CHECK(esp_wifi_init(&cfg)); + ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); + wlan_set_antenna(wlan_obj.antenna); + wlan_set_mode(wlan_obj.mode); + wlan_set_bandwidth(wlan_obj.bandwidth); + if(wlan_obj.country != NULL) { + esp_wifi_set_country(wlan_obj.country); + } + xTaskNotifyGive(SmartConfTaskHandle); + } + // Otherwise set up WLAN with the same parameters as it was before + else { + // In wlan_setup the wlan_obj.country is overwritten with the value coming from setup_config, need to save it out + wifi_country_t country; + wifi_country_t* country_ptr = NULL; + if(wlan_obj.country != NULL) { + memcpy(&country, wlan_obj.country, sizeof(wifi_country_t)); + country_ptr = &country; } wlan_internal_setup_t setup_config = { @@ -234,11 +247,11 @@ void wlan_resume (bool reconnect) false, wlan_conn_recover_hidden, wlan_obj.bandwidth, - country, + country_ptr, &(wlan_obj.max_tx_pwr) }; - // initialize the wlan subsystem + // Initialize & reconnect to the previous connection wlan_setup(&setup_config); } } @@ -258,12 +271,15 @@ void wlan_setup (wlan_internal_setup_t *config) { wlan_set_bandwidth(config->bandwidth); if (config->country != NULL) { - - if(ESP_OK != esp_wifi_set_country(config->country)) + esp_err_t ret = esp_wifi_set_country(config->country); + if(ESP_OK != ret) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); } - memcpy(&(wlan_obj.country), config->country, sizeof(wlan_obj.country)); + if(wlan_obj.country == NULL) { + wlan_obj.country = (wifi_country_t*)malloc(sizeof(wifi_country_t)); + } + memcpy(wlan_obj.country, config->country, sizeof(wifi_country_t)); } if(config->max_tx_pr != NULL) @@ -950,9 +966,8 @@ static void TASK_SMART_CONFIG (void *pvParameters) { static uint32_t thread_notification; smartConf_init: - wlan_smart_config_enabled = false; connected = false; - // Block task till notification is recieved + // Block task till notification is received thread_notification = ulTaskNotifyTake(pdTRUE, portMAX_DELAY); if (thread_notification) { @@ -967,30 +982,37 @@ static void TASK_SMART_CONFIG (void *pvParameters) { } CHECK_ESP_ERR(esp_smartconfig_set_type(SC_TYPE_ESPTOUCH), smartConf_init) CHECK_ESP_ERR(esp_smartconfig_start(smart_config_callback), smartConf_init) - wlan_smart_config_enabled = true; goto smartConf_start; } goto smartConf_init; smartConf_start: - //mp_printf(&mp_plat_print, "\n-------SmartConfig Started-------\n"); + wlan_smart_config_enabled = true; + mp_printf(&mp_plat_print, "\n-------SmartConfig Started-------\n"); /*create Timer */ wlan_smartConfig_timeout = xTimerCreate("smartConfig_Timer", 60000 / portTICK_PERIOD_MS, 0, 0, wlan_timer_callback); /*start Timer */ xTimerStart(wlan_smartConfig_timeout, 0); while (1) { - uxBits = xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT | ESPTOUCH_DONE_BIT | ESPTOUCH_STOP_BIT, true, false, portMAX_DELAY); + uxBits = xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT | ESPTOUCH_DONE_BIT | ESPTOUCH_STOP_BIT | ESPTOUCH_SLEEP_STOP_BIT, true, false, portMAX_DELAY); if(uxBits & ESPTOUCH_STOP_BIT) { + wlan_smart_config_enabled = false; esp_smartconfig_stop(); //mp_printf(&mp_plat_print, "\nSmart Config Aborted or Timed-out\n"); goto smartConf_init; } + if(uxBits & ESPTOUCH_SLEEP_STOP_BIT) { + esp_smartconfig_stop(); + //mp_printf(&mp_plat_print, "\nSmart Config Aborted because sleep operation has been requested\n"); + goto smartConf_init; + } if(uxBits & CONNECTED_BIT) { //mp_printf(&mp_plat_print, "WiFi Connected to ap\n"); connected = true; } if(uxBits & ESPTOUCH_DONE_BIT) { //mp_printf(&mp_plat_print, "smartconfig over\n"); + wlan_smart_config_enabled = false; esp_smartconfig_stop(); wlan_stop_smartConfig_timer(); //set event flag @@ -1244,11 +1266,25 @@ mp_obj_t wlan_deinit(mp_obj_t self_in) { if (wlan_obj.started) { + bool called_from_sleep = false; + // stop smart config if enabled - if(wlan_smart_config_enabled) - { - xEventGroupSetBits(wifi_event_group, ESPTOUCH_STOP_BIT); - vTaskDelay(100/portTICK_PERIOD_MS); + if(wlan_smart_config_enabled) { + // If the input parameter is not the object itself but a simple boolean, it is interpreted that + // wlan_deinit is called from machine_sleep() + if(mp_obj_get_type(self_in) == &mp_type_bool) { + called_from_sleep = (bool)mp_obj_get_int(self_in); + if(called_from_sleep == true) { + // stop smart config with special event + xEventGroupSetBits(wifi_event_group, ESPTOUCH_SLEEP_STOP_BIT); + vTaskDelay(100/portTICK_PERIOD_MS); + } + } + else { + // stop smart config with original STOP event + xEventGroupSetBits(wifi_event_group, ESPTOUCH_STOP_BIT); + vTaskDelay(100/portTICK_PERIOD_MS); + } } mod_network_deregister_nic(&wlan_obj); @@ -1262,7 +1298,11 @@ mp_obj_t wlan_deinit(mp_obj_t self_in) { /* stop and free wifi resource */ esp_wifi_deinit(); - mod_wlan_is_deinit = true; + // Only free up memory area of country information if this deinit is not called from machine.sleep() + if(called_from_sleep == false) { + free(wlan_obj.country); + wlan_obj.country = NULL; + } wlan_obj.started = false; mod_network_deregister_nic(&wlan_obj); } @@ -2446,6 +2486,9 @@ STATIC mp_obj_t wlan_country(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_ nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); } + if(wlan_obj.country == NULL) { + wlan_obj.country = (wifi_country_t*)malloc(sizeof(wifi_country_t)); + } memcpy(&(wlan_obj.country), &country_config, sizeof(wlan_obj.country)); return mp_const_none; diff --git a/esp32/mods/modwlan.h b/esp32/mods/modwlan.h index 1dcdc6e51a..97f572b15f 100644 --- a/esp32/mods/modwlan.h +++ b/esp32/mods/modwlan.h @@ -73,7 +73,7 @@ typedef struct _wlan_obj_t { uint8_t channel; uint8_t antenna; int8_t max_tx_pwr; - wifi_country_t country; + wifi_country_t* country; // my own ssid, key and mac uint8_t ssid[(MODWLAN_SSID_LEN_MAX + 1)]; From ca673c0cd065618a02b14d93bca4d993ff9e993d Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sun, 25 Oct 2020 13:17:50 +0100 Subject: [PATCH 08/46] Small changes --- esp32/mods/modbt.c | 8 +++++++- esp32/mods/modmachine.c | 1 + esp32/mods/modwlan.c | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index 47594e21b5..6bfbe9d6a8 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -1436,7 +1436,13 @@ static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ /* Initiate a background connection, esp_ble_gattc_open returns immediately */ if (ESP_OK != esp_ble_gattc_open(bt_obj.gattc_if, bufinfo.buf, BLE_ADDR_TYPE_PUBLIC, true)) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); + // Only drop exception if not called from bt_resume() API, otherwise return with mp_const_none on error + if(mod_bt_allow_resume_deinit == false) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); + } + else { + return mp_const_none; + } } MP_THREAD_GIL_EXIT(); diff --git a/esp32/mods/modmachine.c b/esp32/mods/modmachine.c index 9b1acd228d..40b2e71571 100644 --- a/esp32/mods/modmachine.c +++ b/esp32/mods/modmachine.c @@ -442,6 +442,7 @@ STATIC mp_obj_t machine_sleep (uint n_args, const mp_obj_t *arg) { { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "Wifi or BT not stopped before sleep")); } + /* resume wlan */ wlan_resume(reconnect); /* resume bt */ diff --git a/esp32/mods/modwlan.c b/esp32/mods/modwlan.c index cdb9f387f9..81efbd1818 100644 --- a/esp32/mods/modwlan.c +++ b/esp32/mods/modwlan.c @@ -988,7 +988,6 @@ static void TASK_SMART_CONFIG (void *pvParameters) { smartConf_start: wlan_smart_config_enabled = true; - mp_printf(&mp_plat_print, "\n-------SmartConfig Started-------\n"); /*create Timer */ wlan_smartConfig_timeout = xTimerCreate("smartConfig_Timer", 60000 / portTICK_PERIOD_MS, 0, 0, wlan_timer_callback); /*start Timer */ @@ -2489,7 +2488,7 @@ STATIC mp_obj_t wlan_country(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_ if(wlan_obj.country == NULL) { wlan_obj.country = (wifi_country_t*)malloc(sizeof(wifi_country_t)); } - memcpy(&(wlan_obj.country), &country_config, sizeof(wlan_obj.country)); + memcpy(wlan_obj.country, &country_config, sizeof(wifi_country_t)); return mp_const_none; } From e3f3b417b4c4f1b064ff038cf160d84c2d5f0c2e Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sun, 25 Oct 2020 13:59:47 +0100 Subject: [PATCH 09/46] Adding these changes because looks good and even they not needed with esp-idf 3.3.1 adding them to keep sync with the FW with esp-idf 4.1 --- esp32/mods/modbt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index 6bfbe9d6a8..831daa248b 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -389,6 +389,10 @@ void bt_resume(bool reconnect) nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Bluetooth enable failed")); } + esp_ble_gap_register_callback(gap_events_handler); + esp_ble_gattc_register_callback(gattc_events_handler); + esp_ble_gatts_register_callback(gatts_event_handler); + esp_ble_gattc_app_register(MOD_BT_CLIENT_APP_ID); esp_ble_gatts_app_register(MOD_BT_SERVER_APP_ID); From c3e7b6cc3faf81df44fd7a0cdfe8665662d4d812 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Wed, 28 Oct 2020 11:12:58 +0100 Subject: [PATCH 10/46] pygate: reset the JIT queue margins reverts: 8c99657 --- esp32/pygate/lora_pkt_fwd/jitqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/pygate/lora_pkt_fwd/jitqueue.c b/esp32/pygate/lora_pkt_fwd/jitqueue.c index 7241627032..c078e2f39b 100644 --- a/esp32/pygate/lora_pkt_fwd/jitqueue.c +++ b/esp32/pygate/lora_pkt_fwd/jitqueue.c @@ -42,7 +42,7 @@ Maintainer: Michael Coracin /* --- PRIVATE CONSTANTS & TYPES -------------------------------------------- */ #define TX_START_DELAY 1500 /* microseconds */ /* TODO: get this value from HAL? */ -#define TX_MARGIN_DELAY 1000000 /* Packet overlap margin in microseconds */ +#define TX_MARGIN_DELAY 1000 /* Packet overlap margin in microseconds */ /* TODO: How much margin should we take? */ #define TX_JIT_DELAY 50000 /* Pre-delay to program packet for TX in microseconds */ #define TX_MAX_ADVANCE_DELAY ((JIT_NUM_BEACON_IN_QUEUE + 1) * 128 * 1E6) /* Maximum advance delay accepted for a TX packet, compared to current time */ From 9f4489611162f559c4eb407009211b397c62e97b Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Tue, 3 Nov 2020 17:54:41 +0100 Subject: [PATCH 11/46] Resume the BT Connection from the original list if connection was not successfully established during resume so GC can free up the area --- esp32/mods/modbt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index 831daa248b..e38bd2ef84 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -428,6 +428,10 @@ void bt_resume(bool reconnect) // As modbt_connect appends the new connection to the original list, it needs to be removed because it is not needed mp_obj_list_remove((void *)&MP_STATE_PORT(btc_conn_list), new_connection_obj); } + else { + // Remove the old connection from the original list because connection could not be established with it + mp_obj_list_remove((void *)&MP_STATE_PORT(btc_conn_list), connection_obj); + } } /* See if there was an advertisement active before Sleep */ From da9f54514263076f0164675f76ec5e7493ec7ab3 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Thu, 12 Nov 2020 20:01:32 +0100 Subject: [PATCH 12/46] Update _terminal.py Fix terminal redirection --- esp32/frozen/Pybytes/_terminal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esp32/frozen/Pybytes/_terminal.py b/esp32/frozen/Pybytes/_terminal.py index 9906a1ba2d..7125ff5729 100644 --- a/esp32/frozen/Pybytes/_terminal.py +++ b/esp32/frozen/Pybytes/_terminal.py @@ -7,13 +7,14 @@ ''' from machine import UART +import os class Terminal: def __init__(self, pybytes_protocol): self.__pybytes_protocol = pybytes_protocol - self.original_terminal = UART(0, 115200) + self.original_terminal = os.dupterm() self.message_from_pybytes = False self.message_to_send = '' From 944d708bda908679fbc8ce9b95e1a87ceb082cf4 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Thu, 27 Aug 2020 15:47:53 +0200 Subject: [PATCH 13/46] lorapf: add pygate_reset() to power cycle the module this will reset the esp32 and the LTE modem on the GPy this requires PIC FW v12 --- esp32/mods/modmachine.c | 8 ++++++ esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c | 35 ++++++++++++++++++++++++ esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h | 1 + 3 files changed, 44 insertions(+) diff --git a/esp32/mods/modmachine.c b/esp32/mods/modmachine.c index 40b2e71571..b5d07bfd3c 100644 --- a/esp32/mods/modmachine.c +++ b/esp32/mods/modmachine.c @@ -287,6 +287,13 @@ STATIC mp_obj_t machine_pygate_deinit (void) { } STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_pygate_deinit_obj, machine_pygate_deinit); + +STATIC mp_obj_t machine_pygate_reset (void) { + pygate_reset(); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_pygate_reset_obj, machine_pygate_reset); + STATIC mp_obj_t machine_pygate_debug_level (mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { STATIC const mp_arg_t allowed_args[] = { { MP_QSTR_level, MP_ARG_INT, }, @@ -622,6 +629,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { #ifdef PYGATE_ENABLED { MP_OBJ_NEW_QSTR(MP_QSTR_pygate_init), (mp_obj_t)&machine_pygate_init_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_pygate_deinit), (mp_obj_t)&machine_pygate_deinit_obj }, + { MP_OBJ_NEW_QSTR(MP_QSTR_pygate_reset), (mp_obj_t)&machine_pygate_reset_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_pygate_debug_level), (mp_obj_t)&machine_pygate_debug_level_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_pygate_cmd_decode), (mp_obj_t)&machine_pygate_cmd_decode_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_pygate_cmd_get), (mp_obj_t)&machine_pygate_cmd_get_obj }, diff --git a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c index 238a75fd01..97c993a1e3 100644 --- a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c +++ b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c @@ -71,6 +71,9 @@ License: Revised BSD License, see LICENSE.TXT file include in the project #include "py/obj.h" #include "py/mpprint.h" #include "modmachine.h" +#include "machpin.h" +#include "pins.h" +#include "sx1308-config.h" /* -------------------------------------------------------------------------- */ /* --- PRIVATE MACROS ------------------------------------------------------- */ @@ -903,6 +906,38 @@ void lora_gw_init(const char* global_conf) { MSG_INFO("lora_gw_init() done fh=%u high=%u\n", xPortGetFreeHeapSize(), uxTaskGetStackHighWaterMark(NULL)); } +void pygate_reset() { + MSG_INFO("pygate_reset\n"); + + // pull sx1257 and sx1308 reset high, the PIC FW should power cycle the ESP32 as a result + pin_obj_t* sx1308_rst = SX1308_RST_PIN; + pin_config(sx1308_rst, -1, -1, GPIO_MODE_OUTPUT, MACHPIN_PULL_NONE, 0); + pin_obj_t* sx1257_rst = (&PIN_MODULE_P8); + pin_config(sx1257_rst, -1, -1, GPIO_MODE_OUTPUT, MACHPIN_PULL_NONE, 0); + + sx1308_rst->value = 1; + sx1257_rst->value = 1; + + pin_set_value(sx1308_rst); + pin_set_value(sx1257_rst); + + vTaskDelay(5000 / portTICK_PERIOD_MS); + + // if this is still being executed, then it seems the ESP32 reset did not take place + // set the two reset lines low again and stop the lora gw task, to make sure we return to a defined state + MSG_ERROR("pygate_reset failed to reset\n"); + sx1308_rst->value = 0; + sx1257_rst->value = 0; + pin_set_value(sx1308_rst); + pin_set_value(sx1257_rst); + + if (xLoraGwTaskHndl){ + vTaskDelete(xLoraGwTaskHndl); + xLoraGwTaskHndl = NULL; + } + +} + int lora_gw_get_debug_level(){ return debug_level; } diff --git a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h index 160d025856..3b2bbf83d2 100644 --- a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h +++ b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h @@ -28,6 +28,7 @@ Maintainer: Michael Coracin #include "py/mpprint.h" int lora_gw_init(char *); +void pygate_reset(); int lora_gw_get_debug_level(); void lora_gw_set_debug_level(int level); From 58db509e407b6809a6b5848e938471d401c87f79 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Wed, 26 Aug 2020 16:32:19 +0200 Subject: [PATCH 14/46] LTE: check for SIM card before attaching --- esp32/mods/modlte.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index 8a6ac67f01..7552047925 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -860,6 +860,11 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t lte_check_attached(lte_legacyattach_flag); if (lteppp_get_state() < E_LTE_ATTACHING) { + + if ( ! lte_check_sim_present() ) { + nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_RuntimeError, "Sim card not present")); + } + const char *carrier = "standard"; if (!lte_push_at_command("AT+SQNCTM?", LTE_RX_TIMEOUT_MAX_MS)) { if (!lte_push_at_command("AT+SQNCTM?", LTE_RX_TIMEOUT_MAX_MS)) { @@ -913,13 +918,13 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t } else { + // argument 'band' if (args[0].u_obj != mp_const_none) { - // argument 'band' lte_add_band(mp_obj_get_int(args[0].u_obj), is_hw_new_band_support, is_sw_new_band_support, version); } + // argument 'bands' if (args[6].u_obj != mp_const_none){ - // argument 'bands' mp_obj_t *bands; size_t n_bands=0; mp_obj_get_array(args[6].u_obj, &n_bands, &bands); @@ -933,12 +938,14 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t } else { lte_obj.carrier = true; } + + // argument 'cid' if (args[3].u_obj != mp_const_none) { lte_obj.cid = args[3].u_int; } + // argument 'apn' if (args[1].u_obj != mp_const_none || args[4].u_obj != mp_const_none) { - const char* strapn; const char* strtype; @@ -964,11 +971,14 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); } } + + // argument 'log' if (args[2].u_obj == mp_const_false) { lte_push_at_command("AT!=\"disablelog 1\"", LTE_RX_TIMEOUT_MAX_MS); } else { lte_push_at_command("AT!=\"disablelog 0\"", LTE_RX_TIMEOUT_MAX_MS); } + lteppp_set_state(E_LTE_ATTACHING); if (!lte_push_at_command("AT+CFUN=1", LTE_RX_TIMEOUT_MAX_MS)) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); From b822a70f8a97aca73e207e1c90f5d73a56edd66b Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Fri, 6 Nov 2020 17:57:14 +0100 Subject: [PATCH 15/46] lorapf: fix warnings --- esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c | 6 ++--- esp32/pygate/lora_pkt_fwd/trace.h | 28 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c index 97c993a1e3..0938dab46b 100644 --- a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c +++ b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c @@ -230,7 +230,7 @@ static struct lgw_tx_gain_lut_s txlut; /* TX gain table */ static uint32_t tx_freq_min[LGW_RF_CHAIN_NB]; /* lowest frequency supported by TX chain */ static uint32_t tx_freq_max[LGW_RF_CHAIN_NB]; /* highest frequency supported by TX chain */ -int debug_level = INFO_; +int debug_level = LORAPF_INFO_; /* -------------------------------------------------------------------------- */ /* --- PRIVATE FUNCTIONS DECLARATION ---------------------------------------- */ @@ -1358,8 +1358,8 @@ void TASK_lora_gw(void *pvParameters) { } /* display a report */ -#if DEBUG_LEVEL >= INFO_ - if ( debug_level >= INFO_){ +#if LORAPF_DEBUG_LEVEL >= LORAPF_INFO_ + if ( debug_level >= LORAPF_INFO_){ MSG_INFO("[main] report\n##### %s #####\n", stat_timestamp); mp_printf(&mp_plat_print, "### [UPSTREAM] ###\n"); mp_printf(&mp_plat_print, "# RF packets received by concentrator: %u\n", cp_nb_rx_rcv); diff --git a/esp32/pygate/lora_pkt_fwd/trace.h b/esp32/pygate/lora_pkt_fwd/trace.h index 3fbe77ac78..fdc399abdb 100644 --- a/esp32/pygate/lora_pkt_fwd/trace.h +++ b/esp32/pygate/lora_pkt_fwd/trace.h @@ -32,42 +32,42 @@ Maintainer: Michael Coracin #include "py/mpprint.h" // debug levels -#define DEBUG 4 -#define INFO_ 3 -#define WARN_ 2 -#define ERROR 1 +#define LORAPF_DEBUG 4 +#define LORAPF_INFO_ 3 +#define LORAPF_WARN_ 2 +#define LORAPF_ERROR 1 // run time debug level extern int debug_level; // compile time debug level -#define DEBUG_LEVEL INFO_ +#define LORAPF_DEBUG_LEVEL LORAPF_INFO_ #define MSG_DX(LEVEL, fmt, ...) \ do { \ if (debug_level >= LEVEL) \ - mp_printf(&mp_plat_print, "[%u] lorapf: " #LEVEL " " fmt, mp_hal_ticks_ms(), ##__VA_ARGS__); \ + mp_printf(&mp_plat_print, "[%u] " #LEVEL ":" fmt, mp_hal_ticks_ms(), ##__VA_ARGS__); \ } while (0) -#if DEBUG_LEVEL >= DEBUG -#define MSG_DEBUG(...) MSG_DX(DEBUG, __VA_ARGS__) +#if LORAPF_DEBUG_LEVEL >= LORAPF_DEBUG +#define MSG_DEBUG(...) MSG_DX(LORAPF_DEBUG, __VA_ARGS__) #else #define MSG_DEBUG(...) (void)0 #endif -#if DEBUG_LEVEL >= INFO_ -#define MSG_INFO(...) MSG_DX(INFO_, __VA_ARGS__) +#if LORAPF_DEBUG_LEVEL >= LORAPF_INFO_ +#define MSG_INFO(...) MSG_DX(LORAPF_INFO_, __VA_ARGS__) #else #define MSG_INFO(...) (void)0 #endif -#if DEBUG_LEVEL >= WARN_ -#define MSG_WARN(...) MSG_DX(WARN_, __VA_ARGS__) +#if LORAPF_DEBUG_LEVEL >= LORAPF_WARN_ +#define MSG_WARN(...) MSG_DX(LORAPF_WARN_, __VA_ARGS__) #else #define MSG_WARN(...) (void)0 #endif -#if DEBUG_LEVEL >= ERROR -#define MSG_ERROR(...) MSG_DX(ERROR, __VA_ARGS__) +#if LORAPF_DEBUG_LEVEL >= LORAPF_ERROR +#define MSG_ERROR(...) MSG_DX(LORAPF_ERROR, __VA_ARGS__) #else #define MSG_ERROR(...) (void)0 #endif From 7d2e8e053c8d755b0f528b0c3ff67aeefcf7b556 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Mon, 9 Nov 2020 12:20:52 +0100 Subject: [PATCH 16/46] str_utils: add hexdump() --- esp32/util/str_utils.c | 41 +++++++++++++++++++++++++++++++++++++++++ esp32/util/str_utils.h | 2 ++ 2 files changed, 43 insertions(+) diff --git a/esp32/util/str_utils.c b/esp32/util/str_utils.c index 8702e75610..beb94908f9 100644 --- a/esp32/util/str_utils.c +++ b/esp32/util/str_utils.c @@ -1,5 +1,6 @@ #include "str_utils.h" #include +#include /** * Create a string representation of a uint8 @@ -18,3 +19,43 @@ void sprint_binary_u8(char* s, uint8_t v){ ); } +/* hexdump a buffer +*/ +void hexdump(const uint8_t* buf, size_t len){ + const size_t line_len = 16; + uint8_t line[line_len+1]; + memset(line, ' ', line_len); + line[line_len] = '\0'; + + for ( size_t i = 0; i < len; ++i) { + uint8_t c = buf[i]; + printf("%02x ", c); + if ( (c >= (uint8_t)'a' && c <= (uint8_t)'z') + || (c >= (uint8_t)'A' && c <= (uint8_t)'Z') + || (c >= (uint8_t)'0' && c <= (uint8_t)'9') ) + { + line[i%line_len] = c; + } else { + line[i%line_len] = '.'; + } + + // space after 8 bytes + if (i%16 == 7) + printf(" "); + // end of line after 16 bytes + if (i%16==15){ + printf(" |%s|\n", line); + memset(line, ' ', line_len); + } + } + if ( len % line_len ){ + // space after 8 bytes + if ( len % line_len < 7) + printf(" "); + // spaces for bytes we didn't have to print + for ( size_t j = line_len; j > len % line_len; j-- ){ + printf(" "); + } + printf(" |%s|\n", line); + } +} diff --git a/esp32/util/str_utils.h b/esp32/util/str_utils.h index 258b6d1dc0..298ed561b7 100644 --- a/esp32/util/str_utils.h +++ b/esp32/util/str_utils.h @@ -14,4 +14,6 @@ void sprint_binary_u8(char* s, uint8_t v); +void hexdump(const uint8_t* buf, size_t len); + #endif From 49373491a14347be129a2fd8cea6420f01a52a0e Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Mon, 9 Nov 2020 12:25:32 +0100 Subject: [PATCH 17/46] lte: debug MSG and state --- esp32/lte/lteppp.c | 231 ++++++++++++++++++++++++++++++++++++-------- esp32/lte/lteppp.h | 4 + esp32/mods/modlte.c | 20 +++- 3 files changed, 211 insertions(+), 44 deletions(-) diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index 500d8af94f..6b2fc1fe50 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -60,10 +60,21 @@ static char lteppp_trx_buffer[LTE_UART_BUFFER_SIZE + 1]; #ifdef LTE_DEBUG_BUFF static lte_log_t lteppp_log; #endif +//#define LTEPPP_DEBUG +#ifdef LTEPPP_DEBUG +// #define MSG(fmt, ...) printf("[%u] LTEPPP %s: " fmt, mp_hal_ticks_ms(), __func__, ##__VA_ARGS__) +#define MSG(fmt, ...) do { \ + printf("[%u] LTEPPP %s: " fmt, mp_hal_ticks_ms(), __func__, ##__VA_ARGS__); \ + lteppp_print_states(); \ + } while (0) +#else +#define MSG(fmt, ...) (void)0 +#endif + static char lteppp_queue_buffer[LTE_UART_BUFFER_SIZE]; static uart_dev_t* lteppp_uart_reg; -static QueueHandle_t xCmdQueue; -static QueueHandle_t xRxQueue; +static QueueHandle_t xCmdQueue = NULL; +static QueueHandle_t xRxQueue = NULL; static lte_state_t lteppp_lte_state; static lte_legacy_t lteppp_lte_legacy; static SemaphoreHandle_t xLTESem; @@ -83,7 +94,7 @@ static ltepppconnstatus_t lteppp_connstatus = LTE_PPP_IDLE; static ip_addr_t ltepp_dns_info[2]={0}; -static QueueHandle_t uart0_queue; +static QueueHandle_t uart0_queue = NULL; static bool lte_uart_break_evt = false; @@ -97,12 +108,16 @@ static bool lteppp_send_at_cmd(const char *cmd, uint32_t timeout); static bool lteppp_check_sim_present(void); static void lteppp_status_cb (ppp_pcb *pcb, int err_code, void *ctx); static uint32_t lteppp_output_callback(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx); +#ifdef LTEPPP_DEBUG +static void lteppp_print_states(); +#endif /****************************************************************************** DEFINE PUBLIC FUNCTIONS ******************************************************************************/ void connect_lte_uart (void) { + MSG("\n"); // initialize the UART interface uart_config_t config; @@ -116,10 +131,10 @@ void connect_lte_uart (void) { uart_param_config(LTE_UART_ID, &config); // configure the UART pins - pin_config(MICROPY_LTE_TX_PIN, -1, U2TXD_OUT_IDX, GPIO_MODE_OUTPUT, MACHPIN_PULL_NONE, 1); - pin_config(MICROPY_LTE_RX_PIN, U2RXD_IN_IDX, -1, GPIO_MODE_INPUT, MACHPIN_PULL_NONE, 1); - pin_config(MICROPY_LTE_RTS_PIN, -1, U2RTS_OUT_IDX, GPIO_MODE_OUTPUT, MACHPIN_PULL_NONE, 1); - pin_config(MICROPY_LTE_CTS_PIN, U2CTS_IN_IDX, -1, GPIO_MODE_INPUT, MACHPIN_PULL_NONE, 1); + pin_config(MICROPY_LTE_TX_PIN, -1, U2TXD_OUT_IDX, GPIO_MODE_OUTPUT, MACHPIN_PULL_NONE, 1); + pin_config(MICROPY_LTE_RX_PIN, U2RXD_IN_IDX, -1, GPIO_MODE_INPUT, MACHPIN_PULL_NONE, 1); + pin_config(MICROPY_LTE_RTS_PIN, -1, U2RTS_OUT_IDX, GPIO_MODE_OUTPUT, MACHPIN_PULL_NONE, 1); + pin_config(MICROPY_LTE_CTS_PIN, U2CTS_IN_IDX, -1, GPIO_MODE_INPUT, MACHPIN_PULL_NONE, 1); vTaskDelay(5 / portTICK_RATE_MS); @@ -138,10 +153,13 @@ void connect_lte_uart (void) { uart_set_rts(LTE_UART_ID, false); xTaskCreatePinnedToCore(TASK_UART_EVT, "LTE_UART_EVT", 2048 / sizeof(StackType_t), NULL, 12, &xLTEUartEvtTaskHndl, 1); + + MSG("done\n"); } void lteppp_init(void) { + MSG("\n"); if (!xLTETaskHndl) { lteppp_lte_state = E_LTE_INIT; @@ -164,12 +182,14 @@ void lteppp_init(void) { lteppp_log.log = malloc(LTE_LOG_BUFF_SIZE); #endif } + MSG("done\n"); } void lteppp_start (void) { uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_CTS_RTS, 64); vTaskDelay(5); } + #ifdef LTE_DEBUG_BUFF char* lteppp_get_log_buff(void) { @@ -189,6 +209,7 @@ char* lteppp_get_log_buff(void) return lteppp_log.log; } #endif + lte_modem_conn_state_t lteppp_modem_state(void) { lte_modem_conn_state_t state; @@ -219,6 +240,7 @@ void lteppp_set_legacy(lte_legacy_t legacy) { } void lteppp_connect (void) { + MSG("\n"); uart_flush(LTE_UART_ID); vTaskDelay(25); pppapi_set_default(lteppp_pcb); @@ -226,12 +248,15 @@ void lteppp_connect (void) { pppapi_set_auth(lteppp_pcb, PPPAUTHTYPE_PAP, "", ""); pppapi_connect(lteppp_pcb, 0); lteppp_connstatus = LTE_PPP_IDLE; + MSG("done\n"); } void lteppp_disconnect(void) { + MSG("\n"); pppapi_close(lteppp_pcb, 0); vTaskDelay(150); lteppp_connstatus = LTE_PPP_IDLE; + MSG("done\n"); } void lteppp_send_at_command (lte_task_cmd_data_t *cmd, lte_task_rsp_data_t *rsp) { @@ -371,37 +396,40 @@ lte_legacy_t lteppp_get_legacy(void) { } void lteppp_deinit (void) { - + MSG("\n"); uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_DISABLE, 0); uart_set_rts(LTE_UART_ID, false); xSemaphoreTake(xLTESem, portMAX_DELAY); lteppp_lte_state = E_LTE_INIT; lteppp_modem_conn_state = E_LTE_MODEM_DISCONNECTED; xSemaphoreGive(xLTESem); + MSG("done\n"); } uint32_t lteppp_ipv4(void) { return lte_ipv4addr; } -bool ltepp_is_ppp_conn_up(void) -{ +bool ltepp_is_ppp_conn_up(void) { + MSG("\n"); return ltepp_ppp_conn_up; } -void lteppp_suspend(void) -{ +void lteppp_suspend(void) { + MSG("\n"); lteppp_connstatus = LTE_PPP_SUSPENDED; } -void lteppp_resume(void) -{ +void lteppp_resume(void) { + MSG("\n"); lteppp_connstatus = LTE_PPP_RESUMED; } + /****************************************************************************** DEFINE PRIVATE FUNCTIONS ******************************************************************************/ static void TASK_LTE (void *pvParameters) { + MSG("\n"); bool sim_present; lte_task_cmd_data_t *lte_task_cmd = (lte_task_cmd_data_t *)lteppp_trx_buffer; lte_task_rsp_data_t *lte_task_rsp = (lte_task_rsp_data_t *)lteppp_trx_buffer; @@ -411,11 +439,12 @@ static void TASK_LTE (void *pvParameters) { connect_lte_uart(); modem_init: - + MSG("modem_init\n"); thread_notification = ulTaskNotifyTake(pdTRUE, portMAX_DELAY); if (thread_notification) { + MSG("notif\n"); xSemaphoreTake(xLTE_modem_Conn_Sem, portMAX_DELAY); xSemaphoreTake(xLTESem, portMAX_DELAY); lteppp_modem_conn_state = E_LTE_MODEM_CONNECTING; @@ -426,6 +455,7 @@ static void TASK_LTE (void *pvParameters) { // exit PPP session if applicable if(lteppp_send_at_cmd("+++", LTE_PPP_BACK_OFF_TIME_MS)) { + MSG("+++\n"); vTaskDelay(LTE_PPP_BACK_OFF_TIME_MS / portTICK_RATE_MS); while(!lteppp_send_at_cmd("AT", LTE_RX_TIMEOUT_MIN_MS)) { @@ -449,6 +479,7 @@ static void TASK_LTE (void *pvParameters) { vTaskDelay(LTE_PPP_BACK_OFF_TIME_MS / portTICK_RATE_MS); if (lteppp_send_at_cmd("+++", LTE_PPP_BACK_OFF_TIME_MS)) { + MSG("+++ after AT\n"); while(!lteppp_send_at_cmd("AT", LTE_RX_TIMEOUT_MIN_MS)) { if (at_trials >= LTE_AT_CMD_TRIALS) { @@ -518,6 +549,7 @@ static void TASK_LTE (void *pvParameters) { lteppp_modem_conn_state = E_LTE_MODEM_CONNECTED; xSemaphoreGive(xLTESem); xSemaphoreGive(xLTE_modem_Conn_Sem); + MSG("forever\n"); lte_state_t state; for (;;) { vTaskDelay(LTE_TASK_PERIOD_MS); @@ -531,6 +563,7 @@ static void TASK_LTE (void *pvParameters) { xSemaphoreGive(xLTESem); state = lteppp_get_state(); if (xQueueReceive(xCmdQueue, lteppp_trx_buffer, 0)) { + MSG("cmd\n"); bool expect_continuation = lte_task_cmd->expect_continuation; lteppp_send_at_cmd_exp(lte_task_cmd->data, lte_task_cmd->timeout, NULL, &(lte_task_rsp->data_remaining), lte_task_cmd->dataLen, lte_task_cmd->expect_continuation); if(!expect_continuation) @@ -548,15 +581,19 @@ static void TASK_LTE (void *pvParameters) { // check for IP connection if(lteppp_ipv4() > 0) { + if ( ! ltepp_ppp_conn_up) + MSG("set ltepp_ppp_conn_up\n"); ltepp_ppp_conn_up = true; } else { + MSG("else, ppp, no ipv4\n"); if(ltepp_ppp_conn_up == true) { ltepp_ppp_conn_up = false; lteppp_set_state(E_LTE_ATTACHED); } + MSG("else, ppp, no ipv4 done\n"); } // wait for characters received uart_get_buffered_data_len(LTE_UART_ID, &rx_len); @@ -571,6 +608,9 @@ static void TASK_LTE (void *pvParameters) { } else { + if ( ltepp_ppp_conn_up) + MSG("set ltepp_ppp_conn_up to false\n"); + ltepp_ppp_conn_up = false; } } @@ -579,8 +619,7 @@ static void TASK_LTE (void *pvParameters) { goto modem_init; } -static void TASK_UART_EVT (void *pvParameters) -{ +static void TASK_UART_EVT (void *pvParameters) { uart_event_t event; uint8_t buff[50] = {0}; for(;;) { @@ -609,9 +648,14 @@ static void TASK_UART_EVT (void *pvParameters) case UART_BREAK: if (E_LTE_PPP == lteppp_get_state()) { lte_uart_break_evt = true; + MSG("uart_break evt and ppp, so break=true\n"); + } else { + // this should not happen, because the sequans modem only issues a break event when in ppp + MSG("uart_break evt, but no ppp, so do nothing\n"); } break; default: + MSG("evt %u %u\n", event.type, event.size); break; } } @@ -739,8 +783,8 @@ static void lteppp_status_cb (ppp_pcb *pcb, int err_code, void *ctx) { switch (err_code) { case PPPERR_NONE: -// printf("status_cb: Connected\n"); - #if PPP_IPV4_SUPPORT + MSG("Connected\n"); +#if PPP_IPV4_SUPPORT lte_gw = pppif->gw.u_addr.ip4.addr; lte_netmask = pppif->netmask.u_addr.ip4.addr; lte_ipv4addr = pppif->ip_addr.u_addr.ip4.addr; @@ -749,59 +793,168 @@ static void lteppp_status_cb (ppp_pcb *pcb, int err_code, void *ctx) { ltepp_dns_info[0] = dns_getserver(0); ltepp_dns_info[1] = dns_getserver(1); } -// printf("ipaddr = %s\n", ipaddr_ntoa(&pppif->ip_addr)); -// printf("gateway = %s\n", ipaddr_ntoa(&pppif->gw)); -// printf("netmask = %s\n", ipaddr_ntoa(&pppif->netmask)); - #endif - #if PPP_IPV6_SUPPORT + MSG("ipaddr = %s\n", ipaddr_ntoa(&pppif->ip_addr)); + MSG("gateway = %s\n", ipaddr_ntoa(&pppif->gw)); + MSG("netmask = %s\n", ipaddr_ntoa(&pppif->netmask)); +#endif +#if PPP_IPV6_SUPPORT memcpy(lte_ipv6addr.addr, netif_ip6_addr(pppif, 0), sizeof(lte_ipv4addr)); -// printf("ip6addr = %s\n", ip6addr_ntoa(netif_ip6_addr(pppif, 0))); - #endif + MSG("ip6addr = %s\n", ip6addr_ntoa(netif_ip6_addr(pppif, 0))); +#endif break; case PPPERR_PARAM: -// printf("status_cb: Invalid parameter\n"); + MSG("Invalid parameter\n"); break; case PPPERR_OPEN: -// printf("status_cb: Unable to open PPP session\n"); + MSG("Unable to open PPP session\n"); break; case PPPERR_DEVICE: -// printf("status_cb: Invalid I/O device for PPP\n"); + MSG("Invalid I/O device for PPP\n"); break; case PPPERR_ALLOC: -// printf("status_cb: Unable to allocate resources\n"); + MSG("Unable to allocate resources\n"); break; case PPPERR_USER: -// printf("status_cb: User interrupt (disconnected)\n"); + MSG("User interrupt (disconnected)\n"); lte_ipv4addr = 0; memset(lte_ipv6addr.addr, 0, sizeof(lte_ipv4addr)); break; case PPPERR_CONNECT: -// printf("status_cb: Connection lost\n"); + MSG("\n\n\nConnection lost\n"); lte_ipv4addr = 0; memset(lte_ipv6addr.addr, 0, sizeof(lte_ipv4addr)); break; case PPPERR_AUTHFAIL: -// printf("status_cb: Failed authentication challenge\n"); + MSG("Failed authentication challenge\n"); break; case PPPERR_PROTOCOL: -// printf("status_cb: Failed to meet protocol\n"); + MSG("Failed to meet protocol\n"); break; case PPPERR_PEERDEAD: -// printf("status_cb: Connection timeout\n"); + MSG("Connection timeout\n"); break; case PPPERR_IDLETIMEOUT: -// printf("status_cb: Idle Timeout\n"); + MSG("Idle Timeout\n"); break; case PPPERR_CONNECTTIME: -// printf("status_cb: Max connect time reached\n"); + MSG("Max connect time reached\n"); break; case PPPERR_LOOPBACK: -// printf("status_cb: Loopback detected\n"); + MSG("Loopback detected\n"); break; default: -// printf("status_cb: Unknown error code %d\n", err_code); + MSG("Unknown error code %d\n", err_code); lte_ipv4addr = 0; memset(lte_ipv6addr.addr, 0, sizeof(lte_ipv4addr)); break; } } + +#ifdef LTEPPP_DEBUG +static void lteppp_print_states(){ + if (!xLTESem) + return; + static lte_modem_conn_state_t last_c = 0xff; + lte_modem_conn_state_t c = lteppp_modem_state(); + static lte_state_t last_s = 0xff; + lte_state_t s = lteppp_get_state(); + static bool last_u = false; + bool u = ltepp_ppp_conn_up; + static ltepppconnstatus_t last_C = 0xff; + ltepppconnstatus_t C = lteppp_connstatus; + static bool last_b = false; + bool b = lte_uart_break_evt; + static size_t last_cmd = 0; + size_t cmd = 0; + if (xCmdQueue) + cmd = uxQueueMessagesWaiting(xCmdQueue); + static size_t last_rx = 0; + size_t rx = 0; + if (xRxQueue) + rx = uxQueueMessagesWaiting(xRxQueue); + static size_t last_uart = 0; + size_t uart = 0; + if (uart0_queue) + uart = uxQueueMessagesWaiting(uart0_queue); + + + if ( last_c != c + || last_s != s + || last_u != u + || last_C != C + || last_b != b + || last_cmd != cmd + || last_rx != rx + || last_uart != uart + ) { + + + printf("c=%u", c); // lteppp_modem_conn_state + switch(c){ + case E_LTE_MODEM_CONNECTED: + printf("=CTED "); + break; + case E_LTE_MODEM_CONNECTING: + printf("=CING "); + break; + case E_LTE_MODEM_DISCONNECTED: + printf("=DISC "); + break; + } + + printf("s=%u", s); // lteppp_lte_state + switch (s){ + case E_LTE_INIT: + printf("=INIT "); + break; + case E_LTE_IDLE: + printf("=IDLE "); + break; + case E_LTE_ATTACHING: + printf("=AING "); + break; + case E_LTE_ATTACHED: + printf("=ATTA "); + break; + case E_LTE_PPP: + printf("=PPP "); + break; + case E_LTE_SUSPENDED: + printf("=SUSP "); + } + + printf("u=%u ", u); + + printf("C=%u", C); + switch(C){ + case LTE_PPP_IDLE: + printf("=IDLE "); + break; + case LTE_PPP_RESUMED: + printf("=RESU "); + break; + case LTE_PPP_SUSPENDED: + printf("=SUSP "); + break; + } + printf("b=%u ", b); + + if (xCmdQueue) + printf("cmd[%u] ", uxQueueMessagesWaiting(xCmdQueue)); + if (xRxQueue) + printf("rx[%u] ", uxQueueMessagesWaiting(xRxQueue)); + if (uart0_queue) + printf("u0[%u] ", uxQueueMessagesWaiting(uart0_queue)); + printf("\n"); + + last_c = c; + last_s = s; + last_u = u; + last_C = C; + last_b = b; + last_cmd = cmd; + last_rx = rx; + last_uart = uart; + } +} +#endif diff --git a/esp32/lte/lteppp.h b/esp32/lte/lteppp.h index c8e608dee3..8ca52c5d7b 100644 --- a/esp32/lte/lteppp.h +++ b/esp32/lte/lteppp.h @@ -63,6 +63,7 @@ typedef enum { E_LTE_MODEM_CONNECTING, E_LTE_MODEM_DISCONNECTED } lte_modem_conn_state_t; + #ifdef LTE_DEBUG_BUFF typedef struct { char* log; @@ -70,12 +71,14 @@ typedef struct { bool truncated; } lte_log_t; #endif + typedef struct { uint32_t timeout; char data[LTE_AT_CMD_DATA_SIZE_MAX]; size_t dataLen; bool expect_continuation; } lte_task_cmd_data_t; + #pragma pack(1) typedef struct { char data[LTE_UART_BUFFER_SIZE]; @@ -127,6 +130,7 @@ extern void lteppp_suspend(void); extern void lteppp_resume(void); extern void lteppp_set_default_inf(void); + #ifdef LTE_DEBUG_BUFF extern char* lteppp_get_log_buff(void); #endif diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index 7552047925..1f18c0e129 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -151,6 +151,10 @@ STATIC mp_obj_t lte_deinit(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t STATIC mp_obj_t lte_disconnect(mp_obj_t self_in); static void lte_set_default_inf(void); static void lte_callback_handler(void* arg); + +//#define MSG(fmt, ...) printf("[%u] modlte: " fmt, mp_hal_ticks_ms(), ##__VA_ARGS__) +#define MSG(fmt, ...) (void)0 + /****************************************************************************** DEFINE PUBLIC FUNCTIONS ******************************************************************************/ @@ -188,9 +192,12 @@ static void lte_callback_handler(void* arg) lte_obj_t *self = arg; if (self->handler && self->handler != mp_const_none) { - + MSG("call callback(handler=%p, arg=%p)\n", self->handler_arg, self->handler); mp_call_function_1(self->handler, self->handler_arg); + }else{ + MSG("no callback\n"); } + } static bool lte_push_at_command_ext_cont (char *cmd_str, uint32_t timeout, const char *expected_rsp, size_t len, bool continuation) @@ -1064,15 +1071,15 @@ STATIC mp_obj_t lte_suspend(mp_obj_t self_in) { lte_check_init(); if (lteppp_get_state() == E_LTE_PPP) { lteppp_suspend(); - //printf("Pausing ppp...\n"); + MSG("Pausing ppp...\n"); lte_pause_ppp(); - //printf("Pausing ppp done...\n"); + MSG("Pausing ppp done...\n"); lteppp_set_state(E_LTE_SUSPENDED); while (true) { mp_hal_delay_ms(LTE_RX_TIMEOUT_MIN_MS); - //printf("Sending AT...\n"); + MSG("Sending AT...\n"); if (lte_push_at_command("AT", LTE_RX_TIMEOUT_MAX_MS)) { - //printf("OK\n"); + MSG("OK\n"); break; } } @@ -1177,11 +1184,13 @@ STATIC mp_obj_t lte_resume(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t } if (lte_push_at_command_ext("ATO", LTE_RX_TIMEOUT_MAX_MS, LTE_CONNECT_RSP, strlen("ATO") )) { + MSG("resume ATO OK\n"); lteppp_connect(); lteppp_resume(); lteppp_set_state(E_LTE_PPP); vTaskDelay(1500); } else { + MSG("resume ATO failed -> reconnect\n"); lteppp_disconnect(); lteppp_set_state(E_LTE_ATTACHED); lte_check_attached(lte_legacyattach_flag); @@ -1190,6 +1199,7 @@ STATIC mp_obj_t lte_resume(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t } else if (lteppp_get_state() == E_LTE_PPP) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "modem already connected")); } else { + MSG("resume do nothing\n"); //Do Nothing } return mp_const_none; From 9cc50b2dc9279af9f8269385efeb9f9136707e37 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Tue, 10 Nov 2020 19:43:13 +0100 Subject: [PATCH 18/46] lte: callback LTE_EVENT_BREAK - disable the existing LTE_EVENT_COVERAGE_LOST - disable sending +++ at a break --- esp32/lte/lteppp.c | 50 ++++++++++++++++++++++++--------------------- esp32/mods/modlte.c | 31 ++++++++++++++++------------ esp32/mods/modlte.h | 25 ++++++++++++++--------- 3 files changed, 60 insertions(+), 46 deletions(-) diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index 6b2fc1fe50..220caa1ac6 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -29,6 +29,7 @@ #include "esp32_mphal.h" #include "lwip/dns.h" #include "modlte.h" +#include "str_utils.h" /****************************************************************************** DEFINE CONSTANTS @@ -569,11 +570,11 @@ static void TASK_LTE (void *pvParameters) { if(!expect_continuation) xQueueSend(xRxQueue, (void *)lte_task_rsp, (TickType_t)portMAX_DELAY); } - else if(state == E_LTE_PPP && lte_uart_break_evt) - { - lteppp_send_at_cmd("+++", LTE_PPP_BACK_OFF_TIME_MS); - lteppp_suspend(); - } + //else if(state == E_LTE_PPP && lte_uart_break_evt) + //{ + // lteppp_send_at_cmd("+++", LTE_PPP_BACK_OFF_TIME_MS); + // lteppp_suspend(); + //} else { if (state == E_LTE_PPP) { @@ -621,34 +622,37 @@ static void TASK_LTE (void *pvParameters) { static void TASK_UART_EVT (void *pvParameters) { uart_event_t event; - uint8_t buff[50] = {0}; + //uint8_t buff[50] = {0}; for(;;) { //Waiting for UART event. if(xQueueReceive(uart0_queue, (void * )&event, (portTickType)portMAX_DELAY)) { - switch(event.type) - { + switch(event.type) { case UART_DATA: - if (lte_uart_break_evt) { - - uint32_t rx_len = uart_read_bytes(LTE_UART_ID, buff, LTE_UART_BUFFER_SIZE, - LTE_TRX_WAIT_MS(LTE_UART_BUFFER_SIZE) / portTICK_RATE_MS); - - if ((rx_len) && (strstr((const char *)buff, "OK") != NULL)) - { - if(strstr((const char *)buff, "+CEREG: 4") != NULL) - { - modlte_urc_events(LTE_EVENT_COVERAGE_LOST); - } - - lte_uart_break_evt = false; - } - } + // if (lte_uart_break_evt) { + + // uint32_t rx_len = uart_read_bytes(LTE_UART_ID, buff, LTE_UART_BUFFER_SIZE, + // LTE_TRX_WAIT_MS(LTE_UART_BUFFER_SIZE) / portTICK_RATE_MS); + + // MSG("uart_data evt + break (%u)\n", rx_len); + // hexdump(buff, rx_len); + // if ((rx_len) && (strstr((const char *)buff, "OK") != NULL)) { + // MSG("OK\n"); + // if(strstr((const char *)buff, "+CEREG: 4") != NULL) { + // MSG("CEREG 4, trigger callback\n"); + // modlte_urc_events(LTE_EVENT_COVERAGE_LOST); + // } + // lte_uart_break_evt = false; + // MSG("break=false\n"); + // } + // } break; case UART_BREAK: + // MSG("LTE_UART: uart_break evt, ppp=%u (4=ppp)\n", lteppp_get_state()); if (E_LTE_PPP == lteppp_get_state()) { lte_uart_break_evt = true; MSG("uart_break evt and ppp, so break=true\n"); + modlte_urc_events(LTE_EVENT_BREAK); } else { // this should not happen, because the sequans modem only issues a break event when in ppp MSG("uart_break evt, but no ppp, so do nothing\n"); diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index 1f18c0e129..d1e825b426 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -105,7 +105,7 @@ /****************************************************************************** DECLARE PRIVATE DATA ******************************************************************************/ -static lte_obj_t lte_obj = {.init = false, .trigger = LTE_TRIGGER_NONE, .events = 0, .handler = NULL, .handler_arg = NULL}; +static lte_obj_t lte_obj = {.init = false, .trigger = LTE_EVENT_NONE, .events = 0, .handler = NULL, .handler_arg = NULL}; static lte_task_rsp_data_t modlte_rsp; uart_dev_t* uart_driver_0 = &UART0; uart_dev_t* uart_driver_lte = &UART2; @@ -171,18 +171,22 @@ void modlte_start_modem(void) void modlte_urc_events(lte_events_t events) { - switch(events) + // set the events to report to the user, the clearing is done upon reading via lte_events() + if ( (events & LTE_EVENT_COVERAGE_LOST) + && (lte_obj.trigger & LTE_EVENT_COVERAGE_LOST) ) { - case LTE_EVENT_COVERAGE_LOST: - if ((lte_obj.trigger & LTE_TRIGGER_SIG_LOST)) { - lte_obj.events |= (uint32_t)LTE_TRIGGER_SIG_LOST; - } - mp_irq_queue_interrupt(lte_callback_handler, <e_obj); - break; - default: - break; + lte_obj.events |= (uint32_t)LTE_EVENT_COVERAGE_LOST; } + if ( (events & LTE_EVENT_BREAK) + && (lte_obj.trigger & LTE_EVENT_BREAK) ) + { + lte_obj.events |= (uint32_t)LTE_EVENT_BREAK; + } + + //MSG("urc(%u) l.trig=%u l.eve=%d\n", events, lte_obj.trigger, lte_obj.events); + mp_irq_queue_interrupt(lte_callback_handler, <e_obj); } + //***************************************************************************** // DEFINE STATIC FUNCTIONS //***************************************************************************** @@ -192,10 +196,10 @@ static void lte_callback_handler(void* arg) lte_obj_t *self = arg; if (self->handler && self->handler != mp_const_none) { - MSG("call callback(handler=%p, arg=%p)\n", self->handler_arg, self->handler); + //MSG("call callback(handler=%p, arg=%p)\n", self->handler_arg, self->handler); mp_call_function_1(self->handler, self->handler_arg); }else{ - MSG("no callback\n"); + //MSG("no callback\n"); } } @@ -1598,7 +1602,8 @@ STATIC const mp_map_elem_t lte_locals_dict_table[] = { // class constants { MP_OBJ_NEW_QSTR(MP_QSTR_IP), MP_OBJ_NEW_QSTR(MP_QSTR_IP) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IPV4V6), MP_OBJ_NEW_QSTR(MP_QSTR_IPV4V6) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_EVENT_COVERAGE_LOSS), MP_OBJ_NEW_SMALL_INT(LTE_TRIGGER_SIG_LOST) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_EVENT_COVERAGE_LOSS), MP_OBJ_NEW_SMALL_INT(LTE_EVENT_COVERAGE_LOST) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_EVENT_BREAK), MP_OBJ_NEW_SMALL_INT(LTE_EVENT_BREAK) }, // PSM Power Saving Mode { MP_OBJ_NEW_QSTR(MP_QSTR_PSM_PERIOD_2S), MP_OBJ_NEW_SMALL_INT(PSM_PERIOD_2S) }, { MP_OBJ_NEW_QSTR(MP_QSTR_PSM_PERIOD_30S), MP_OBJ_NEW_SMALL_INT(PSM_PERIOD_30S) }, diff --git a/esp32/mods/modlte.h b/esp32/mods/modlte.h index f38439babe..10880877d4 100644 --- a/esp32/mods/modlte.h +++ b/esp32/mods/modlte.h @@ -16,8 +16,19 @@ #define LTE_MAX_RX_SIZE 1024 -#define LTE_TRIGGER_NONE 0x00000000 -#define LTE_TRIGGER_SIG_LOST 0x00000001 +// // trigger and event definitions used in Micropython API +// #define LTE_EVENT_NONE 0x00000000 +// #define LTE_EVENT_COVERAGE_LOST 0x00000001 +// #define LTE_EVENT_BREAK 0x00000002 + + +typedef enum +{ + LTE_EVENT_NONE = 0x00000000, + LTE_EVENT_COVERAGE_LOST = 0x00000001, + LTE_EVENT_BREAK = 0x00000002, +}lte_events_t; + typedef struct _lte_obj_t { mp_obj_base_t base; @@ -26,18 +37,12 @@ typedef struct _lte_obj_t { uint8_t cid; bool init; bool carrier; - uint32_t trigger; - int32_t events; + lte_events_t trigger; + lte_events_t events; mp_obj_t handler; mp_obj_t handler_arg; } lte_obj_t; -typedef enum -{ - LTE_EVENT_COVERAGE_LOST = 0, - LTE_EVENT_MAX -}lte_events_t; - /****************************************************************************** DECLARE PUBLIC FUNCTIONS From a641ac5e7f51cfd80741d7343474e184692c96c6 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Tue, 10 Nov 2020 19:46:41 +0100 Subject: [PATCH 19/46] modlte: improve exception texts --- esp32/mods/modlte.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index d1e825b426..f825b04432 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -243,7 +243,7 @@ static void lte_pause_ppp(void) { if (!lte_push_at_command("AT", LTE_RX_TIMEOUT_MIN_MS)) { mp_hal_delay_ms(LTE_PPP_BACK_OFF_TIME_MS); if (!lte_push_at_command("AT", LTE_RX_TIMEOUT_MIN_MS)) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Pause PPP failed")); } } } @@ -1174,13 +1174,13 @@ STATIC mp_obj_t lte_resume(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); if (lteppp_get_state() == E_LTE_PPP) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_request_not_possible)); + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Modem is already connected")); } lte_check_attached(lte_legacyattach_flag); if (lteppp_get_state() == E_LTE_SUSPENDED || lteppp_get_state() == E_LTE_ATTACHED) { if (lteppp_get_state() == E_LTE_ATTACHED && lteppp_get_legacy() == E_LTE_LEGACY) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_request_not_possible)); + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Operation failed (attached and legacy)")); } // char at_cmd[LTE_AT_CMD_SIZE_MAX - 4]; if (args[0].u_obj != mp_const_none) { From 8e631efefb6b3d7be6731f826c06dcaf85231785 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Wed, 11 Nov 2020 16:27:48 +0100 Subject: [PATCH 20/46] lte: reduce AT+CEREG from 2 to 1 this way we only get unsolicited result codes for *state* changes (registered, registration lost), instead of for every *cell* change. This means fewer UART break signals, which in turn means fewer callbacks to deal with. --- esp32/lte/lteppp.c | 3 ++- esp32/mods/modlte.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index 220caa1ac6..ad7f70c28b 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -520,7 +520,8 @@ static void TASK_LTE (void *pvParameters) { lteppp_send_at_cmd("ATE0", LTE_RX_TIMEOUT_MIN_MS); // disable PSM if enabled by default lteppp_send_at_cmd("AT+CPSMS=0", LTE_RX_TIMEOUT_MIN_MS); - + // set registration URC to 1, ie for status changes + lteppp_send_at_cmd("AT+CEREG=1", LTE_RX_TIMEOUT_MIN_MS); // at least enable access to the SIM lteppp_send_at_cmd("AT+CFUN?", LTE_RX_TIMEOUT_MAX_MS); char *pos = strstr(lteppp_trx_buffer, "+CFUN: "); diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index f825b04432..1372c679c8 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -280,15 +280,15 @@ static bool lte_check_attached(bool legacy) { mp_hal_delay_ms(LTE_RX_TIMEOUT_MIN_MS); lte_push_at_command("AT+CEREG?", LTE_RX_TIMEOUT_MIN_MS); } - if (((pos = strstr(modlte_rsp.data, "+CEREG: 2,1,")) || (pos = strstr(modlte_rsp.data, "+CEREG: 2,5,"))) + if (((pos = strstr(modlte_rsp.data, "+CEREG: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5"))) && (strlen(pos) >= 31) && (pos[30] == '7' || pos[30] == '9')) { attached = true; } } else { - if ((pos = strstr(modlte_rsp.data, "+CEREG: 2,1,")) || (pos = strstr(modlte_rsp.data, "+CEREG: 2,5,"))) { + if ((pos = strstr(modlte_rsp.data, "+CEREG: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5"))) { attached = true; } else { - if((pos = strstr(modlte_rsp.data, "+CEREG: 2,4"))) + if((pos = strstr(modlte_rsp.data, "+CEREG: 1,4"))) { lte_ue_is_out_of_coverage = true; } From 6b4f392084ea3f4d1845e33c81acd8548c468952 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Fri, 6 Nov 2020 23:07:05 +0100 Subject: [PATCH 21/46] BLE update --- esp32/mods/modbt.c | 60 ++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index e38bd2ef84..99a79a6570 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -113,6 +113,7 @@ typedef struct { int32_t conn_id; uint16_t mtu; esp_gatt_if_t gatt_if; + esp_ble_addr_type_t addr_type; } bt_connection_obj_t; typedef struct { @@ -284,7 +285,7 @@ STATIC void gattc_char_callback_handler(void *arg); STATIC void gatts_char_callback_handler(void *arg); static mp_obj_t modbt_start_scan(mp_obj_t timeout); static mp_obj_t modbt_conn_disconnect(mp_obj_t self_in); -static mp_obj_t modbt_connect(mp_obj_t addr); +static mp_obj_t modbt_connect(mp_obj_t addr, esp_ble_addr_type_t addr_type); /****************************************************************************** DEFINE PUBLIC FUNCTIONS @@ -421,7 +422,7 @@ void bt_resume(bool reconnect) for (mp_uint_t i = 0; i < btc_conn_list_tmp.len; i++) { bt_connection_obj_t *connection_obj = ((bt_connection_obj_t *)(btc_conn_list_tmp.items[i])); // Initiates re-connection - bt_connection_obj_t *new_connection_obj = modbt_connect(mp_obj_new_bytes((const byte *)connection_obj->srv_bda, 6)); + bt_connection_obj_t *new_connection_obj = modbt_connect(mp_obj_new_bytes((const byte *)connection_obj->srv_bda, 6), connection_obj->addr_type); // If new connection object has been created then overwrite the original one so from the MicroPython code the same reference can be used if(new_connection_obj != mp_const_none) { memcpy(connection_obj, new_connection_obj, sizeof(bt_connection_obj_t)); @@ -477,19 +478,19 @@ static void create_hash(uint32_t pin, uint8_t *h_value) { bt_hash_obj_t pin_hash; mbedtls_sha1_context sha1_context; - + mbedtls_sha1_init(&sha1_context); mbedtls_sha1_starts_ret(&sha1_context); - + pin_hash.pin = pin; mbedtls_sha1_update_ret(&sha1_context, pin_hash.value, 4); - + mbedtls_sha1_finish_ret(&sha1_context, h_value); mbedtls_sha1_free(&sha1_context); } -static bool pin_changed(uint32_t new_pin) -{ +static bool pin_changed(uint32_t new_pin) +{ bool ret = false; uint32_t h_size = MOD_BT_HASH_SIZE; uint8_t h_stored[MOD_BT_HASH_SIZE] = {0}; @@ -501,9 +502,9 @@ static bool pin_changed(uint32_t new_pin) mp_printf(&mp_plat_print, "Error opening secure BLE NVS namespace!\n"); } nvs_get_blob(modbt_nvs_handle, key, h_stored, &h_size); - + create_hash(new_pin, h_created); - + if (memcmp(h_stored, h_created, MOD_BT_HASH_SIZE) != 0) { esp_err = nvs_set_blob(modbt_nvs_handle, key, h_created, h_size); if (esp_err == ESP_OK) { @@ -511,7 +512,7 @@ static bool pin_changed(uint32_t new_pin) ret = true; } } - + nvs_close(modbt_nvs_handle); return ret; @@ -1415,7 +1416,7 @@ STATIC mp_obj_t bt_events(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(bt_events_obj, bt_events); -static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ +static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout, esp_ble_addr_type_t addr_type){ bt_event_result_t bt_event; EventBits_t uxBits; @@ -1443,7 +1444,7 @@ static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ bt_obj.busy = true; /* Initiate a background connection, esp_ble_gattc_open returns immediately */ - if (ESP_OK != esp_ble_gattc_open(bt_obj.gattc_if, bufinfo.buf, BLE_ADDR_TYPE_PUBLIC, true)) { + if (ESP_OK != esp_ble_gattc_open(bt_obj.gattc_if, bufinfo.buf, addr_type, true)) { // Only drop exception if not called from bt_resume() API, otherwise return with mp_const_none on error if(mod_bt_allow_resume_deinit == false) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed)); @@ -1473,6 +1474,7 @@ static mp_obj_t bt_connect_helper(mp_obj_t addr, TickType_t timeout){ conn->base.type = (mp_obj_t)&mod_bt_connection_type; conn->conn_id = bt_event.connection.conn_id; conn->gatt_if = bt_event.connection.gatt_if; + conn->addr_type = addr_type; MP_THREAD_GIL_EXIT(); uxBits = xEventGroupWaitBits(bt_event_group, MOD_BT_GATTC_MTU_EVT, true, true, 1000/portTICK_PERIOD_MS); @@ -1510,6 +1512,7 @@ STATIC mp_obj_t bt_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t STATIC const mp_arg_t allowed_args[] = { { MP_QSTR_addr, MP_ARG_REQUIRED | MP_ARG_OBJ, }, { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_addr_type, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL}}, }; // parse arguments @@ -1518,7 +1521,7 @@ STATIC mp_obj_t bt_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t mp_obj_t addr = args[0].u_obj; - /* Timeout parameter is in miliseconds */ + /* Timeout parameter is in milliseconds */ TickType_t timeout; if(args[1].u_obj == MP_OBJ_NULL){ timeout = portMAX_DELAY; @@ -1534,13 +1537,30 @@ STATIC mp_obj_t bt_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t } } - return bt_connect_helper(addr, timeout); + /* addr_type parameter */ + uint32_t addr_type; + if(args[2].u_obj == MP_OBJ_NULL){ + addr_type = BLE_ADDR_TYPE_PUBLIC; + } + else + { + if(MP_OBJ_IS_SMALL_INT(args[2].u_obj) == true) { + addr_type = mp_obj_get_int(args[2].u_obj); + } + else + { + nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "If addr_type is specified it must be a valid integer number")); + } + } + + + return bt_connect_helper(addr, timeout, addr_type); } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bt_connect_obj, 1, bt_connect); -static mp_obj_t modbt_connect(mp_obj_t addr) +static mp_obj_t modbt_connect(mp_obj_t addr, esp_ble_addr_type_t addr_type) { - return bt_connect_helper(addr, portMAX_DELAY); + return bt_connect_helper(addr, portMAX_DELAY, addr_type); } @@ -1553,7 +1573,7 @@ STATIC mp_obj_t bt_set_advertisement_params (mp_uint_t n_args, const mp_obj_t *p { MP_QSTR_channel_map, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_adv_filter_policy, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, }; - + // parse args mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(args), allowed_args, args); @@ -1706,14 +1726,14 @@ STATIC mp_obj_t bt_set_advertisement_raw(mp_obj_t self_in, mp_obj_t raw_data) { memcpy(data, (uint8_t *)bufinfo.buf, sizeof(data)); data_len = sizeof(data); } - + esp_ble_gap_config_adv_data_raw(data, data_len); - + // wait for the advertisement data to be configured bt_gatts_event_result_t gatts_event; xQueueReceive(xGattsQueue, &gatts_event, portMAX_DELAY); } - + return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_2(bt_set_advertisement_raw_obj, bt_set_advertisement_raw); From 4254ab23a9b54c71ccf19b5c3bd6a67e28f8a53a Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Thu, 12 Nov 2020 13:13:58 +0100 Subject: [PATCH 22/46] update idf 3394ee573 --- esp32/Makefile | 2 +- esp32/bootloader/lib/libbootloader_support.a | Bin 324790 -> 324790 bytes esp32/bootloader/lib/libefuse.a | Bin 115932 -> 115932 bytes esp32/bootloader/lib/liblog.a | Bin 18684 -> 18684 bytes esp32/bootloader/lib/libmicro-ecc.a | Bin 158340 -> 158340 bytes esp32/bootloader/lib/libsoc.a | Bin 213400 -> 213400 bytes esp32/bootloader/lib/libspi_flash.a | Bin 43628 -> 43628 bytes esp32/esp32.project.ld | 42 +++++++++---------- esp32/lib/libapp_update.a | Bin 69512 -> 69512 bytes esp32/lib/libbootloader_support.a | Bin 243940 -> 243940 bytes esp32/lib/libbt.a | Bin 7471572 -> 7471572 bytes esp32/lib/libcoap.a | Bin 418802 -> 418818 bytes esp32/lib/libcxx.a | Bin 65212 -> 65212 bytes esp32/lib/libdriver.a | Bin 1909154 -> 1909154 bytes esp32/lib/libefuse.a | Bin 115388 -> 115388 bytes esp32/lib/libesp32.a | Bin 1024568 -> 1024568 bytes esp32/lib/libesp_adc_cal.a | Bin 33184 -> 33184 bytes esp32/lib/libesp_ringbuf.a | Bin 104344 -> 104344 bytes esp32/lib/libespcoredump.a | Bin 47962 -> 47962 bytes esp32/lib/libethernet.a | Bin 155698 -> 155698 bytes esp32/lib/libexpat.a | Bin 992478 -> 992478 bytes esp32/lib/libfreertos.a | Bin 515386 -> 515386 bytes esp32/lib/libheap.a | Bin 158484 -> 158484 bytes esp32/lib/libjsmn.a | Bin 16702 -> 16702 bytes esp32/lib/libjson.a | Bin 266198 -> 266198 bytes esp32/lib/liblog.a | Bin 37660 -> 37660 bytes esp32/lib/liblwip.a | Bin 3068308 -> 3068404 bytes esp32/lib/libmbedtls.a | Bin 3183298 -> 3183298 bytes esp32/lib/libmdns.a | Bin 508432 -> 508432 bytes esp32/lib/libmicro-ecc.a | Bin 158564 -> 158564 bytes esp32/lib/libnewlib.a | Bin 130752 -> 130752 bytes esp32/lib/libnghttp.a | Bin 1306882 -> 1306882 bytes esp32/lib/libnvs_flash.a | Bin 719066 -> 719066 bytes esp32/lib/libopenssl.a | Bin 263156 -> 263156 bytes esp32/lib/libpthread.a | Bin 110114 -> 110114 bytes esp32/lib/libsdmmc.a | Bin 190996 -> 190996 bytes esp32/lib/libsmartconfig_ack.a | Bin 19190 -> 19190 bytes esp32/lib/libsoc.a | Bin 216626 -> 216626 bytes esp32/lib/libspi_flash.a | Bin 194026 -> 194026 bytes esp32/lib/libtcpip_adapter.a | Bin 123260 -> 123260 bytes esp32/lib/libvfs.a | Bin 190764 -> 190764 bytes esp32/lib/libwpa_supplicant.a | Bin 2592646 -> 2592646 bytes esp32/lib/libxtensa-debug-module.a | Bin 9746 -> 9746 bytes 43 files changed, 22 insertions(+), 22 deletions(-) diff --git a/esp32/Makefile b/esp32/Makefile index 758ca21036..10ca433cca 100644 --- a/esp32/Makefile +++ b/esp32/Makefile @@ -14,7 +14,7 @@ ifeq ($(wildcard boards/$(BOARD)/.),) $(error Invalid BOARD specified) endif -IDF_HASH=c61fe64 +IDF_HASH=3394ee5 TARGET ?= boot_app diff --git a/esp32/bootloader/lib/libbootloader_support.a b/esp32/bootloader/lib/libbootloader_support.a index 53016037610853131a32b73b8da38c84161e5967..7f15307e23ba07a1d2090ea9924804d719e15558 100644 GIT binary patch delta 308 zcmdn?Qh3`-;R%wQW(KB)7DkrlmK&8^IpI8u%>|tLu?X(u0#32b`_gomp$cv1;$^&P zi6+M6&M2vkA|}4wx`^>e4vLuAcDehEy=`b>r&5_B?a{=XmNKoBK@;OT#3ZYQ5Zi9> yhACbd!3Q~a`#OH+ulvx%4xM98wMB?+H{fBB4uJD5!TPddSRPJA7yHEG!vp|l{!{z_ delta 308 zcmdn?Qh3`-;R%wQrk2L01|}9pW*e1UIpI9h%>|tLu?X(u0#32b`_gomp$cv1;$^&P zi6+M6&M2u37c&ED72j@M#CRkJMNDkF+oDkz5wtE7r6ic delta 83 zcmcc9$$qDkeS##Xsim>0fr*8Y#YUxaP6TiBBF^I>NZg{h?j$5G+d<}S2<~>Fa>i4> E0P$=W!TF?j$0(=iJT delta 35 jcmew}k@3$&#tD*~rk2L01|}9pW)qdpBRCs>F?j$0()tSn diff --git a/esp32/bootloader/lib/libmicro-ecc.a b/esp32/bootloader/lib/libmicro-ecc.a index d4380c398d188eb5ff3d5f038401ad0c8f0c537f..0effdb6e3e2eac120eeb6e6a9a8ffc190ce9c597 100644 GIT binary patch delta 45 tcmZp<%Gq+2bAlwNnSrUHg^{JX0fr*8Y`9`JFj0j%yH^%mFjEvjAF*5aK002ZW4s-wj diff --git a/esp32/bootloader/lib/libsoc.a b/esp32/bootloader/lib/libsoc.a index 8fcf86f031c94002e6a4071b2d2b255384fbcd4e..4de815ae6ed10708edb0f047d3675971c9d8d3d1 100644 GIT binary patch delta 323 zcmbQy%sZo*cY-9RnSrUHg^{I&!A7NOb{Nmxa=P72M)A#i*-cnb#l$uX@GwfFiy5f< zilB?lu|5ko9b%r?=8jNP9&~kg5*z){#cDQ)qNx+#ym8M8BXo5Y?;}%D#l*LN3}N)K zL=_a<9@EEolM5lZ9q2o469gaZ+wGla84Vmz1;w`C;APtS4JK$|08zP?h55A&05o-4 AF8}}l delta 323 zcmbQy%sZo*cY-9Rsim>0fr*8Y#YUxSb~w*`y4_4h@y&bLO;}LH#5N1?FiN9~8L0b; zpo`71K8r9NY@XQWj!;t`bai(U8~xD5YBq?XsT1G4anA}PbafT)BU4eu#J7J8Vf3*? z6%^YZ)5my|3n922=sRr_1Rw0%?VV>C4IJQt79c^f?KgOtwthnu6yLshoRtA<<#^wxA;Fn*f uU}&UZWME_f7AZ50fr*8Y=|-h!CIoMD8x#8nB<{3N!i>fSR))q_CZ-Hf;8mKZ uU~HgZWME_f7AZ5tMqgEQ!5gwn tZ

&+kp<;jBp&(Aq$={`RXDRL0rcp!kp`mE;u8Z`C$--;5KF-CIIYTU_bx> delta 303 zcmaFzk?+Yzz6p|?rk2L01|}9pW*e2ZbHI6~)92k{6x;lRW1%^c*f|F#iOstl?k`0W z1FPHdY^Nof*!Bquj61c^1v9)E8QakXJ1#NuB3Zp1XykfXbVWHo7=2aI1#ieQy;VX8 rZU;JWGrHrpFL=h}s|#0T2KL!@9uekTe{{ha$;=OfFa)s1;UJn0t@z;T zOtGxuUfGH(Bk8PLUv!#&!j4_hbyn(Qbc!x@b{*-4Ra#V3tkiXP_S_S==iZzBNiRyFZ@%m2R2MYO|E89Z3U_G!UY15o5+# zABtBPIO}CC%cv|ZPw9Y~+pkFUmpZCL z><&~ZWMv|zf-~PJ>K;j0NoROWI%U|u3U&{Md$l5lpfD;zvqr>J@UbhRW)fxDl?8~= zZ;t@|_E(R`Q%-yi9ey?TuVTg|u8+hk3KG{(IIvtSgWk>wuAP+i-BO}3Q^riz8WoWQ zjq{^p+NqEPI5!j>87E>09)!nK@{Y}H`}ugpc-F+=^%{8AOw27D(>JrWn@9z{$0xQ- z6Emji`b22DKB<{6NI;h8o=dJe=lOycv$)KPt-b6kmb|}4qozR$;3&Am;T~Yc4${xd16^z_cuKP1Rw8vYx zZU0uaIgc`;7u}~C_<%AJh*baFB$onQW$2*5GcN^vHmyB?H z15_w6gTkFi7B0!)AIFguy7rMC?R#%cDdL!Q~T%1Fxnl7@w_>jHno7N>AY!dR@A4=+o-S8rM z)P%MBb^aw1=9@9C!a^C2tAd%1X?36SY=6vv3VOm4eG_@a#@v=6IHpRhwDOEoV^SQ6 zkmAtG(|F9Os!9K0hZ>a%@HXp@(_D#f_fh?W7~X)Otvxja zXDn>t9`X<073NFhtP*uQ$wj)Mx7=R~*bwOL{>QWV1WN z)y&E{Nw9K`Vbc#(*Pbs|F@F7Y@avOfD?}XM`TFFXD#}{FQ6Q#vI2me(Q--4{=X^k; z+?b%GtgCZ^igoWrHb{s!3U3J~fFZq6F1Qgyx$#}24c4U^+XPt?!Q8Z@0v0!YIn-nt z1x076*@2v3GaS5twIZb)jui!Ez~X2HY*wdJ4p&QpYynH3Nz#Ber!i8JGhF|*Q6XU5 zM9z$CGs4KW8LehojI@qS1RWhS{?3oUW^Q^%jBjuTUT@-+idP!=2Gh#~FB3O$GO30P zykT(OH$#u#@?ExA23KCs zT)j`iayv3x_+OQUOs|aWX(q^?&WYiFGM2!^Yg#auF)f$}rUh@EP9F0!W>ftZ$g1bd z^F$nhp=18XKT^g`Bh1aVEWEPu`UTuO4*wZ{xGw)uFXnr}_@ia364{MIFH5;lI1 zt^1UiF+=91Fl1h4;Qv{|r;htGV>!DFujODl`!?cdB@4^-U&dX&0^H^A^a*bYXX82b z4qheTIaOL>$sq)*i^`(;X90)1En5q{O=WcE z<cKBec$doM7O}TAEtljyLhdI{+*RCBdHAcPy`|SD^nXNBlx74)1Bdf?u?CYekin%{tP9@Ha^}&eQ+%j9I@|p zbcq;(?7zL|Un*iM$eF&$cTvL7(57R2TeFZh3VjNv<87*kzjBODC>?8@!m8omYWAAd zRSXw5I)%08ETHFCPQm?Q3A{EhRe;G}PyA5DYBX+*-5L(WeG zQettNWjN{(!WR(S_>7|oWcgfDTBLLv?I(MQ1`va zmavAwVAlMThy~Kc<@9-7!fKK@xN?6Ch4M((bAIB+cf1Tap?i``cwoRe$h85Mh+bJV2_i%4D4EMTEWKpi&SBRiX?KyLf WGLqQA+a6N_W#pUJgXf-mivIx`KFg*6 delta 5440 zcmZvgeNa`)p(YS^>#TI8f*(Ac zsnx3Ng(*0)g0pU=O1JTB+;t05x1!e3DY(?x?MMq%EGks|XxH7@`!4YAdoTWR|H$ur z-`sc4d9QQ#De@OOu?|!h%VoKgEngC7d1{o1sbJs0p$FMrT)nR+yf$`r8% z6?C7U>f9q{GPA{GMmB%nP&gDfP0=EjLhIl(zd#XV;K5`?0rh-D(a*4@c?!IyLuuZO zq%@H_4tjb<{al`5brpN`#tb-mBcPV<2f?X71wiUgGi&v{Hd5S{Z2}vkY!Li~m<6KG z8jaE?*&i?UQV6wHsj?bfciXLSJWE+G z@d9}pl@Fz?q|lq~{I!&k+M36sEB{bVhJ!nm_h0cYeN6n(ev#Pt6xa0RkSNWec8AF0 zpX)^?SR4p=8fi%NzNkFrTn8Hu^LT^dsjPp>Jz7wFkjd{prKmU8pw zv>c-+mVxr$tKP9v)^>g>1BxEiy>}_&5<;y3PB}Pp8R4HuGR2Ry@F@wTppy)H)h z?{b+UoM}4Td6!8Oq=qfjuxbx8VX`Qs8hv}3Nr$!%n9n52BZ9sfZvpm_4)POT0>G|b z?mhzq$|j_ZSE|u_M|4(jwJ~l!?x=tyRDD%sq42~pP}IdVGGp1BP}}JlDu{TcK`jccoz6?UHL5!;&B zAjLijyL>UI&q5ilLk-uT2mNk{Ih04*j@#73pH(0`yD4W-x#QU&n+BhTc_sz>68&$ z&0S5sI1U5uk`|q^d2kCmmj6v9e z4TeH>+a&_P+aZkB@CODT(Rfib%mUHQBf3@4lBzo^cyO>ljUGNLwZgTvx@M_h_D-D@ z#c$L3K!3jOvRJxlM4;WOqZfb)asJ@xJGzPdZ86HQE0vV3-7nP(1f1mm1c6#E1~E`y zuN!`y{?&xF^y+$(CCnW;H-9l@m9f~?QaHEbBg$}oD(IXL;+`R544hJh6xb*$4V$B4 zBML(xqEPQ+qBPg5X8_v+_EuReTcKIO!Rx+*-On6hy_S{1uvI2?8i zM?9G(=5WZz5UixEGGB);uUQ6q$KwkGGlUz06_(C3cm&B2!F8K66N(lZ=&&+s@tQHz zity#{17)!W;nt6tr9*Xsp;79O3xx1gLXOIp(Z+f|clMaKg z;2@K@_`q974ut-k0WshS)_IQax@br+m+OlFPYgw@j zEGu3+8&3U<*p$2mvXVF-!9gYScBm)rz>fmm+cJjjYK+HgIbOeluErHR&hc_G1H0BI zfNOo?hDAI^4OirW@aS;jTK+Y|L{tlQy$%JtR%Qr#V^4(vM`&0HT@6VKbEpe4kcIpw zN#87Dc$WBM@^H3@;ir3?HK&I%GV~>WZ>8gv36WuL+yiSt7}X=Q7?~PxC{yUvh@bd@ z$qZYqNr7rjYU2uOz$L|I7o8lNrjt7MaN~z{Xt2#48J8F04`W1JkI? zwQ()DHonorACWPB<_*?$CL3I5a&j_g9Bx3^dvBfl-uixiR2s2>!N0Cg;}7L1%UzYL z;M)UXo1pt>E**PE^=gjguHi3SGve9^>vtj-uMOaLV&nFMG=q%3U^RO(Di2OZ<$qa4 zIcaYnc=CVbuM0ER@>EdMp6|oIgcGKQzkh6hB-X>Xpxb^|!npRE31O{vdTW_SuI&dM z_5p!1=@1thm06J1X{U#4L>ZCRk@Kycwhl8Q{YY`o{#hL@f$KeN-<~(|+5~-j3SRh8 z8P@>L9Vsv#pa`q0+0~lOuv)X_*{77_`yW3HUvG)$`-B;3FJv-ohv_Z63ZcVP^@`KrR4*IoaL<-lNye%+G2jf{$rsTs-dA7j@iRZlq_=`>!Z1}<YsYY{mSOFxtpBAy&f^Z zpPsla{nL2Z=;wUK59c(i6u|Gd!oPyE1HUroM$A*u2!~RSn+W6p*cSo)SEWBs#8USi%rjAsE+tmq<1+akEo+07>mckWu0#;EH>> z`_kRs?(uw=0u=|GErNu4zP96cX0aVEC@skqVdOyvkjs>Ac997_SJCdW6`d0 zqXLw>ok>abx#GqO=>4yACO?0g5e-?OEf#JV=NT4+7vC4;N9K|kOEJV)N-SE5QYaugw@~C diff --git a/esp32/lib/libcoap.a b/esp32/lib/libcoap.a index 39797bca387f407976d29c702ddfdf8e1b953d1c..7c995cea40dbba839f4a6f98b5bf97b8afd62a07 100644 GIT binary patch delta 1338 zcmbu9T}TvB6vywK*{iFitedSL3w^lZepRl5`H|I#kcH6-xfCjieLz9zpk)!#T0Vps zX`I+egIGum49az)eXxg~DpZnu$s!~u(uiL2Ay_Ip<6d_bX&oc^4Y9iHOC(xS4GvYUB@{t-glacX-r8EZ&nM$f7 zDP1iRijA?uEde<-TP!Ks1k-Li4XSGDL{jn>fe?Y%l*&fd5a?qY!1UXzNS6(sjMFX0 z&zw7PvY=U(+Y8!T&dTZ~bDdGyRn3}Ik9E-K_ux{>$kOvfOg2GWED>Rl!wkfzkuF^jp9;(_2BmY-K?if5EsV8msjT`=yl(>eHv@iwe+ z+u3LQ_J^Tq%tj?>z{~Lgy4{Z0#VN&$V^JsE8PzMSNZZ>zx}|hg7_!vGvB%lEr;bk6 z4C(1oOV}z?qyEn+h0)2Za8(aIVp`caK0vQ$>E_ki5DnLcga@6vx3t*0UF^IY^UA`( sDe+BfT#g&N|0^!{l(QzQo=11}$j5@Yx~a_^ZjssRjuqa~d3LMw51%+Y1ONa4 delta 1325 zcmbu9Ur19?9LLYOcgI~v%AC5n38jtNpIfHZrpd@fkc8C?9sQ*QD>)FY zj9+z8A$uzNVO$ z&}@okEBvD`?p`6AQ8e8=dzXltkj{6R{I6J@xt?GkEZ9X@_`u(_TtQe?!HBh3u{m?{ z)oQ^brH|GNVMB@N@s`1o?4bRsYM9BMtFXqUAV)GO{{Glbn-c8QH}BD$XL7e4LYQhdE2g$2jLBH*+pP zKFzrh`6B0HJA|Wo&@^L) zt8Syvlc%({Fth0(#RI`Ftc}S$#XnBX@Y-#pVMyTAIrxF`9+b)sHjn@QB!njHv=Z9! zPJ9HAo$Kz4SzVM18a7yl&V_o-Qu=*5iz=$GN;FTMN;JOE($$u@9Hx@?(0E}gVTm{Q z(o@EbjfnyJz@nKwtuY#JjR|9sv{$n_S*{Qx&owVTJ}b_LGICtl=&y|2U&k(#YI$l^ clR-9Olh&R;2pKH#t}y#_bG_BE%$`L40MsHXkpKVy diff --git a/esp32/lib/libcxx.a b/esp32/lib/libcxx.a index 387b1b4a5c3ad8629845eb2c4885f9cf6f55f84b..d29dc54e0b2bef72a726e99621b88266b993d975 100644 GIT binary patch delta 52 qcmdnZgh%}%V^>)>4T&1IY2yaAxG4*UQB diff --git a/esp32/lib/libdriver.a b/esp32/lib/libdriver.a index 44dfd403ec9d201c5d7ed2f42ed6cc0d6b7851a0..d4608c3a3949c4802f9e3cc137d1201b4926fd0d 100644 GIT binary patch delta 566 zcmZ2ce>k(-js7h;L>#FnEU~c0q?vyggWsaeJ^F zQ-?f~gg_6sMEf6GrtN=hna{66l@Q{W-SR9z%({KIJX=T_n&fuPrihq!p$;DScmCvb3=HzWA% zK%=({^zf{nj}Qa!y5%a`baK@I{( z;}L?}fg!qG0>N*8utQ+`gB^mOcOk?;9+hbSQY^InOR=!cemUFL7-DeTg&SJ(|S!>O)*SZV18c6F9ibn-TnW zpkuZR^zf{nj}Qa`;xf3QPf`-2^VpLZd|KtUtX{-s!G`ENg+ zJ}I)j_@w9@MI;HJLh0(A2Ia}(?aGrSwkuDToWKs# Z0h9!JtNqd}Ng$R2V(IOdX31P=0|4IQt$zRj diff --git a/esp32/lib/libefuse.a b/esp32/lib/libefuse.a index f0fe41c4e8c34a3c596dbd73460e4b1ed3451f1c..90fc08d324cc73e4932a56e64a4ba28e9e06ffb8 100644 GIT binary patch delta 98 zcmdnf%D$(SeS##XnSrUHg^{I&!A7NWP6TiIyfQ|y%{w?PL(s(p;&{{1#cYm7ZbXP} J2kMpc0RT`s8@&Jk delta 98 zcmdnf%D$(SeS##Xsim>0fr*8Y#YUxaP6TiIyfQ|y%{w?PL(s(p;&{{1#cYm7ZbXP} J2kMpc0RUA*8`b~- diff --git a/esp32/lib/libesp32.a b/esp32/lib/libesp32.a index 07ff639a616d8399839ce0a224fa0f59bb1fd42e..fd107af1808452094748c058d561f5306aa215bb 100644 GIT binary patch delta 879 zcmdmS#BRqCy9ttps%A$z{*s$+SLeeb9#Vx*F zcRu@q2qZzj6P)7P-+pJGL=k4}6YEl4VX&Jf=|^Ee;RA%x)eb)EcO5&)Ym B`_ljb delta 878 zcmdmS#BRqCy9ttYre5u$@Gc=rTHfg_S2 z&~xJ3bGbN|bRY?WwHr?66fs2zZU+i>TOs(B+p0CL)v_G-8w7eomE-Sr#D%w)cY*UuO%N*o@0fr*8Y#YCmY2+n3c#z_qTz@-W( diff --git a/esp32/lib/libesp_ringbuf.a b/esp32/lib/libesp_ringbuf.a index 1d5648c6d9ca2324b6cd12789faa03a0c949c7ba..77010891aa547f5972984b2d94b8d20c46d2a047 100644 GIT binary patch delta 39 ocmbQSo^8f@wh59PW(KB)7Dkp98x=1w!8y%8nYRCAVw^t(0P`ITssI20 delta 39 ocmbQSo^8f@wh59Prk2L01|}B98x=1w!8y%8nYRCAVw^t(0P`CRrT_o{ diff --git a/esp32/lib/libespcoredump.a b/esp32/lib/libespcoredump.a index eb72849eec556951a940cfd8d1dbd93257c8153f..9647c581da8571025e816be85e56002bc961a853 100644 GIT binary patch delta 79 zcmcchjp^1mrU{Z9W(KB)7Dkp98x6)6(Uo6j&V)rn>pCLjp1D5<`~QEF_w&nLl8pSHToDg bYa#KU>|kuSK;oBtWb8Ia;&W&+X_*56?4lsd delta 120 zcmdmVfOFFU&Iyv7rk2L01|}B9h8vacvch==n>pCLjp1Cw<`~QEF_w&nLl8pSHToDg bYa#KU>|kuSK;oBtWb8Ia;&W&+X_*56=UgDL diff --git a/esp32/lib/libexpat.a b/esp32/lib/libexpat.a index dc664cc7ad24310f41e3b269cd8201a2bbbf93ab..0b497bb02e596d5ba8c7d71bd9f427e64fb322f9 100644 GIT binary patch delta 177 zcmcb2(&pYtn+cMfW(KB)7Dkp9W*e0ra=>{e(-l0}#haBm+m$&PftU%1nSq!Eh*^P{ zZM!lj`xiU7db4(*dLZTiVoo6D0%C3;=Gm^`!8_Rjt`2OjSo@_8-tCt<_-rSmNo?1X U;SXei3z~skA+~*<0>1+b01(+M=>Px# delta 177 zcmcb2(&pYtn+cMfrk2L01|}B9MjMqLav*rq6+GC*o0U1+l{p!KmLR;a?; z-xV>II&r|vn%=L>F0s9NE8`hCGY5jDl!lT}#+ESO5TM{bc(9 delta 349 zcmdnBOMcfb`3aJork2L01|}B9#v7Fm3d4DZ)1I)2ZDtZVsEjJq{K$O!BXh>LR&Ze> zkjm}viWp0s5Mt9OD6@-iZ{EsyMh+neR+x8%kx>XutnV3P?MyT=tp+C6RunPuc7Il8 zAZ7t#*6seRY)|Cj^2T7ZgH+j;?t_aNZF|DDm=n&0C^__&%~t|0W(0AkJ{x<4EL_ld lJJ9jWG6+7}iEr+Sow^aBXL=kb Tlh}3#en!z>2*K?@!EK2EA4?i8 delta 99 zcmbPojdRL1&Iyv7rk2L01|}B9#v7GRv%`5t)8jaq#5ePDB!t4nj6q^zn|orXZbTE? R?!eC|`U@er9jI_yA^=L!8i)V@ diff --git a/esp32/lib/libjsmn.a b/esp32/lib/libjsmn.a index 13b6ac144d10e0b7e442400a95db8fcb11267435..68768c2cf00d5bc7dd9544be8d53381847f683ae 100644 GIT binary patch delta 35 icmdnj#JI1Cae^eLnSrUHg^{I&$wZ}41ZQKzJ_i7|stPLr delta 35 icmdnj#JI1Cae^eLsim>0fr*8&@kFIi1ZQKzJ_i7|p$a7c diff --git a/esp32/lib/libjson.a b/esp32/lib/libjson.a index 823cb2eedac5bd4b0ffd945495fbb64861cb1585..37188d324e2eb38fade596f10cf6a12db71b35b1 100644 GIT binary patch delta 70 zcmcaMU*Ot&feDhFW(KB)7Dkp9rW=)FIT5_+0*jc$n&)x0&*Nm=K97?ra|T?_q#Y=? KU0@OOv0MPzxD=28 delta 70 zcmcaMU*Ot&feDhFrk2L01|}B9#v7GlIT5_+0*jc$n&)x0&*Nm=K97?ra|S}L9VoY5 JU=j1NTmaaC6omi) diff --git a/esp32/lib/liblog.a b/esp32/lib/liblog.a index 94e274e03ac8767bec9ae32d3b6c3c64ccf099ac..29326a63b59c45988d9d5eefb2b95b21dc05e11c 100644 GIT binary patch delta 37 lcmbQUjA_m?rU{aqW(KB)7Dkp9rW=*`84QHktMnz!`& zwOD>Fmd@5&=_U6)B|c{&jVrMdW5WkY{J;^~nq)6l-KJYd*o&zls;OC4V$Bs->D>bh zRlitiFwToy|Gav)le5_3Q7mJ$yTrdQQlDCFr?vf{HqEuuoX0qL8f-K}b;@)Ho-$oi z@y)HGVnVaT@LzKw0OO*RDEK*3qP^l^-P+r&UamL&Awx&xt({5 zDY4ULjCRkCx6|5|xL-@K*LJwiud>yu$A=H%C!P}*Se3ESWlOmlvWwqI(+!TYXzcuh2m=pVq`NnD* z_(|0XWjdZv=5udX|Lpp7o~8FS{mrTaB{l1Q^SwI5F0gj8^w(`Rnx4P$vovF?MQfTI zuz=@o(C@MvoO{&jKhCnm<+u9l`R#A@h2<6v+p;&G3G(G%m$AY3ZPE zK|2FZY_e#cy&-z8O$qE8NbqE)XpdhF3{SU<%Qzm`IMz<1j|2V3STuSoWC4d=Z?u{V zXa=4)F6f_Dnli@xoS^V%o3;|)TM?ugcn~0^ZiPtv+`odf7j5IJdrt@R-qRtPFpKV4 z7Bz&WJrk72AZ3R0cW#B0SdUm1CGp7KkR_9BT1dQgOz7X=v(pa!6sq~oR;%u6593|! z;hh>=owuJ2KVyCDsSXm~pC57NO-o!)s)L^Y=}JW05E~8B<3Yq@t2siPbW|lTvFlEq z7&ns5ok&e8k7NA!26>sL@(r^2$XG|>bW`>D8zg;a#=hO@wc$HlVu&G~u%^Z>9%M_H zZ?;=~<7(F6ylldpwqWvk1*vab!*r_k%gI{J?E9lsj$!2f0*Cb)LP!-MW^-@7PfWEz zokuR0S)16k{**%6^TI?8YD=_e4VTRTg$c9sM5`mW#5zMxEJ{!xwW zNR7w)o4FY>uRpDi(A{dTAEJrcQa@7z@%28@wVN{z52dX8Ex9|7niTZAcg_cVwB#yRDInL60;n(6>3L7Z3tM*r+r;wc`R7$LP9So zwZ%{xrYz(e6)uEMBT={9z;`R-2S7F5`oqBZ)4OfP@3tAgTN(c?XcDK4->r;5pN&&S z7p3QL?4OjHLjz;~%)AcBC3>m`g(QQ~t;-G2jWRK+W}6Sly^^O=>!;M#41q-{wVrI} z`|>%O!%7dzhT!F9Xc>*ClB1joEgY_#K#p<(OQ14U+1y;UvbWET zIf+}mK)oJ@N?8Us9oQKdI2O)oCckx1Zr9Kx)^bE%R%wQ+`C!9BaaT*=h}>0p^38DE ziA_+kCLEx(A3g`z2+D{X01W^MbfyZ2NU4MjKxl%Fa<)Q&R;eCA`2=*7astZHPLP9#;c0I?PjyMlZ9>c6m5m#h!1M{WNB%t?xsneIF`q*yVOPEV=^% zu7goB3+~E=yVaxg7&kEai%{-nk*DMiIH}%Ka-~166R*fVr`!)}aULJ5SrQE63QBl-zS8H9^zVq@us$q>6WC=3+*abO+?&RNHkY`DigJDvk zV7~{0`4eZbQZNrN)XiXcp>75X2g6nE0_%^*UF+`$)6NSF+hXP=2!042+hISrwW5DV z;s(9wSf`|ss6XpD?kz>QLp3(fh8ox`g$scDn->BPV&^~dlHzexl$U~p7xs>v2_AJ! zBD_#X&Sz=mLnWX7$tFS!hJ}J9v3xg;A2Zjh-PpxFS~nK_iMJbX?v^_o-hQ&bfVbb4 zH#^WIKId2Y18pTH^Ehaw3xaF{#>7Cz)GtEDHws*f!TR;pf^UFt5{z5)Pr=xa4@?r< zI)Ijp41MB0OcCr1F>@(QxWA%AR7?clDi|B+*zQMikUOprj{w6TvCczko69BIDVAv}j{$|0rns<;P9uFAVbt>H8!p9Ng zF+tu(h8UgT{+KpGDwPU&`4cD**L=9abp;F?_zQN$1;F(b3_Han8Z1_iTj(Viw<}CA zesEnPW9$_3tXx#!^S(+jKKC1}^gkfO>m>nUv}6w5_DwOV6nZ&MNl{RVXz8pfQLDpA9*5=3#4ZDz~4BHRnnPJ8>C*=@bAnCoJ6{e(zU^B3<;Ellkg7Fm^Di{wlQZOE1tYAFo1i^Ti zDT47Z(*@(Gb#`vqf`92Sh(a!fG(bo)f` zc;I&AN?1KUkY_~&X3|B$bAT@i#@~F`1mkO~Tks0tJA&~e-79!4@I%3vf%tmFoyM$l z6kG>f=_U%8wqAlU?ev280S5}kFL$_LOv#~wPXNaW{sMTU;4gtk3&v00SizTov--G_ zT!BKKsK6916pYW#EWygVOfaVSGUO0g6x5#4Ea8C@hZjRRN8UPX6|ok7>j4CBEq z<_pIgB}&(^stHis%R13LVj-E}qS;b(v)M^>e`KB$!QEmnplf6;=-L>~0$0xR!MS_D zi+UYQdOBDFd!g9No3&*b-Qed(=dYgL>}r2;7umfmW0(ei*TFY-H1%e2*+vgK zk7Z;Vjhb&kj_i}oC?8{WAghQoJDzQnH3WW{idJ`bn>+E6ZHogl-4AE3L-LUJG|I}V;^cJeR;73DzCr)(+6bOYOh z?nibKT{pXlu8et31~;1}gVX$$O2`MS=^m_dtm>iGo7IBsKJPG;At`Wc3t7uU zt)FI55xiqq=R<86%)bX41;0Yb_snww^c9z9^tAh1wbw4b3?(O4$C@H}tjRRa zY|&U=PLRI3zS+dOF`*JqeJx7oZ6#X5PuAFk z^O8+bL9bgyD$NfVqV?}uL=OLbe7n#xedRx#W}led_iZ#ipWqg|YJ!a>@vHfJfZqPT7<*`SGrbv@&L-P4 z#Yro^>-z$ir)%H#a29`-B>vrOZOd!U;$2^fpZs1M_q>ycA-R6In@`W;Ks%P0K5}LH zG&i0;O}FA3N2gvXO^_?wE$)y!AbIk3i@t4`OS!~PEY$yTOD}EiL;YW(dujRMUZGBt zbvwgN;u{Bfjhy80Q?I71OUzS6mmM0rHNsD-YO5qj|9uY^O|DEU_2+4&0bTVjy2QuGf$>**X;r@kc0AkD_7Jvfc$CDq=1LcLIYeIk zv-EPUqvGPbzCrv+rF_S+--h6Zk+^S_e0+?Hqs(t!k_(o)Xh94r=dn#g!vpyj6HJ?( z!tm#&n4TCMP20o1Hpf&o%t?g)n0WtPrhz@3va%F8P^zp*58@T+!ONC+w`bS6+!Wln zu9tRWP{^#R2M7 z-Iy5~pX~@hn}TJYv@i7db{9?Jp6Ov<_v~;h13!sBdNnLIvzK4yM`3lNT(u*Q!$OBU zq`KVDAU=%}l9uVF>FTe*uS@eB9D^=%IA_K+~C zvg=F)?>ZBy>v`C%40SeaX!t}nVZA(nzu6gC?9?KZ$~?X+a?v=~NW6J?)OUaGr5*fd zlKzLV(i&X4nI|^xf+`iqG?kd^xG!vzqy9)-5G#bu;e{*0@KJyYt+# zwSAPt6;0qHqNi}~Uzg%0DM7}< zxZ)QOnFg>3={5|^{Je+ij2!n;Q7P*Ez&XC(B0`h29)N_nyB!K7Bw;7iq^)oxWCSEy zTO<>bxMax^LT#;@`(7YTN-SDhhE5C}CMT)UTQ&ADFp6b5HAE_uMnX#Z)E*M^qaa!4 z6WXT1ToI)H>Ok5xI1oCSBy<|VURT=>g<@L!eNX$-uDi5<-KG8OYWrKDO0wGib+rXL zC0T7<^58edU5J zOPy%s4Qpq$dtRCf5VQerEE!ugQ;N8#KS!$Nsz zaQz!#(bH<7V08=tj#q_K02@F_?Et6&u+kYCY$Sap>;r^42sFMHGIXWp5#*0Up!8#q zPk_t_)ve@Qt4$%(5itv^b#ly{Kl6`p+qH?@{ymEVut?W0C0e4Jt5%)Jq0NW5^ll1f=_|9vV%#o z#0twyMjP&M^uePLFRY6U50)AWk43ytNA?Db{#n3!!Fj+MVD!PWu#eF3D8&nPWb6<6 zEq3VR)J(Q0_z()P3@hNa$_I;$xk0Tk!BN271H%mqf2vO^n`qPpvo+OPBWv5QH?oLN z{EYnkkIH$s>c)Kj<4t9U8yx86ca#tHHr(x_p`w2{R0hWFg1iXqY-Bu+;93d^^$xK3 zL?fR9`kA!4e>c$5kiiFMXS`tSe4&%RfRaGfX*7rjoeF%|*N>ENZyc0W#J|Vr zV&1* zoT6~Sv0$T|^kl)f`O*dB^x|(d#>}TSLY9aOKJ8_K@u{zH(kqdna}m%P>Tn3&sV_6pR}n+Y=TJ8*YJ2t|<5dc#`0=z|RW)3ivs}xUh2tcK|OC`~&b3!9N2p z7mVlgD#4F|*9z9+!mSq>+!>n%Tmt-~VEo;_C3rP(mtfp=4+P^*!-EoM zdK0j_VBD!TqsZV^>nnIauq+sVw!;MDHjELB?*#n>w*V&#J_kHdF#gC56Z{qMD8W~N z$Jp7XZreOjfX~Ym!T3N<7mV9_5ppDq1g;Xn@b*N?1jB0ySt}R@PBse0(})Q+0q+tV z3|y}_*n{H9{tlm#Zoa6a5$tYrOpbpPNN}yf*PUoPuV-&%nitYbOh3~6jON#cY{p1) z9`$4mkcDdZ(F|r|M}f&_JJHN!KcT5-Lq>yfV;j)qvdd^{Sp3sq+SsdT#_+RGnmcYRSot_2> z{&gzq>&GI-nvL+T(SFC*k7bTE`{^8`nM;cm$8u<&{o8FkYiZNc(WO%XgZo^Rt`p&l?)FrJ9!A4PN37rtQ|{p*?lxuS!6Dl z_t;o8FSA$BM6jJ;biZT}(#Y!m1*5!_YxZ$pzaQT0yx6T=a}>;x?*wr9b~+(LS^IDZ zo<9MC2e3IPPnbc-JXVL3um|NetO@1AAlI<+2YNsDE6Cm&DK8 zt;gCQ=%eWcHZcz>J(^F*-Lqczt|)(wgp1 zFjgze8y_xL-f4*EcN+SwIO`I`{&|OAE={QK`LY8w)GteKtxWLua|#2W!c6MdARf8J z#ht^qxA51UJk{#nL5cDKhsZ4_6SoyO^6J-7-Vu;gf7c=M%|^?%EJvQf=Qf#-nq;y4 P!AVpV6i)5nDs*jy(tGL0sBLY#S?r}Pc&{>a*^D7(j%>*ibz2ztL97c+bXi#3 zWP#9S64%I&yJQK}Ij3=q;Rii4%VY!Q4`aoICT?Mhkw1PU;#d=6oYA-U()YaK$N6!d zdp@3X&U?-sJ2|EsBa*CKQ76{cNMTuyo^}8IUO|&;m8K~tf8PFnwvE9y#mp_|cU*pz zL#!*6Nu)A5NM)8CP9v;5I#gV#WVX2*m4;sZdYI_en;0+U_c>b&kT08A&~?;Q2`BsX zcmAP)>L3|^q5T=^O6tuL9;)I+x!$E<kOag>fa|i#V-s?z2J~4iuBeERE@2|+V z&~J4>$a5W3UkAgNOaALeT_HLTU9Rln(7);w3P;JAvI}Dc3C@86^CvO;F z^2Uq*pF>=${J~eowq3}5bk5cam*$Mj1SGAwo&{s>3-kt8hiSpW>PJodO-3iLVgNfO zfw(L1xeoRmG_NXVtdgIa-x)z&<*FA~f?h1k{XucLXTGdwzC1l|=@Jmsc%3Mz`2G-r z(3Gg~^kPAi+Z}Dn^iTd;B~|42zy^!;Hs+VL7uRFAGWE(@+y`!JwyzLZ7S(PgX3|z7 zJQ0CNCCsF4e@O)+Ne1#9PGQk9#20Ko{(@xQnsN%TVc6dE0s7>3LV!V|!@jiu$|79f z?!fMm?4;W~eEp%rGJ!_8OhU7YdM-jox4@?Azjgjftbu0J7A_STJex3DEhjd-gjTwMOgq zwa0Gkwp^o*JfibJMCVPNUXrTejCW}&0a9nZGngu@a_zt9h5n1H?={nGVIUN?9B1^~ zzxwQrj81wSTL$f%KU#!ne%S<=F!*^h1FC!V#Nm%888E;5%B^zidN2?9OBqJmNb5)Z z_!i`_w#EA2{N7U-Bfk~QoYh+3VJuKlg*MurdX5CL^g_wu^y9$vC2AAVfc&QT4V{X~4D94$dSA|B(O1CVGj@c;k- delta 1794 zcmZ8hZ%k8H6i@BoDb%)u($~^fYFpbnVSR01p;g8-Y7AL)L=zKrE{v%dVWG)f78W-# z5Ng!8Mm}7VB~bqxMMNDv8snb<^TV==2~FI>Hq7|4X)={HAx6!1`<~o$!-w_b;0-h5d5!~r2Z2Sz1dQurP)J+$D z;bvHbtn^eigWD|B;^~O0_$PuD!;^g3zuEb>8 zOhcq$p<#u|bonn)ECOoZIec{#;xpwJuj6;s^A&@(hL0H-%Ws7R`t^3(2M7Yy&G{Eo zhw9r;?50sH!hHh0*HMob$Dpyw@jlK_jL>#8gW+dKlq*Wm*{89HMg=sCJNukSonL{3 zKIa5|Zt?Sti09X!3HGdWt>TCj9YFW`7z1UAB+I=P=-BLoB;`q{~r zVQh=Nbsn?{KDhvk^803iQJqgTa-gzWFYUf~k^}RvA%B#bmxFP@SIh}gRn`vqa2lv| zWs$YFe4ca2kzWjKv|@%C{%P@-RWO<4!*K^)z{CD5`$x&a^b7yQZAKGRxnIK4XKcmg zH(+tgJFR$O5IRbhwe`;-H{4m~--&EMoj--o2@?9h6%*RZO3+qTInkD&x+<${t2)}} zFis6s^~V`wNa@gk_gxt91~d`GRihqk3rw*ej!Y(RdaaQCG|-6>LeSU};3S3ARdRnG l=-P&CFnB*ud>nJtm5E)_U#K~xf>U2gYf7;aq{GrN;eY6vF;V~k diff --git a/esp32/lib/libmdns.a b/esp32/lib/libmdns.a index 5eae7b2f522025d3f370aa0a039452a02f09a50a..0a90dd4cd2725f5986ef48a1177c8805f639d13f 100644 GIT binary patch delta 93 zcmbQxB0m9$Bst9tObsoJEG^78Dp@nbd8W;2%-hqL8LPJkYH2>@j24;KIc diff --git a/esp32/lib/libnewlib.a b/esp32/lib/libnewlib.a index 5bfc45b70f00b12a410e98bce3fc04adaa27b9c8..2d38cb67ff60565c3c65db3f95b97fb24505f570 100644 GIT binary patch delta 222 zcmX@`m;JzB_6d@lW(KB)7DkqqCL5I&GsAhto6j+~uSVj=t$(eE;7&frEVeo0q9qHO z(1EKT?NNocUl3)Cv_TOQ-|iX2m>~ccGXa_=zWrhn;}RsX?RCYB+d~m*w%eU#yey31 SgY_8RWqiPoF7}qOUl0I~R6_p% delta 222 zcmX@`m;JzB_6d@lrk2L01|}B9<{On3GsAgio6j+~uSVj=t$(eE;7&frEVeo0q9qHO z(1EKT?NNocUl3)Cv_TOQ-|iX2m?3~Bb}@-@2|~<#dtEW(_E5MQ^X+yg87~VX_&^tk RZ#TTl_<$c>>@8!zAOMhELjC{% diff --git a/esp32/lib/libnghttp.a b/esp32/lib/libnghttp.a index 71693b85eb9e29cfa7877c59ddb6dd056ea51e80..c6f1c210f6b269d26f7d9964422aa374934057c7 100644 GIT binary patch delta 509 zcmZpA0m|GYZ#{(A_)Q&iEr1x$C#207c`v?vZH;oCle4e z12GE_vjQ<25VLRJ?8&jE5U$v)yLgxidm=`-NzJc2^|+g9ZGL`A`g#-2P-ezda(fzy^tLcV-kgVt~-tE?^|EUBE~% rSq4S3#P-R4f;~Y9b<=?sh;O%FD40?S7qox`%3&#??T4j=?XLj0fr*8Q!A2!t6By6fe0o4MquAy?lfO@q#3oGP5#PRAigAJ< zlHdkkUh(bGI*f1h5Q5u*y14@p{OMpt)oU217$OM*6^U=xzsH!84HvYS4ziuzbLDT+j74PZog14r4mUH6b0>vrG&O0mJ+tV1^_)tmDT_N diff --git a/esp32/lib/libnvs_flash.a b/esp32/lib/libnvs_flash.a index 27fecd791efeca9f012914afebdc5c4e748f4670..85d5b40816121a3a34835ba3ea763204dcb224b5 100644 GIT binary patch delta 175 zcmcchQTx_M?Fo{cW(KB)7Dkqq<{OoKh2cDt%@xAorAXWx9ka#ZT+`;71?@Ep7`N9f zU@De|3!82Kv72f3E+qb(GUn#<2!6YU8_RYLH&*EoxR`mn&n#9TX4~#Fi~W5)lDLZ$ PN4tv@=XMttQ-=H~MVe!GSn%XSSnR_PEVF`rqi?LM>Ew)@Ote_xLz?jps} O?jpsx-9?IP+C2b_!8G~+ diff --git a/esp32/lib/libopenssl.a b/esp32/lib/libopenssl.a index 4d179e3fca44707f6eafba12f47857d6bb705a41..940b07af9da59fca53d089af2a12133db7d86639 100644 GIT binary patch delta 185 zcmey;F7TyYV1gv4nSrUHg^{JD=|-jPya?WOz7j^U%|Cd*Dxiz;=s(QD5SukI99?YB rN6#jNSUb?X?R+In&FKg+upQes+-6dgMi>0>jp^iXbio^+m}LY3ST{BD delta 185 zcmey;F7TyYV1gv4sim>0fr*8Q@kXWXyl|e;biNWsvCThtzbc@M@#sIy!VsG^F&tfN v&qvQDgjhS!yzP7?OwH*CF|ZxmH{51Yl!gl$Lj*s3V>MNx?P9 diff --git a/esp32/lib/libpthread.a b/esp32/lib/libpthread.a index 3e4296cf4167bfc1ed5640f3ad5d547532174e90..c03c03d409550f95564da9a2c7520a1037683b94 100644 GIT binary patch delta 79 zcmZ2vLJYq10uvWYq81(BZM{wMC5xQxF8kH_ZDow Jw}8=w7XX?;7oY$D delta 79 zcmZ24G98zB$vory4F~vH9Pz k=vo99q-lGF3uA2(LTvlLWsLiGBKSZx;@j^gFqwA(0QxU1TmS$7 delta 131 zcmbPog?q{s?g^5drk2L01|}9JCL5Lhv%z`Blm8tP+w8#3>4G98zB$vory3!&`QNeV kS_BuQX?ukWV{H;#%w+q&WsLiG!ucSB#kb#0U^4Fn0Prm=F8}}l diff --git a/esp32/lib/libsmartconfig_ack.a b/esp32/lib/libsmartconfig_ack.a index 3cdd913d8ba4ca3ac3ebba7c309d4c800fb6e675..e1741be7dc0be4bba1b3a9e1427e62e3e9448be5 100644 GIT binary patch delta 35 jcmex1mGRqD#tD*~W(KB)7Dkqq<`b3HA~+jw$aw(((0vNy delta 35 jcmex1mGRqD#tD*~rk2L01|}9JCKHv`A~+jw$aw((&_)W` diff --git a/esp32/lib/libsoc.a b/esp32/lib/libsoc.a index f8b9343c083ce12975cb7ed5cd5e3c1521438b8e..6aec8764b35343e070f4c6460e8b1cb91a917316 100644 GIT binary patch delta 299 zcmdlqhj-H)-U*VNW(KB)7Dkqq78{lBvcq}ilOHIGZe$*z>;eG%c_)7W diff --git a/esp32/lib/libtcpip_adapter.a b/esp32/lib/libtcpip_adapter.a index cc61eeb67b00e11399605ed280b6c9f1ac7d203d..763f3f2741bfdaf7595594735a5ac49b544d4d79 100644 GIT binary patch delta 41 pcmex!i2ctY_6d@lW(KB)7DkqqmK&AQSrEMDNi5qZu`s^60{|e04RZhh delta 41 pcmex!i2ctY_6d@lrk2L01|}9JrW=*gSrEMDNi5qZu`s^60{|cQ4QBuV diff --git a/esp32/lib/libvfs.a b/esp32/lib/libvfs.a index f5031c088f98cae4913a44f6fde9a9136ab34c2a..3e49b40f6f7151f3a1e1549518ad69c90a34bf65 100644 GIT binary patch delta 61 zcmZ2;iF?f@?g^5dW(KB)7DkqqmK&A)nc+N(<|^jxRm_a3&Krf(2@7iyn{)V_%F2i-HIv7bYS}YD$PucJA5OdEAHl;rX5C{Lgd#&vQ@j(4eZ9 zeEliWW|M~>a)NiXDybN=?KHvbzdBxqnBS!4z2l=tT!_^d zMG0R0R_*>U20i(z4h)BhAY|35PL-p~iDZoc1GiKcGZ3Vi<`I=Ics8k6gf+ivs3wr4 z#IjNgjF(4bRffaW_J}nMD@w9?*m)T-v4ArB&ynr34+3cK&P3EK}NWM8k$d zJA*Bz*>hL4kDVx6nPhnMN_)5vLE6@xW$m;(1TFMJ(tMo`=Iiv%Y_=eYoq7;EV@8;Q zh2BBh_Qb%pCw7uep+%;%_4aRU!BR*;l-=B30St?AE;WKgmUy)s_mSP06k$)};j$+F z{nJpUMVSCWYMhFP#;JtaX0$+^tj_V(E#H&Gf?o*IvUK;8&VFYQ+}8}Vbu5;Z zKNsr17$SpzDH#}YxYE)dF8Q+^Wm35gXY$&Q-B5s=#m2U82vSY6o~*n9WE8>8 H&|!^Z)+M}T2gmciq`UBSN5e0F)T<)9}=XcEDGOvhtELOR2roKAC-?Di~Si;fI{y8?8z#!fZQL@CB}pmmwAqwY+b9^oSd=`oajo zXV|Je7{Z_@Pt$?nFcE~zTFogd%A82j2{3R=b1@x3nrR-<_)%?G3uuOFP?FLMj9bGp zD?{OGd)OL=6~$RR?7R${SU{Qm=g8}`55hN7g3uaZ zfLP~euGwU2$lVfMfcZ-&GQpi@U6aJ#eEwVKWCPgXL=-oNg=p{Y1Kc!9l1Vil3M#o$ zkqId!1-Rb8@y8ehvP|w`7OPY1KXB_A2vWJ!buJDUrW3ehBKyiiGNlb?By2eKGtA=M zdFQU^AG=VtvdQr1mHu!6g7jKhIN;BAKxr2cmt<+Z2xLK6($2WmR+Vsjp$PPrb8vFXHsg~7zC2JG=*aFGwCW}v8v=KPFsl&Lc99yxGT~I z*e==C#r@Zp_O2UcDg#O@hICjlh>2V1fL@Lmk&(_W$F3GTb34QJ3}vb}c09B7CxbvN wKL3@)v?Ix{&n8a}`1R)eKj=`sUQKQ*yN}&=2N!eSu)m94BC7}s#uL{32;OEM0X8uJLaq!V delta 48 ncmbQ_Gs$OyB&VsRv8jQHg^AfjrMU>s#uL{32;OEM0X8uJLE#J& From 6e2ff2942d2546ca640923b8de5816560560c672 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 23 Nov 2020 19:42:05 +0100 Subject: [PATCH 23/46] Update Pybytes to version 1.6.1 --- esp32/frozen/Pybytes/_OTA.py | 14 +- esp32/frozen/Pybytes/_pybytes_constants.py | 9 +- .../Pybytes/_pybytes_machine_learning.py | 176 ++++++++++++++++++ esp32/frozen/Pybytes/_pybytes_protocol.py | 82 +++++--- .../frozen/Pybytes/_pybytes_pymesh_config.py | 32 ++-- esp32/frozen/Pybytes/_terminal.py | 10 +- esp32/pycom_version.h | 2 +- 7 files changed, 282 insertions(+), 43 deletions(-) create mode 100644 esp32/frozen/Pybytes/_pybytes_machine_learning.py diff --git a/esp32/frozen/Pybytes/_OTA.py b/esp32/frozen/Pybytes/_OTA.py index 63d20ac3ec..a1391035c3 100644 --- a/esp32/frozen/Pybytes/_OTA.py +++ b/esp32/frozen/Pybytes/_OTA.py @@ -137,7 +137,6 @@ def update(self, customManifest=None, fwtype=None, token=None): def get_file(self, f): new_path = "{}.new".format(f['dst_path']) - # If a .new file exists from a previously failed update delete it try: os.remove(new_path) @@ -184,6 +183,15 @@ def delete_file(self, f): def write_firmware(self, f): # hash = + url = f['URL'].split("//")[1].split("/")[0] + + if url.find(":") > -1: + self.ip = url.split(":")[0] + self.port = int(url.split(":")[1]) + else: + self.ip = url + self.port = 443 + self.get_data( f['URL'].split("/", 3)[-1], hash=True, @@ -222,7 +230,6 @@ def _http_get(self, path, host): def get_data(self, req, dest_path=None, hash=False, firmware=False): h = None - useSSL = int(self.port) == 443 # Connect to server @@ -232,11 +239,9 @@ def get_data(self, req, dest_path=None, hash=False, firmware=False): if (int(self.port) == 443): print("Wrapping socket") s = ssl.wrap_socket(s) - print("Sending request") # Request File s.sendall(self._http_get(req, "{}:{}".format(self.ip, self.port))) - try: content = bytearray() fp = None @@ -247,6 +252,7 @@ def get_data(self, req, dest_path=None, hash=False, firmware=False): fp = open(dest_path, 'wb') if firmware: + print_debug(4, "Starting OTA...") pycom.ota_start() h = uhashlib.sha1() diff --git a/esp32/frozen/Pybytes/_pybytes_constants.py b/esp32/frozen/Pybytes/_pybytes_constants.py index aa1d27cd67..8ae4058530 100644 --- a/esp32/frozen/Pybytes/_pybytes_constants.py +++ b/esp32/frozen/Pybytes/_pybytes_constants.py @@ -69,11 +69,12 @@ class constants: __TYPE_OTA = 0x05 __TYPE_FCOTA = 0x06 __TYPE_PONG = 0x07 - __TYPE_PYMESH = 0x0D - __TYPE_PYBYTES = 0x0E - __TYPE_RELEASE_INFO = 0x0B __TYPE_RELEASE_DEPLOY = 0x0A + __TYPE_RELEASE_INFO = 0x0B __TYPE_DEVICE_NETWORK_DEPLOY = 0x0C + __TYPE_PYMESH = 0x0D + __TYPE_PYBYTES = 0x0E + __TYPE_ML = 0x0F __PYBYTES_PROTOCOL = ">B%ds" __PYBYTES_PROTOCOL_PING = ">B" __PYBYTES_INTERNAL_PROTOCOL = ">BBH" @@ -90,6 +91,8 @@ class constants: __COMMAND_ANALOG_WRITE = 4 __COMMAND_CUSTOM_METHOD = 5 __COMMAND_CUSTOM_LOCATION = 6 + __COMMAND_START_SAMPLE = 7 + __COMMAND_DEPLOY_MODEL = 8 __FCOTA_COMMAND_HIERARCHY_ACQUISITION = 0x00 __FCOTA_COMMAND_FILE_ACQUISITION = 0x01 diff --git a/esp32/frozen/Pybytes/_pybytes_machine_learning.py b/esp32/frozen/Pybytes/_pybytes_machine_learning.py new file mode 100644 index 0000000000..5c1fce6626 --- /dev/null +++ b/esp32/frozen/Pybytes/_pybytes_machine_learning.py @@ -0,0 +1,176 @@ +''' +Copyright (c) 2020, Pycom Limited. +This software is licensed under the GNU GPL version 3 or any +later version, with permitted additional terms. For more information +see the Pycom Licence v1.0 document supplied with this file, or +available at https://www.pycom.io/opensource/licensing +''' + +import math +import json + +try: + from pybytes_debug import print_debug +except: + from _pybytes_debug import print_debug + +try: + import urequest +except: + import _urequest as urequest + +try: + from pybytes_constants import constants +except: + from _pybytes_constants import constants + +import pycom + +try: + from LIS2HH12 import * +except: + print_debug(5, "LIS2HH12 not imported") + +# 20 seconds, max window in time for recording +MAX_LEN_MSEC = const(20000) + +# 350Hz, max frequency +MAX_FREQ_HZ = const(350) + + +class MlFeatures(): + def __init__(self, pybytes_protocol=None, parameters=None): + if parameters is not None: + self.__length = parameters["length"] + self.__label = parameters["label"] + self.__sampleName = parameters["sampleName"] + self.__type = parameters["type"] + self.__device = parameters["device"] + self.__model = parameters["model"] + self.__mlSample = parameters["mlSample"] + self.__frequency = parameters["frequency"] + self.__pybytes_protocol = pybytes_protocol + self.__data = [] + + def _debug_hack(self, pybytes): + self.__pybytes = pybytes + + def start_sampling(self, pin): + # here define the required libraries + try: + from pysense import Pysense + except: + print_debug(5, "pysense not imported") + + try: + from pytrack import Pytrack + except: + print_debug(5, "pytrack not imported") + + lib = False + try: + py = Pysense() + lib = True + except NameError: + print_debug(5, "Pysense not defined") + + if not lib: + try: + py = Pytrack() + except NameError: + print_debug(5, "Check if Pysense/Pytrack libraries are loaded") + return + + try: + li = LIS2HH12(py) + except NameError: + print_debug(5, "LIS2HH12 library are not loaded") + return + li.set_odr(ODR_400_HZ) + + # make the max record length to 20 seconds + self.__length = min(MAX_LEN_MSEC, self.__length) + + # make the max frequency to 350Hz + self.__frequency = min(MAX_FREQ_HZ, self.__frequency) + + # compute time interval between 2 consecutive samples + delta_t_us = int(1000000.0 / self.__frequency) + # compute the number of samples to be acquisition + samples_num = math.ceil(self.__length * self.__frequency / 1000) + 1 + + try: + pycom.heartbeat(False) + pycom.rgbled(0x7f7f00) + except: + pass + time.sleep(0.5) + + self.__data = [] + index = 0 + print("Start acquisition data for %d msec, freq %d Hz" % (self.__length, self.__frequency)) + + next_ts = time.ticks_us() + ts_orig = next_ts + while True: + while time.ticks_diff(next_ts, time.ticks_us()) > 0: + pass + acc = li.acceleration() + ts = next_ts + self.__data.append((ts - ts_orig, acc)) + next_ts = ts + delta_t_us + index += 1 + if index >= samples_num: + break # done + + print("Done acquisition %d samples, real freq %.1f Hz" % (index, index / (self.__length / 1000))) + self._parse_data(pin) + + def _send_data(self, data, pin, acc, ts): + if self.__pybytes_protocol is not None: + if self.__type == 2: + self.__label = self.__sampleName + self.__pybytes_protocol.send_pybytes_custom_method_values(pin, [ + data], + 'sample/{}/{}/{}/{}/{}'.format(self.__label, self.__type, self.__model, self.__device, self.__mlSample)) + else: + self.__pybytes.send_signal(pin & 0xFF, str((int(ts / 1000), acc))) + + def _parse_data(self, pin): + print("_parse_data, %d samples" % len(self.__data)) + try: + pycom.rgbled(0x8d05f5) + except: + pass + data = ['{"data": "ml"}'] + for (ts, acc) in self.__data: + data.append('{' + '"data": [{},{},{}], "ms": {}'.format(acc[0], acc[1], acc[2], int(ts / 1000)) + '}') + if len(data) > 25: + self._send_data(data, pin, acc, ts) + data = ['{"data": "ml"}'] + self._send_data(data, pin, acc, ts) + try: + pycom.heartbeat(True) + except: + pass + + def deploy_model(self, modelId, silent=False): + try: + file = '/flash/model_definition.json' + modelDefinition = {} + url = '{}://{}/ml/{}'.format( + constants.__DEFAULT_PYCONFIG_PROTOCOL, + constants.__DEFAULT_PYCONFIG_DOMAIN, + modelId + ) + print_debug(2, '{}'.format(url)) + result = urequest.get(url, headers={'content-type': 'application/json'}) + modelDefinition = json.loads(result.content.decode()) + print_debug(2, 'modelDefinition: {}'.format(modelDefinition)) + f = open(file, 'w') + f.write(json.dumps(modelDefinition).encode('utf-8')) + f.close() + print_debug(2, "Model definition written to {}".format(file)) + except Exception as e: + if not silent: + print_debug(2, "Exception: {}".format(e)) diff --git a/esp32/frozen/Pybytes/_pybytes_protocol.py b/esp32/frozen/Pybytes/_pybytes_protocol.py index 385d8c6f9c..6934f3ee44 100644 --- a/esp32/frozen/Pybytes/_pybytes_protocol.py +++ b/esp32/frozen/Pybytes/_pybytes_protocol.py @@ -31,6 +31,11 @@ except: from _pybytes_pymesh_config import PybytesPymeshConfig +try: + from pybytes_machine_learning import MlFeatures +except: + from _pybytes_machine_learning import MlFeatures + try: from pybytes_config_reader import PybytesConfigReader except: @@ -281,10 +286,10 @@ def __process_recv_message(self, message): splittedBody = bodyString.split(',') if (len(splittedBody) >= 2): path = splittedBody[0] - print_debug(2, path[len(path)-7:len(path)]) - if (path[len(path)-7:len(path)] != '.pymakr'): + print_debug(2, path[len(path) - 7:len(path)]) + if (path[len(path) - 7:len(path)] != '.pymakr'): self.send_fcota_ping('updating file...') - newContent = bodyString[len(path)+1:len(body)] + newContent = bodyString[len(path) + 1:len(body)] if (self.__FCOTA.update_file_content(path, newContent) is True): # noqa size = self.__FCOTA.get_file_size(path) self.send_fcota_file(newContent, path, size) @@ -319,7 +324,18 @@ def __process_recv_message(self, message): if (len(body) > 3): value = body[2] << 8 | body[3] - if (command == constants.__COMMAND_PIN_MODE): + if (command == constants.__COMMAND_START_SAMPLE): + parameters = ujson.loads(body[2: len(body)].decode("utf-8")) + sampling = MlFeatures(self, parameters=parameters) + sampling.start_sampling(pin=parameters["pin"]) + self.send_ota_response(result=2, topic='sample') + elif (command == constants.__COMMAND_DEPLOY_MODEL): + parameters = ujson.loads(body[2: len(body)].decode("utf-8")) + sampling = MlFeatures() + sampling.deploy_model(modelId=parameters["modelId"]) + self.send_ota_response(result=2, topic='deploymlmodel') + + elif (command == constants.__COMMAND_PIN_MODE): pass elif (command == constants.__COMMAND_DIGITAL_READ): @@ -633,16 +649,11 @@ def write_firmware(self, customManifest=None): def get_application_details(self, body): application = self.__conf.get('application') if application is not None: - if 'id' in application and application['id']: - applicationID = application['id'] - else: - applicationID = body['applicationId'] if 'release' in application and 'codeFilename' in application['release']: currentReleaseID = application['release']['codeFilename'] else: currentReleaseID = None else: - applicationID = body['applicationId'] currentReleaseID = None self.__conf['application'] = { "id": "", @@ -652,6 +663,7 @@ def get_application_details(self, body): "version": 0 } } + applicationID = body['applicationId'] return (applicationID, currentReleaseID) def get_update_manifest(self, applicationID, newReleaseID, currentReleaseID): @@ -755,21 +767,46 @@ def update_network_config(self, letResp): except Exception as e: print_debug(1, "error while updating network config pybytes_config.json! {}".format(e)) - def update_firmware(self, body): + def update_firmware(self, body, applicationID, fw_type='pybytes'): if "firmware" not in body: print_debug(0, "no firmware to update") return - version = body['firmware']["version"] - print_debug(0, "updating firmware to {}".format(version)) - customManifest = { - "firmware": { - "URL": "https://{}/downloads/appimg/firmware_{}_{}.bin".format( - constants.__DEFAULT_SW_HOST, - os.uname().sysname, - version), + + if "version" in body['firmware']: + version = body['firmware']["version"] + print_debug(0, "updating firmware to {}".format(version)) + + customManifest = { + "firmware": { + "URL": "https://{}/findupgrade?redirect=true&strict=true&type={}&model={}&version={}&download=true".format( + constants.__DEFAULT_SW_HOST, + fw_type, + os.uname().sysname, + version), + } } - } - self.write_firmware(customManifest) + self.write_firmware(customManifest) + else: + fileUrl = '{}://{}/firmware?'.format(constants.__DEFAULT_PYCONFIG_PROTOCOL, constants.__DEFAULT_PYCONFIG_DOMAIN) + customFirmwares = body['firmware']["customFirmwares"] + firmwareFilename = '' + for firmware in customFirmwares: + print_debug(1, "firmware['firmwareType']={} and os.uname().sysname.lower()={}".format(firmware['firmwareType'], os.uname().sysname.lower())) + print_debug(1, "firmware={}".format(firmware)) + if (firmware['firmwareType'] == os.uname().sysname.lower()): + firmwareFilename = firmware['firmwareFilename'] + targetFileLocation = '{}application_id={}&target_ver={}&target_path={}'.format( + fileUrl, + applicationID, + firmwareFilename, + '/{}.bin'.format(firmwareFilename) + ) + customManifest = { + "firmware": { + "URL": targetFileLocation, + } + } + self.write_firmware(customManifest) def deploy_new_release(self, body): try: @@ -783,12 +820,15 @@ def deploy_new_release(self, body): applicationID, currentReleaseID = self.get_application_details(body) letResp = self.get_update_manifest(applicationID, newReleaseID, currentReleaseID) + if not letResp: return + fwtype = 'pygate' if hasattr(os.uname(), 'pygate') else 'pybytes' + fwtype = 'pymesh' if hasattr(os.uname(), 'pymesh') else fwtype self.update_files(letResp, applicationID, newReleaseID) self.delete_files(letResp) self.update_application_config(letResp, applicationID) self.update_network_config(letResp) - self.update_firmware(letResp) + self.update_firmware(letResp, applicationID, fw_type=fwtype) machine.reset() diff --git a/esp32/frozen/Pybytes/_pybytes_pymesh_config.py b/esp32/frozen/Pybytes/_pybytes_pymesh_config.py index 116f797925..ff12070d1c 100644 --- a/esp32/frozen/Pybytes/_pybytes_pymesh_config.py +++ b/esp32/frozen/Pybytes/_pybytes_pymesh_config.py @@ -45,7 +45,10 @@ def pymesh_init(self): except: from _pymesh import Pymesh - pycom.heartbeat(False) + try: + pycom.heartbeat(False) + except: + pass # read config file, or set default values self.__pymesh_config = PymeshConfig.read_config() @@ -81,7 +84,7 @@ def unpack_pymesh_message(self, signal_number, value): # send data to the port equal with signal_number self.__pymesh.send_mess_external(pyb_ip, signal_number, pkt_start + value) - + time.sleep(3) # shouldn't send too fast to BR # hardcode monitoring data to be sent on signal #2 @@ -93,11 +96,14 @@ def pymesh_new_message_cb(self, rcv_ip, rcv_port, rcv_data): print_debug(99, 'Received: {} '.format(rcv_data)) # user code to be inserted, to send packet to the designated Mesh-external interface - for _ in range(3): - pycom.rgbled(0x888888) - time.sleep(.2) - pycom.rgbled(0) - time.sleep(.1) + try: + for _ in range(3): + pycom.rgbled(0x888888) + time.sleep(.2) + pycom.rgbled(0) + time.sleep(.1) + except: + pass return def pymesh_new_br_message_cb(self, rcv_ip, rcv_port, rcv_data, dest_ip, dest_port): @@ -106,11 +112,13 @@ def pymesh_new_br_message_cb(self, rcv_ip, rcv_port, rcv_data, dest_ip, dest_por print_debug(99, 'Incoming %d bytes from %s (port %d), to external IPv6 %s (port %d)' % (len(rcv_data), rcv_ip, rcv_port, dest_ip, dest_port)) print_debug(99, 'Received: {} '.format(rcv_data)) - for _ in range(2): - pycom.rgbled(0x0) - time.sleep(.1) - pycom.rgbled(0x663300) - + try: + for _ in range(2): + pycom.rgbled(0x0) + time.sleep(.1) + pycom.rgbled(0x663300) + except: + pass # try to find Pybytes Token if include in rcv_data token = "" if rcv_data.startswith(self.__pack_tocken_prefix): diff --git a/esp32/frozen/Pybytes/_terminal.py b/esp32/frozen/Pybytes/_terminal.py index 7125ff5729..35f0b82ec8 100644 --- a/esp32/frozen/Pybytes/_terminal.py +++ b/esp32/frozen/Pybytes/_terminal.py @@ -23,10 +23,16 @@ def write(self, data): self.message_to_send += data # self.__pybytes_protocol.__send_terminal_message(data) else: - self.original_terminal.write(data) + try: + self.original_terminal.write(data) + except: + pass def read(self, size): - return self.original_terminal.read(size) + try: + return self.original_terminal.read(size) + except: + return b'' def message_sent_from_pybytes_start(self): self.message_from_pybytes = True diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index dfa8be4d40..cbe246821c 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -17,7 +17,7 @@ #define SIGFOX_VERSION_NUMBER "1.0.1" #if (VARIANT == PYBYTES) -#define PYBYTES_VERSION_NUMBER "1.5.2" +#define PYBYTES_VERSION_NUMBER "1.6.1" #endif #ifdef PYGATE_ENABLED From 1097cbebd7cc341df4920595bac784dfee6170db Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 23 Nov 2020 19:42:37 +0100 Subject: [PATCH 24/46] Update pycom_version.h Firmware release 1.20.2.r2 --- esp32/pycom_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index cbe246821c..55b3ed1ca3 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -10,7 +10,7 @@ #ifndef VERSION_H_ #define VERSION_H_ -#define SW_VERSION_NUMBER "1.20.2.rc11" +#define SW_VERSION_NUMBER "1.20.2.r2" #define LORAWAN_VERSION_NUMBER "1.0.2" From 72bc4a7328a05bbb68f632d1d6d50a783cdaa829 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 23 Nov 2020 20:44:32 +0100 Subject: [PATCH 25/46] Update _pybytes_protocol.py Use correct web call for release upgrades --- esp32/frozen/Pybytes/_pybytes_protocol.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/esp32/frozen/Pybytes/_pybytes_protocol.py b/esp32/frozen/Pybytes/_pybytes_protocol.py index 6934f3ee44..f7d1ba41ed 100644 --- a/esp32/frozen/Pybytes/_pybytes_protocol.py +++ b/esp32/frozen/Pybytes/_pybytes_protocol.py @@ -69,6 +69,7 @@ import struct import machine import ujson +import pycom class PybytesProtocol: @@ -778,13 +779,16 @@ def update_firmware(self, body, applicationID, fw_type='pybytes'): customManifest = { "firmware": { - "URL": "https://{}/findupgrade?redirect=true&strict=true&type={}&model={}&version={}&download=true".format( + "URL": "https://{}/manifest.json?sysname={}&wmac={}&ota_slot={}&fwtype={}&target_ver={}&download=true".format( constants.__DEFAULT_SW_HOST, - fw_type, os.uname().sysname, + hexlify(machine.unique_id()).decode('ascii'), + hex(pycom.ota_slot()), + fw_type, version), } } + print_debug(5, "Custom Manifest: {}".format(customManifest)) self.write_firmware(customManifest) else: fileUrl = '{}://{}/firmware?'.format(constants.__DEFAULT_PYCONFIG_PROTOCOL, constants.__DEFAULT_PYCONFIG_DOMAIN) From 94865e581dc967e91d51a279f3b8f888589fd7a7 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Fri, 27 Nov 2020 16:35:59 +0100 Subject: [PATCH 26/46] added micropython constant for manual antenna selection --- esp32/mods/modbt.c | 1 + esp32/mods/modwlan.c | 1 + 2 files changed, 2 insertions(+) diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index 99a79a6570..8b8ae40d1d 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -2268,6 +2268,7 @@ STATIC const mp_map_elem_t bt_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_CHAR_SUBSCRIBE_EVENT), MP_OBJ_NEW_SMALL_INT(MOD_BT_GATTS_SUBSCRIBE_EVT) }, // { MP_OBJ_NEW_QSTR(MP_QSTR_CHAR_INDICATE_EVENT), MP_OBJ_NEW_SMALL_INT(MOD_BT_GATTC_INDICATE_EVT) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MAN_ANT), MP_OBJ_NEW_SMALL_INT(ANTENNA_TYPE_MANUAL) }, { MP_OBJ_NEW_QSTR(MP_QSTR_INT_ANT), MP_OBJ_NEW_SMALL_INT(ANTENNA_TYPE_INTERNAL) }, { MP_OBJ_NEW_QSTR(MP_QSTR_EXT_ANT), MP_OBJ_NEW_SMALL_INT(ANTENNA_TYPE_EXTERNAL) }, diff --git a/esp32/mods/modwlan.c b/esp32/mods/modwlan.c index 81efbd1818..55d5b793ea 100644 --- a/esp32/mods/modwlan.c +++ b/esp32/mods/modwlan.c @@ -2735,6 +2735,7 @@ STATIC const mp_map_elem_t wlan_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_WPA2_ENT), MP_OBJ_NEW_SMALL_INT(WIFI_AUTH_WPA2_ENTERPRISE) }, { MP_OBJ_NEW_QSTR(MP_QSTR_INT_ANT), MP_OBJ_NEW_SMALL_INT(ANTENNA_TYPE_INTERNAL) }, { MP_OBJ_NEW_QSTR(MP_QSTR_EXT_ANT), MP_OBJ_NEW_SMALL_INT(ANTENNA_TYPE_EXTERNAL) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MAN_ANT), MP_OBJ_NEW_SMALL_INT(ANTENNA_TYPE_MANUAL) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HT20), MP_OBJ_NEW_SMALL_INT(WIFI_BW_HT20) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HT40), MP_OBJ_NEW_SMALL_INT(WIFI_BW_HT40) }, { MP_OBJ_NEW_QSTR(MP_QSTR_PHY_11_B), MP_OBJ_NEW_SMALL_INT(WLAN_PHY_11_B) }, From 358085bda144a97d48a9dd6deccb2fe6eb3a91b7 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Thu, 22 Oct 2020 10:49:14 +0200 Subject: [PATCH 27/46] lte: fix core dump during machine.deepsleep() since 26adae2 it is possible that the lte task is not running. with this commit we can safely check the status, notably from modmachine.c machine_deepsleep() --- esp32/lte/lteppp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index ad7f70c28b..36deadbf9b 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -214,6 +214,10 @@ char* lteppp_get_log_buff(void) lte_modem_conn_state_t lteppp_modem_state(void) { lte_modem_conn_state_t state; + if (!xLTESem){ + // lte task hasn't been initialized yet, so we don't need to (and can't) protect this read + return lteppp_modem_conn_state; + } xSemaphoreTake(xLTESem, portMAX_DELAY); state = lteppp_modem_conn_state; xSemaphoreGive(xLTESem); @@ -382,6 +386,10 @@ bool lteppp_wait_at_rsp (const char *expected_rsp, uint32_t timeout, bool from_m lte_state_t lteppp_get_state(void) { lte_state_t state; + if (!xLTESem){ + // lte task hasn't been initialized yet, so we don't need to (and can't) protect this read + return lteppp_lte_state; + } xSemaphoreTake(xLTESem, portMAX_DELAY); state = lteppp_lte_state; xSemaphoreGive(xLTESem); From d4d65a5fa759b8ae139b5ce6fa659253c30796a6 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Mon, 21 Dec 2020 11:50:13 +0100 Subject: [PATCH 28/46] build: cleanup sigfox flags --- esp32/mods/moduos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esp32/mods/moduos.c b/esp32/mods/moduos.c index d928eaa37d..cb1b548e49 100644 --- a/esp32/mods/moduos.c +++ b/esp32/mods/moduos.c @@ -81,7 +81,7 @@ STATIC const qstr os_uname_info_fields[] = { #if defined(LOPY) || defined(LOPY4) || defined(FIPY) ,MP_QSTR_lorawan #endif -#if defined(SIPY) || defined(FIPY) || defined(LOPY4) +#ifdef MOD_SIGFOX_ENABLED ,MP_QSTR_sigfox #endif #if (VARIANT == PYBYTES) @@ -100,7 +100,7 @@ STATIC const MP_DEFINE_STR_OBJ(os_uname_info_machine_obj, MICROPY_HW_BOARD_NAME #if defined(LOPY) || defined(LOPY4) || defined(FIPY) STATIC const MP_DEFINE_STR_OBJ(os_uname_info_lorawan_obj, LORAWAN_VERSION_NUMBER); #endif -#if defined(SIPY) || defined (LOPY4) || defined (FIPY) +#ifdef MOD_SIGFOX_ENABLED STATIC const MP_DEFINE_STR_OBJ(os_uname_info_sigfox_obj, SIGFOX_VERSION_NUMBER); #endif #if (VARIANT == PYBYTES) @@ -117,7 +117,7 @@ STATIC MP_DEFINE_ATTRTUPLE( #if defined(LOPY) || defined(LOPY4) || defined(FIPY) +1 #endif -#if defined(SIPY) || defined (LOPY4) || defined(FIPY) +#ifdef MOD_SIGFOX_ENABLED +1 #endif #if (VARIANT == PYBYTES) @@ -134,7 +134,7 @@ STATIC MP_DEFINE_ATTRTUPLE( #if defined(LOPY) || defined(LOPY4) || defined(FIPY) ,(mp_obj_t)&os_uname_info_lorawan_obj #endif -#if defined(SIPY) || defined (LOPY4) || defined(FIPY) +#ifdef MOD_SIGFOX_ENABLED ,(mp_obj_t)&os_uname_info_sigfox_obj #endif #if (VARIANT == PYBYTES) From 6c52763b1c30369173bc4769413e57b7cb9de15e Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Mon, 21 Dec 2020 16:13:50 +0100 Subject: [PATCH 29/46] lora buildflag and disable cleanly with pyeth previously lora was only /not started/ with pyethernet enabled. but when user tries to use it, it crashes with a nasty looking error: https://forum.pycom.io/topic/6176/pygate-assert-failed-error/2 with this change, lora can be fully excluded now and a user would get the much cleaner: ImportError: cannot import name LoRa --- esp32/Makefile | 28 +++++++++++++++++++++------- esp32/application.mk | 17 +++++++++++++++++ esp32/mods/modmachine.c | 2 +- esp32/mods/modnetwork.c | 6 +++--- esp32/mods/modusocket.c | 8 ++++---- esp32/mptask.c | 22 ++++++---------------- 6 files changed, 52 insertions(+), 31 deletions(-) diff --git a/esp32/Makefile b/esp32/Makefile index 10ca433cca..160ef46a5c 100644 --- a/esp32/Makefile +++ b/esp32/Makefile @@ -32,8 +32,19 @@ PYGATE_ENABLED ?= 0 # COAP is enabled by default MOD_COAP_ENABLED ?= 1 -# SIGFOX is enabled by default. It will only be built for supported boards. +# LORA is enabled by default for supported boards +ifeq ($(BOARD), $(filter $(BOARD), LOPY LOPY4 FIPY)) +MOD_LORA_ENABLED ?= 1 +else +MOD_LORA_ENABLED ?= 0 +endif + +# SIGFOX is enabled by default for supported boards +ifeq ($(BOARD), $(filter $(BOARD), SIPY LOPY4 FIPY)) MOD_SIGFOX_ENABLED ?= 1 +else +MOD_SIGFOX_ENABLED ?= 0 +endif # Pybytes disabled by default PYBYTES_ENABLED ?= 0 @@ -55,6 +66,7 @@ ifeq ($(VARIANT),PYGATE) endif PYBYTES_ENABLED=1 PYETH_ENABLED=1 + MOD_LORA_ENABLED=0 # ETH and LORA are mutually exclusive PYGATE_ENABLED=1 endif @@ -156,6 +168,11 @@ ifeq ($(MOD_COAP_ENABLED), 1) CFLAGS += -DMOD_COAP_ENABLED endif +ifeq ($(MOD_LORA_ENABLED), 1) + $(info LORA Module Enabled) + CFLAGS += -DMOD_LORA_ENABLED +endif + ifeq ($(DIFF_UPDATE_ENABLED), 1) $(info Differential Update Enabled) CFLAGS += -DDIFF_UPDATE_ENABLED -DBZ_NO_STDIO @@ -163,12 +180,9 @@ endif ifeq ($(MOD_SIGFOX_ENABLED), 1) $(info SIGFOX Module Enabled) - - ifeq ($(BOARD), $(filter $(BOARD), SIPY LOPY4 FIPY)) - CFLAGS += -DMOD_SIGFOX_ENABLED - LIBS += sigfox/modsigfox_$(BOARD).a -lsigfox - $(BUILD)/application.elf: sigfox/modsigfox_$(BOARD).a - endif + CFLAGS += -DMOD_SIGFOX_ENABLED + LIBS += sigfox/modsigfox_$(BOARD).a -lsigfox + $(BUILD)/application.elf: sigfox/modsigfox_$(BOARD).a endif ifeq ($(OPENTHREAD), on) diff --git a/esp32/application.mk b/esp32/application.mk index 7fdd0c8256..2efb385f35 100644 --- a/esp32/application.mk +++ b/esp32/application.mk @@ -388,13 +388,30 @@ BOOT_SRC_C = $(addprefix bootloader/,\ SFX_OBJ = OBJ = $(PY_O) +ifeq ($(MOD_LORA_ENABLED), 1) + +ifeq ($(BOARD), $(filter $(BOARD), LOPY FIPY)) +OBJ += $(addprefix $(BUILD)/, $(APP_LORA_SRC_C:.c=.o) $(APP_LIB_LORA_SRC_C:.c=.o) $(APP_SX1272_SRC_C:.c=.o) $(APP_MODS_LORA_SRC_C:.c=.o)) +endif + +ifeq ($(BOARD), $(filter $(BOARD), LOPY4)) +OBJ += $(addprefix $(BUILD)/, $(APP_LORA_SRC_C:.c=.o) $(APP_LIB_LORA_SRC_C:.c=.o) $(APP_SX1276_SRC_C:.c=.o) $(APP_MODS_LORA_SRC_C:.c=.o)) +endif + +endif + +ifeq ($(MOD_SIGFOX_ENABLED), 1) + ifeq ($(BOARD), $(filter $(BOARD), LOPY FIPY)) OBJ += $(addprefix $(BUILD)/, $(APP_LORA_SRC_C:.c=.o) $(APP_LIB_LORA_SRC_C:.c=.o) $(APP_SX1272_SRC_C:.c=.o) $(APP_MODS_LORA_SRC_C:.c=.o)) endif + ifeq ($(BOARD), $(filter $(BOARD), LOPY4)) OBJ += $(addprefix $(BUILD)/, $(APP_LORA_SRC_C:.c=.o) $(APP_LIB_LORA_SRC_C:.c=.o) $(APP_SX1276_SRC_C:.c=.o) $(APP_MODS_LORA_SRC_C:.c=.o)) endif +endif + ifeq ($(MOD_SIGFOX_ENABLED), 1) ifeq ($(BOARD), $(filter $(BOARD), SIPY)) OBJ += $(addprefix $(BUILD)/, $(APP_SIGFOX_MOD_SRC_C:.c=.o)) diff --git a/esp32/mods/modmachine.c b/esp32/mods/modmachine.c index b5d07bfd3c..35aa69bfa6 100644 --- a/esp32/mods/modmachine.c +++ b/esp32/mods/modmachine.c @@ -410,7 +410,7 @@ STATIC mp_obj_t machine_sleep (uint n_args, const mp_obj_t *arg) { } #endif -#if defined(LOPY) || defined(LOPY4) || defined(FIPY) +#ifdef MOD_LORA_ENABLED /* Send LoRa module to Sleep Mode */ modlora_sleep_module(); while(!modlora_is_module_sleep()) diff --git a/esp32/mods/modnetwork.c b/esp32/mods/modnetwork.c index ae96e8375e..26e52323b3 100644 --- a/esp32/mods/modnetwork.c +++ b/esp32/mods/modnetwork.c @@ -112,11 +112,11 @@ mp_obj_t mod_network_find_nic(const mod_network_socket_obj_t *s, const uint8_t * mp_obj_t nic = MP_STATE_PORT(mod_network_nic_list).items[i]; // we want a raw network card if (ip == NULL) { - #if defined (LOPY) || defined(LOPY4) || defined (FIPY) +#ifdef MOD_LORA_ENABLED if (mp_obj_get_type(nic) == (mp_obj_type_t *)&mod_network_nic_type_lora && s->sock_base.u.u_param.domain == AF_LORA) { return nic; } - #endif +#endif #if defined (SIPY) || defined (LOPY4) || defined (FIPY) #if defined (MOD_SIGFOX_ENABLED) if (mp_obj_get_type(nic) == (mp_obj_type_t *)&mod_network_nic_type_sigfox && s->sock_base.u.u_param.domain == AF_SIGFOX) { @@ -371,7 +371,7 @@ STATIC const mp_map_elem_t mp_module_network_globals_table[] = { #ifdef PYETH_ENABLED { MP_OBJ_NEW_QSTR(MP_QSTR_ETH), (mp_obj_t)&mod_network_nic_type_eth }, #endif -#if defined (LOPY) || defined(LOPY4) || defined (FIPY) +#ifdef MOD_LORA_ENABLED { MP_OBJ_NEW_QSTR(MP_QSTR_LoRa), (mp_obj_t)&mod_network_nic_type_lora }, #endif #if defined (SIPY) || defined (LOPY4) || defined (FIPY) diff --git a/esp32/mods/modusocket.c b/esp32/mods/modusocket.c index afb5daaee2..cd660932b2 100644 --- a/esp32/mods/modusocket.c +++ b/esp32/mods/modusocket.c @@ -272,7 +272,7 @@ STATIC mp_obj_t socket_bind(mp_obj_t self_in, mp_obj_t addr_in) { mod_network_socket_obj_t *self = self_in; int _errno; -#if defined (LOPY) || defined(LOPY4) || defined(FIPY) +#ifdef MOD_LORA_ENABLED if (self->sock_base.nic_type == &mod_network_nic_type_lora) { if (MP_OBJ_IS_INT(addr_in)) { mp_uint_t port = mp_obj_get_int(addr_in); @@ -301,7 +301,7 @@ STATIC mp_obj_t socket_bind(mp_obj_t self_in, mp_obj_t addr_in) { if (self->sock_base.nic_type->n_bind(self, ip, port, &_errno) != 0) { nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(_errno))); } -#if defined (LOPY) || defined(LOPY4) || defined(FIPY) +#ifdef MOD_LORA_ENABLED } #endif return mp_const_none; @@ -521,7 +521,7 @@ STATIC mp_obj_t socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_obj_t addr_ uint8_t ip[MOD_USOCKET_IPV6_CHARS_MAX]; mp_uint_t port = 0; -#if defined (LOPY) || defined(LOPY4) || defined(FIPY) +#ifdef MOD_LORA_ENABLED if (self->sock_base.nic_type == &mod_network_nic_type_lora) { mp_obj_t *addr_items; mp_obj_get_array_fixed_n(addr_in, 2, &addr_items); @@ -579,7 +579,7 @@ STATIC mp_obj_t socket_recvfrom(mp_obj_t self_in, mp_obj_t len_in) { vstr.buf[vstr.len] = '\0'; tuple[0] = mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr); } -#if defined (LOPY) || defined(LOPY4) || defined(FIPY) +#ifdef MOD_LORA_ENABLED // check if lora NIC and IP is not set (so Lora Raw or LoraWAN, but no Lora Mesh) if (self->sock_base.nic_type == &mod_network_nic_type_lora) { if (ip[0] == 0) { diff --git a/esp32/mptask.c b/esp32/mptask.c index 1e792db0d9..e5e89919d7 100644 --- a/esp32/mptask.c +++ b/esp32/mptask.c @@ -52,14 +52,12 @@ #include "esp_log.h" #include "mods/pybflash.h" -#if defined (LOPY) || defined (LOPY4) || defined (FIPY) +#ifdef MOD_LORA_ENABLED #include "modlora.h" #endif -#if defined (SIPY) || defined(LOPY4) || defined (FIPY) -#if defined (MOD_SIGFOX_ENABLED) +#ifdef MOD_SIGFOX_ENABLED #include "sigfox/modsigfox.h" #endif -#endif #if defined (GPY) || defined (FIPY) #include "modlte.h" #endif @@ -260,35 +258,27 @@ void TASK_Micropython (void *pvParameters) { // Config Wifi as per Pycom config mptask_config_wifi(false); // these ones are special because they need uPy running and they launch tasks -#ifndef PYETH_ENABLED -// PyEth and LoRa module are both connected via SPI 3, -// so with PyEth enabled, we disable th LoRa module -#if defined(LOPY) || defined (LOPY4) || defined (FIPY) +#ifdef MOD_LORA_ENABLED modlora_init0(); #endif -#if defined(SIPY) || defined(LOPY4) || defined (FIPY) -#if defined (MOD_SIGFOX_ENABLED) +#ifdef MOD_SIGFOX_ENABLED modsigfox_init0(); -#endif -#endif #endif } // initialize the serial flash file system mptask_init_sflash_filesystem(); -#if defined(LOPY) || defined(SIPY) || defined (LOPY4) || defined(FIPY) +#if defined(MOD_LORA_ENABLED) || defined(MOD_SIGFOX_ENABLED) // must be done after initializing the file system mptask_update_lpwan_mac_address(); #endif -#if defined(SIPY) || defined(LOPY4) || defined(FIPY) -#if defined (MOD_SIGFOX_ENABLED) +#ifdef MOD_SIGFOX_ENABLED sigfox_update_id(); sigfox_update_pac(); sigfox_update_private_key(); sigfox_update_public_key(); -#endif #endif // append the flash paths to the system path From e5a00fe43a3a486321da4aeebd74d7c329ccc090 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Fri, 28 Aug 2020 19:43:47 +0200 Subject: [PATCH 30/46] lte: refactor lteppp_get_modem_conn_state() no functional change, but make the code a little more readable by pulling the semaphore and edits into a function and use more intuitive fct names --- esp32/lte/lteppp.c | 39 ++++++++++++++++----------------------- esp32/lte/lteppp.h | 3 ++- esp32/mods/modlte.c | 6 +++--- esp32/mods/modmachine.c | 4 ++-- 4 files changed, 23 insertions(+), 29 deletions(-) diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index 36deadbf9b..2b0b2c30d3 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -174,7 +174,7 @@ void lteppp_init(void) { lteppp_pcb = pppapi_pppos_create(<eppp_netif, lteppp_output_callback, lteppp_status_cb, NULL); //wait on connecting modem until it is allowed - lteppp_modem_conn_state = E_LTE_MODEM_DISCONNECTED; + lteppp_set_modem_conn_state(E_LTE_MODEM_DISCONNECTED); xTaskCreatePinnedToCore(TASK_LTE, "LTE", LTE_TASK_STACK_SIZE / sizeof(StackType_t), NULL, LTE_TASK_PRIORITY, &xLTETaskHndl, 1); @@ -211,7 +211,7 @@ char* lteppp_get_log_buff(void) } #endif -lte_modem_conn_state_t lteppp_modem_state(void) +lte_modem_conn_state_t lteppp_get_modem_conn_state(void) { lte_modem_conn_state_t state; if (!xLTESem){ @@ -224,6 +224,13 @@ lte_modem_conn_state_t lteppp_modem_state(void) return state; } +void lteppp_set_modem_conn_state(lte_modem_conn_state_t state) +{ + xSemaphoreTake(xLTESem, portMAX_DELAY); + lteppp_modem_conn_state = state; + xSemaphoreGive(xLTESem); +} + void lteppp_set_state(lte_state_t state) { xSemaphoreTake(xLTESem, portMAX_DELAY); lteppp_lte_state = state; @@ -455,9 +462,7 @@ static void TASK_LTE (void *pvParameters) { { MSG("notif\n"); xSemaphoreTake(xLTE_modem_Conn_Sem, portMAX_DELAY); - xSemaphoreTake(xLTESem, portMAX_DELAY); - lteppp_modem_conn_state = E_LTE_MODEM_CONNECTING; - xSemaphoreGive(xLTESem); + lteppp_set_modem_conn_state(E_LTE_MODEM_CONNECTING); uart_set_rts(LTE_UART_ID, true); vTaskDelay(500/portTICK_PERIOD_MS); uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_CTS_RTS, 64); @@ -471,9 +476,7 @@ static void TASK_LTE (void *pvParameters) { if (at_trials >= LTE_AT_CMD_TRIALS) { uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_DISABLE, 0); uart_set_rts(LTE_UART_ID, false); - xSemaphoreTake(xLTESem, portMAX_DELAY); - lteppp_modem_conn_state = E_LTE_MODEM_DISCONNECTED; - xSemaphoreGive(xLTESem); + lteppp_set_modem_conn_state(E_LTE_MODEM_DISCONNECTED); xSemaphoreGive(xLTE_modem_Conn_Sem); at_trials = 0; goto modem_init; @@ -494,9 +497,7 @@ static void TASK_LTE (void *pvParameters) { if (at_trials >= LTE_AT_CMD_TRIALS) { uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_DISABLE, 0); uart_set_rts(LTE_UART_ID, false); - xSemaphoreTake(xLTESem, portMAX_DELAY); - lteppp_modem_conn_state = E_LTE_MODEM_DISCONNECTED; - xSemaphoreGive(xLTESem); + lteppp_set_modem_conn_state(E_LTE_MODEM_DISCONNECTED); xSemaphoreGive(xLTE_modem_Conn_Sem); at_trials = 0; goto modem_init; @@ -511,9 +512,7 @@ static void TASK_LTE (void *pvParameters) { if (at_trials >= LTE_AT_CMD_TRIALS) { uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_DISABLE, 0); uart_set_rts(LTE_UART_ID, false); - xSemaphoreTake(xLTESem, portMAX_DELAY); - lteppp_modem_conn_state = E_LTE_MODEM_DISCONNECTED; - xSemaphoreGive(xLTESem); + lteppp_set_modem_conn_state(E_LTE_MODEM_DISCONNECTED); xSemaphoreGive(xLTE_modem_Conn_Sem); at_trials = 0; goto modem_init; @@ -555,22 +554,16 @@ static void TASK_LTE (void *pvParameters) { { lteppp_send_at_cmd("AT+SQNIBRCFG=1,100", LTE_RX_TIMEOUT_MAX_MS); } - xSemaphoreTake(xLTESem, portMAX_DELAY); - lteppp_modem_conn_state = E_LTE_MODEM_CONNECTED; - xSemaphoreGive(xLTESem); + lteppp_set_modem_conn_state(E_LTE_MODEM_CONNECTED); xSemaphoreGive(xLTE_modem_Conn_Sem); MSG("forever\n"); lte_state_t state; for (;;) { vTaskDelay(LTE_TASK_PERIOD_MS); - xSemaphoreTake(xLTESem, portMAX_DELAY); - if(E_LTE_MODEM_DISCONNECTED == lteppp_modem_conn_state) - { - xSemaphoreGive(xLTESem); + if(lteppp_get_modem_conn_state() == E_LTE_MODEM_DISCONNECTED ){ // restart the task goto modem_init; } - xSemaphoreGive(xLTESem); state = lteppp_get_state(); if (xQueueReceive(xCmdQueue, lteppp_trx_buffer, 0)) { MSG("cmd\n"); @@ -868,7 +861,7 @@ static void lteppp_print_states(){ if (!xLTESem) return; static lte_modem_conn_state_t last_c = 0xff; - lte_modem_conn_state_t c = lteppp_modem_state(); + lte_modem_conn_state_t c = lteppp_get_modem_conn_state(); static lte_state_t last_s = 0xff; lte_state_t s = lteppp_get_state(); static bool last_u = false; diff --git a/esp32/lte/lteppp.h b/esp32/lte/lteppp.h index 8ca52c5d7b..289761b8c2 100644 --- a/esp32/lte/lteppp.h +++ b/esp32/lte/lteppp.h @@ -119,7 +119,8 @@ extern void lteppp_send_at_command (lte_task_cmd_data_t *cmd, lte_task_rsp_data_ extern bool lteppp_wait_at_rsp (const char *expected_rsp, uint32_t timeout, bool from_mp, void* data_rem); -lte_modem_conn_state_t lteppp_modem_state(void); +lte_modem_conn_state_t lteppp_get_modem_conn_state(void); +void lteppp_set_modem_conn_state(lte_modem_conn_state_t state); extern void connect_lte_uart (void); diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index 1372c679c8..ec6aabe8f1 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -454,7 +454,7 @@ static mp_obj_t lte_init_helper(lte_obj_t *self, const mp_arg_val_t *args) { //printf("All done since we were already initialised.\n"); return mp_const_none; } - modem_state = lteppp_modem_state(); + modem_state = lteppp_get_modem_conn_state(); switch(modem_state) { case E_LTE_MODEM_DISCONNECTED: @@ -463,7 +463,7 @@ static mp_obj_t lte_init_helper(lte_obj_t *self, const mp_arg_val_t *args) { MP_THREAD_GIL_EXIT(); xSemaphoreTake(xLTE_modem_Conn_Sem, portMAX_DELAY); MP_THREAD_GIL_ENTER(); - if (E_LTE_MODEM_DISCONNECTED == lteppp_modem_state()) { + if (E_LTE_MODEM_DISCONNECTED == lteppp_get_modem_conn_state()) { xSemaphoreGive(xLTE_modem_Conn_Sem); nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't connect to Modem (modem_state=disconnected)")); } @@ -471,7 +471,7 @@ static mp_obj_t lte_init_helper(lte_obj_t *self, const mp_arg_val_t *args) { case E_LTE_MODEM_CONNECTING: // Block till modem is connected xSemaphoreTake(xLTE_modem_Conn_Sem, portMAX_DELAY); - if (E_LTE_MODEM_DISCONNECTED == lteppp_modem_state()) { + if (E_LTE_MODEM_DISCONNECTED == lteppp_get_modem_conn_state()) { xSemaphoreGive(xLTE_modem_Conn_Sem); nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't connect to Modem (modem_state=connecting)")); } diff --git a/esp32/mods/modmachine.c b/esp32/mods/modmachine.c index 35aa69bfa6..28f4f4b9e0 100644 --- a/esp32/mods/modmachine.c +++ b/esp32/mods/modmachine.c @@ -405,7 +405,7 @@ STATIC mp_obj_t machine_sleep (uint n_args, const mp_obj_t *arg) { bool reconnect = false; #if defined(FIPY) || defined(GPY) - if (lteppp_modem_state() < E_LTE_MODEM_DISCONNECTED) { + if (lteppp_get_modem_conn_state() < E_LTE_MODEM_DISCONNECTED) { lteppp_deinit(); } #endif @@ -466,7 +466,7 @@ STATIC mp_obj_t machine_deepsleep (uint n_args, const mp_obj_t *arg) { modbt_deinit(false); wlan_deinit(NULL); #if defined(FIPY) || defined(GPY) - if (lteppp_modem_state() < E_LTE_MODEM_DISCONNECTED) { + if (lteppp_get_modem_conn_state() < E_LTE_MODEM_DISCONNECTED) { lteppp_deinit(); } #endif From 4f07373df9a9994a757475ab08c6cd773a7e3e61 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Fri, 28 Aug 2020 19:44:52 +0200 Subject: [PATCH 31/46] lte: detect modem in ffh/recovery mode when the LTE modem is in 'FFH' mode or in 'RECOVERY' mode, we can't use normal LTE functionality the modem is normally brought into this state if a user starts a modem firmware update, but it is not completed successfully the next logical step is to perform/finish the upgrade FFH and RECOVERY are using 115200 baud. normal "FFF" modem firmware mode uses 921600. So, when we do not get a response at 921600, but we do get a response at 115200, we advise the user to perform upgrade --- esp32/lte/lteppp.c | 38 ++++++++++++++++++++++++++++++++++++-- esp32/lte/lteppp.h | 3 ++- esp32/mods/modlte.c | 13 ++++++++++--- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index 2b0b2c30d3..01035c1d74 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -444,6 +444,35 @@ void lteppp_resume(void) { /****************************************************************************** DEFINE PRIVATE FUNCTIONS ******************************************************************************/ +bool trx_is_ok_or_error(){ + if (strstr(lteppp_trx_buffer, "ERROR\r\n") != NULL){ + // printf("ok\n"); + return true; + } else if (strstr(lteppp_trx_buffer, "OK\r\n") != NULL) { + // printf("error\n"); + return true; + } + return false; +} + +/** check whether modem is responding at 115200 + * this means it is in FFH or RECOVYER mode + */ +bool lteppp_check_ffh_mode(){ + uart_set_baudrate(LTE_UART_ID, 115200); + uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_CTS_RTS, 64); + uart_set_rts(LTE_UART_ID, true); + + for ( uint8_t attempt = 0 ; attempt < 3 ; attempt++ ){ + lteppp_send_at_cmd("AT", LTE_PPP_BACK_OFF_TIME_MS); + if ( trx_is_ok_or_error() ){ + // we could check for AT+SMOD / AT+BMOD to get more details + return true; + } + } + return false; +} + static void TASK_LTE (void *pvParameters) { MSG("\n"); bool sim_present; @@ -510,9 +539,14 @@ static void TASK_LTE (void *pvParameters) { while(!lteppp_send_at_cmd("AT", LTE_RX_TIMEOUT_MIN_MS)) { if (at_trials >= LTE_AT_CMD_TRIALS) { - uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_DISABLE, 0); - uart_set_rts(LTE_UART_ID, false); + if ( lteppp_check_ffh_mode() ){ + lteppp_set_modem_conn_state(E_LTE_MODEM_RECOVERY); + } else { + uart_set_baudrate(LTE_UART_ID, MICROPY_LTE_UART_BAUDRATE); + uart_set_hw_flow_ctrl(LTE_UART_ID, UART_HW_FLOWCTRL_DISABLE, 0); + uart_set_rts(LTE_UART_ID, false); lteppp_set_modem_conn_state(E_LTE_MODEM_DISCONNECTED); + } xSemaphoreGive(xLTE_modem_Conn_Sem); at_trials = 0; goto modem_init; diff --git a/esp32/lte/lteppp.h b/esp32/lte/lteppp.h index 289761b8c2..64b260e80e 100644 --- a/esp32/lte/lteppp.h +++ b/esp32/lte/lteppp.h @@ -61,7 +61,8 @@ typedef enum { typedef enum { E_LTE_MODEM_CONNECTED = 0, E_LTE_MODEM_CONNECTING, - E_LTE_MODEM_DISCONNECTED + E_LTE_MODEM_DISCONNECTED, + E_LTE_MODEM_RECOVERY } lte_modem_conn_state_t; #ifdef LTE_DEBUG_BUFF diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index ec6aabe8f1..b823883ef9 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -463,9 +463,13 @@ static mp_obj_t lte_init_helper(lte_obj_t *self, const mp_arg_val_t *args) { MP_THREAD_GIL_EXIT(); xSemaphoreTake(xLTE_modem_Conn_Sem, portMAX_DELAY); MP_THREAD_GIL_ENTER(); - if (E_LTE_MODEM_DISCONNECTED == lteppp_get_modem_conn_state()) { + lte_modem_conn_state_t modem_state = lteppp_get_modem_conn_state(); + if (E_LTE_MODEM_DISCONNECTED == modem_state) { + xSemaphoreGive(xLTE_modem_Conn_Sem); + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't start connection to Modem (modem_state=disconnected)")); + } else if (E_LTE_MODEM_RECOVERY == modem_state){ xSemaphoreGive(xLTE_modem_Conn_Sem); - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't connect to Modem (modem_state=disconnected)")); + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't start connection to Modem (modem_state=recovery). Perform a modem firmware update.")); } break; case E_LTE_MODEM_CONNECTING: @@ -479,8 +483,11 @@ static mp_obj_t lte_init_helper(lte_obj_t *self, const mp_arg_val_t *args) { case E_LTE_MODEM_CONNECTED: //continue break; + case E_LTE_MODEM_RECOVERY: + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't connect to Modem (modem_state=recovery). Perform a modem firmware update.")); + break; default: - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't connect to Modem (modem_state=default)")); + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Couldn't connect to Modem (modem_state - default)")); break; } lte_obj.cid = args[1].u_int; From 1cde92a684c3c3a95e6602096858f6fd87c0a229 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:45:56 +0200 Subject: [PATCH 32/46] make pycom.rgbled() return the current color value --- esp32/mods/modpycom.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/esp32/mods/modpycom.c b/esp32/mods/modpycom.c index 44551e1e08..a4007622f0 100644 --- a/esp32/mods/modpycom.c +++ b/esp32/mods/modpycom.c @@ -156,22 +156,25 @@ STATIC mp_obj_t mod_pycom_heartbeat (mp_uint_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_pycom_heartbeat_obj, 0, 1, mod_pycom_heartbeat); -STATIC mp_obj_t mod_pycom_rgb_led (mp_obj_t o_color) { +STATIC mp_obj_t mod_pycom_rgb_led (mp_uint_t n_args, const mp_obj_t *args) { #ifndef RGB_LED_DISABLE if (mperror_is_heartbeat_enabled()) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_request_not_possible)); } - - uint32_t color = mp_obj_get_int(o_color); - led_info.color.value = color; - led_set_color(&led_info, true, false); + if(n_args > 0){ + uint32_t color = mp_obj_get_int(args[0]); + led_info.color.value = color; + led_set_color(&led_info, true, false); + } else { + return mp_obj_new_int(led_info.color.value); + } #else nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "RGB Led Interface Disabled")); #endif return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_pycom_rgb_led_obj, mod_pycom_rgb_led); +STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_pycom_rgb_led_obj, 0,1,mod_pycom_rgb_led); STATIC mp_obj_t mod_pycom_ota_start (void) { if (!updater_start()) { From 07294854ac4b47d2af624bc868967bbbfcddf533 Mon Sep 17 00:00:00 2001 From: Roberto Colistete Jr Date: Thu, 6 Aug 2020 02:36:31 -0300 Subject: [PATCH 33/46] User C modules : enable in Makefile and application.mk --- esp32/Makefile | 1 + esp32/application.mk | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/esp32/Makefile b/esp32/Makefile index 160ef46a5c..5826d20992 100644 --- a/esp32/Makefile +++ b/esp32/Makefile @@ -133,6 +133,7 @@ CFLAGS_XTENSA_OPT = -Os CFLAGS_XTENSA_PSRAM = -mfix-esp32-psram-cache-issue CFLAGS = $(CFLAGS_XTENSA) $(CFLAGS_XTENSA_PSRAM) $(CFLAGS_XTENSA_OPT) -nostdlib -std=gnu99 -g3 -ggdb -fstrict-volatile-bitfields -Iboards/$(BOARD) +CFLAGS += $(CFLAGS_MOD) $(CFLAGS_EXTRA) CFLAGS_SIGFOX = $(CFLAGS_XTENSA) -O2 -nostdlib -std=gnu99 -g3 -ggdb -fstrict-volatile-bitfields -Iboards/$(BOARD) # Configure floating point support diff --git a/esp32/application.mk b/esp32/application.mk index 2efb385f35..299e96f87b 100644 --- a/esp32/application.mk +++ b/esp32/application.mk @@ -433,7 +433,7 @@ endif endif # ifeq ($(OPENTHREAD), on) OBJ += $(addprefix $(BUILD)/, $(APP_MAIN_SRC_C:.c=.o) $(APP_HAL_SRC_C:.c=.o) $(APP_LIB_SRC_C:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(APP_MODS_SRC_C:.c=.o) $(APP_STM_SRC_C:.c=.o)) +OBJ += $(addprefix $(BUILD)/, $(APP_MODS_SRC_C:.c=.o) $(APP_STM_SRC_C:.c=.o) $(SRC_MOD:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(APP_FATFS_SRC_C:.c=.o) $(APP_LITTLEFS_SRC_C:.c=.o) $(APP_UTIL_SRC_C:.c=.o) $(APP_TELNET_SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(APP_FTP_SRC_C:.c=.o) $(APP_CAN_SRC_C:.c=.o)) ifeq ($(PYGATE_ENABLED), 1) @@ -453,7 +453,7 @@ OBJ += $(BUILD)/pins.o BOOT_OBJ = $(addprefix $(BUILD)/, $(BOOT_SRC_C:.c=.o)) # List of sources for qstr extraction -SRC_QSTR += $(APP_MODS_SRC_C) $(APP_UTIL_SRC_C) $(APP_STM_SRC_C) $(APP_LIB_SRC_C) +SRC_QSTR += $(APP_MODS_SRC_C) $(APP_UTIL_SRC_C) $(APP_STM_SRC_C) $(APP_LIB_SRC_C) $(SRC_MOD) ifeq ($(BOARD), $(filter $(BOARD), LOPY LOPY4 FIPY)) SRC_QSTR += $(APP_MODS_LORA_SRC_C) endif @@ -480,7 +480,7 @@ BOOT_LDFLAGS = $(LDFLAGS) -T esp32.bootloader.ld -T esp32.rom.ld -T esp32.periph # add the application linker script(s) APP_LDFLAGS += $(LDFLAGS) -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.extram.bss.ld - +APP_LDFLAGS += $(LDFLAGS_MOD) # add the application specific CFLAGS CFLAGS += $(APP_INC) -DMICROPY_NLR_SETJMP=1 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -DWITH_POSIX CFLAGS_SIGFOX += $(APP_INC) -DMICROPY_NLR_SETJMP=1 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM From 5d463a5e8a1c6be70fb79694119cb865dcae5482 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Wed, 23 Dec 2020 10:13:16 +0100 Subject: [PATCH 34/46] version 1.20.2.r3 --- esp32/pycom_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index 55b3ed1ca3..b85d758bb1 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -10,7 +10,7 @@ #ifndef VERSION_H_ #define VERSION_H_ -#define SW_VERSION_NUMBER "1.20.2.r2" +#define SW_VERSION_NUMBER "1.20.2.r3" #define LORAWAN_VERSION_NUMBER "1.0.2" From 26a10b28e7480b47efa71c9370a5758bf360faf0 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 23 Nov 2020 19:42:05 +0100 Subject: [PATCH 35/46] Update Pybytes to version 1.6.1 --- esp32/frozen/Pybytes/_OTA.py | 14 +- esp32/frozen/Pybytes/_pybytes_constants.py | 9 +- .../Pybytes/_pybytes_machine_learning.py | 176 ++++++++++++++++++ esp32/frozen/Pybytes/_pybytes_protocol.py | 82 +++++--- .../frozen/Pybytes/_pybytes_pymesh_config.py | 32 ++-- esp32/frozen/Pybytes/_terminal.py | 10 +- esp32/pycom_version.h | 2 +- 7 files changed, 282 insertions(+), 43 deletions(-) create mode 100644 esp32/frozen/Pybytes/_pybytes_machine_learning.py diff --git a/esp32/frozen/Pybytes/_OTA.py b/esp32/frozen/Pybytes/_OTA.py index 63d20ac3ec..a1391035c3 100644 --- a/esp32/frozen/Pybytes/_OTA.py +++ b/esp32/frozen/Pybytes/_OTA.py @@ -137,7 +137,6 @@ def update(self, customManifest=None, fwtype=None, token=None): def get_file(self, f): new_path = "{}.new".format(f['dst_path']) - # If a .new file exists from a previously failed update delete it try: os.remove(new_path) @@ -184,6 +183,15 @@ def delete_file(self, f): def write_firmware(self, f): # hash = + url = f['URL'].split("//")[1].split("/")[0] + + if url.find(":") > -1: + self.ip = url.split(":")[0] + self.port = int(url.split(":")[1]) + else: + self.ip = url + self.port = 443 + self.get_data( f['URL'].split("/", 3)[-1], hash=True, @@ -222,7 +230,6 @@ def _http_get(self, path, host): def get_data(self, req, dest_path=None, hash=False, firmware=False): h = None - useSSL = int(self.port) == 443 # Connect to server @@ -232,11 +239,9 @@ def get_data(self, req, dest_path=None, hash=False, firmware=False): if (int(self.port) == 443): print("Wrapping socket") s = ssl.wrap_socket(s) - print("Sending request") # Request File s.sendall(self._http_get(req, "{}:{}".format(self.ip, self.port))) - try: content = bytearray() fp = None @@ -247,6 +252,7 @@ def get_data(self, req, dest_path=None, hash=False, firmware=False): fp = open(dest_path, 'wb') if firmware: + print_debug(4, "Starting OTA...") pycom.ota_start() h = uhashlib.sha1() diff --git a/esp32/frozen/Pybytes/_pybytes_constants.py b/esp32/frozen/Pybytes/_pybytes_constants.py index aa1d27cd67..8ae4058530 100644 --- a/esp32/frozen/Pybytes/_pybytes_constants.py +++ b/esp32/frozen/Pybytes/_pybytes_constants.py @@ -69,11 +69,12 @@ class constants: __TYPE_OTA = 0x05 __TYPE_FCOTA = 0x06 __TYPE_PONG = 0x07 - __TYPE_PYMESH = 0x0D - __TYPE_PYBYTES = 0x0E - __TYPE_RELEASE_INFO = 0x0B __TYPE_RELEASE_DEPLOY = 0x0A + __TYPE_RELEASE_INFO = 0x0B __TYPE_DEVICE_NETWORK_DEPLOY = 0x0C + __TYPE_PYMESH = 0x0D + __TYPE_PYBYTES = 0x0E + __TYPE_ML = 0x0F __PYBYTES_PROTOCOL = ">B%ds" __PYBYTES_PROTOCOL_PING = ">B" __PYBYTES_INTERNAL_PROTOCOL = ">BBH" @@ -90,6 +91,8 @@ class constants: __COMMAND_ANALOG_WRITE = 4 __COMMAND_CUSTOM_METHOD = 5 __COMMAND_CUSTOM_LOCATION = 6 + __COMMAND_START_SAMPLE = 7 + __COMMAND_DEPLOY_MODEL = 8 __FCOTA_COMMAND_HIERARCHY_ACQUISITION = 0x00 __FCOTA_COMMAND_FILE_ACQUISITION = 0x01 diff --git a/esp32/frozen/Pybytes/_pybytes_machine_learning.py b/esp32/frozen/Pybytes/_pybytes_machine_learning.py new file mode 100644 index 0000000000..5c1fce6626 --- /dev/null +++ b/esp32/frozen/Pybytes/_pybytes_machine_learning.py @@ -0,0 +1,176 @@ +''' +Copyright (c) 2020, Pycom Limited. +This software is licensed under the GNU GPL version 3 or any +later version, with permitted additional terms. For more information +see the Pycom Licence v1.0 document supplied with this file, or +available at https://www.pycom.io/opensource/licensing +''' + +import math +import json + +try: + from pybytes_debug import print_debug +except: + from _pybytes_debug import print_debug + +try: + import urequest +except: + import _urequest as urequest + +try: + from pybytes_constants import constants +except: + from _pybytes_constants import constants + +import pycom + +try: + from LIS2HH12 import * +except: + print_debug(5, "LIS2HH12 not imported") + +# 20 seconds, max window in time for recording +MAX_LEN_MSEC = const(20000) + +# 350Hz, max frequency +MAX_FREQ_HZ = const(350) + + +class MlFeatures(): + def __init__(self, pybytes_protocol=None, parameters=None): + if parameters is not None: + self.__length = parameters["length"] + self.__label = parameters["label"] + self.__sampleName = parameters["sampleName"] + self.__type = parameters["type"] + self.__device = parameters["device"] + self.__model = parameters["model"] + self.__mlSample = parameters["mlSample"] + self.__frequency = parameters["frequency"] + self.__pybytes_protocol = pybytes_protocol + self.__data = [] + + def _debug_hack(self, pybytes): + self.__pybytes = pybytes + + def start_sampling(self, pin): + # here define the required libraries + try: + from pysense import Pysense + except: + print_debug(5, "pysense not imported") + + try: + from pytrack import Pytrack + except: + print_debug(5, "pytrack not imported") + + lib = False + try: + py = Pysense() + lib = True + except NameError: + print_debug(5, "Pysense not defined") + + if not lib: + try: + py = Pytrack() + except NameError: + print_debug(5, "Check if Pysense/Pytrack libraries are loaded") + return + + try: + li = LIS2HH12(py) + except NameError: + print_debug(5, "LIS2HH12 library are not loaded") + return + li.set_odr(ODR_400_HZ) + + # make the max record length to 20 seconds + self.__length = min(MAX_LEN_MSEC, self.__length) + + # make the max frequency to 350Hz + self.__frequency = min(MAX_FREQ_HZ, self.__frequency) + + # compute time interval between 2 consecutive samples + delta_t_us = int(1000000.0 / self.__frequency) + # compute the number of samples to be acquisition + samples_num = math.ceil(self.__length * self.__frequency / 1000) + 1 + + try: + pycom.heartbeat(False) + pycom.rgbled(0x7f7f00) + except: + pass + time.sleep(0.5) + + self.__data = [] + index = 0 + print("Start acquisition data for %d msec, freq %d Hz" % (self.__length, self.__frequency)) + + next_ts = time.ticks_us() + ts_orig = next_ts + while True: + while time.ticks_diff(next_ts, time.ticks_us()) > 0: + pass + acc = li.acceleration() + ts = next_ts + self.__data.append((ts - ts_orig, acc)) + next_ts = ts + delta_t_us + index += 1 + if index >= samples_num: + break # done + + print("Done acquisition %d samples, real freq %.1f Hz" % (index, index / (self.__length / 1000))) + self._parse_data(pin) + + def _send_data(self, data, pin, acc, ts): + if self.__pybytes_protocol is not None: + if self.__type == 2: + self.__label = self.__sampleName + self.__pybytes_protocol.send_pybytes_custom_method_values(pin, [ + data], + 'sample/{}/{}/{}/{}/{}'.format(self.__label, self.__type, self.__model, self.__device, self.__mlSample)) + else: + self.__pybytes.send_signal(pin & 0xFF, str((int(ts / 1000), acc))) + + def _parse_data(self, pin): + print("_parse_data, %d samples" % len(self.__data)) + try: + pycom.rgbled(0x8d05f5) + except: + pass + data = ['{"data": "ml"}'] + for (ts, acc) in self.__data: + data.append('{' + '"data": [{},{},{}], "ms": {}'.format(acc[0], acc[1], acc[2], int(ts / 1000)) + '}') + if len(data) > 25: + self._send_data(data, pin, acc, ts) + data = ['{"data": "ml"}'] + self._send_data(data, pin, acc, ts) + try: + pycom.heartbeat(True) + except: + pass + + def deploy_model(self, modelId, silent=False): + try: + file = '/flash/model_definition.json' + modelDefinition = {} + url = '{}://{}/ml/{}'.format( + constants.__DEFAULT_PYCONFIG_PROTOCOL, + constants.__DEFAULT_PYCONFIG_DOMAIN, + modelId + ) + print_debug(2, '{}'.format(url)) + result = urequest.get(url, headers={'content-type': 'application/json'}) + modelDefinition = json.loads(result.content.decode()) + print_debug(2, 'modelDefinition: {}'.format(modelDefinition)) + f = open(file, 'w') + f.write(json.dumps(modelDefinition).encode('utf-8')) + f.close() + print_debug(2, "Model definition written to {}".format(file)) + except Exception as e: + if not silent: + print_debug(2, "Exception: {}".format(e)) diff --git a/esp32/frozen/Pybytes/_pybytes_protocol.py b/esp32/frozen/Pybytes/_pybytes_protocol.py index 385d8c6f9c..6934f3ee44 100644 --- a/esp32/frozen/Pybytes/_pybytes_protocol.py +++ b/esp32/frozen/Pybytes/_pybytes_protocol.py @@ -31,6 +31,11 @@ except: from _pybytes_pymesh_config import PybytesPymeshConfig +try: + from pybytes_machine_learning import MlFeatures +except: + from _pybytes_machine_learning import MlFeatures + try: from pybytes_config_reader import PybytesConfigReader except: @@ -281,10 +286,10 @@ def __process_recv_message(self, message): splittedBody = bodyString.split(',') if (len(splittedBody) >= 2): path = splittedBody[0] - print_debug(2, path[len(path)-7:len(path)]) - if (path[len(path)-7:len(path)] != '.pymakr'): + print_debug(2, path[len(path) - 7:len(path)]) + if (path[len(path) - 7:len(path)] != '.pymakr'): self.send_fcota_ping('updating file...') - newContent = bodyString[len(path)+1:len(body)] + newContent = bodyString[len(path) + 1:len(body)] if (self.__FCOTA.update_file_content(path, newContent) is True): # noqa size = self.__FCOTA.get_file_size(path) self.send_fcota_file(newContent, path, size) @@ -319,7 +324,18 @@ def __process_recv_message(self, message): if (len(body) > 3): value = body[2] << 8 | body[3] - if (command == constants.__COMMAND_PIN_MODE): + if (command == constants.__COMMAND_START_SAMPLE): + parameters = ujson.loads(body[2: len(body)].decode("utf-8")) + sampling = MlFeatures(self, parameters=parameters) + sampling.start_sampling(pin=parameters["pin"]) + self.send_ota_response(result=2, topic='sample') + elif (command == constants.__COMMAND_DEPLOY_MODEL): + parameters = ujson.loads(body[2: len(body)].decode("utf-8")) + sampling = MlFeatures() + sampling.deploy_model(modelId=parameters["modelId"]) + self.send_ota_response(result=2, topic='deploymlmodel') + + elif (command == constants.__COMMAND_PIN_MODE): pass elif (command == constants.__COMMAND_DIGITAL_READ): @@ -633,16 +649,11 @@ def write_firmware(self, customManifest=None): def get_application_details(self, body): application = self.__conf.get('application') if application is not None: - if 'id' in application and application['id']: - applicationID = application['id'] - else: - applicationID = body['applicationId'] if 'release' in application and 'codeFilename' in application['release']: currentReleaseID = application['release']['codeFilename'] else: currentReleaseID = None else: - applicationID = body['applicationId'] currentReleaseID = None self.__conf['application'] = { "id": "", @@ -652,6 +663,7 @@ def get_application_details(self, body): "version": 0 } } + applicationID = body['applicationId'] return (applicationID, currentReleaseID) def get_update_manifest(self, applicationID, newReleaseID, currentReleaseID): @@ -755,21 +767,46 @@ def update_network_config(self, letResp): except Exception as e: print_debug(1, "error while updating network config pybytes_config.json! {}".format(e)) - def update_firmware(self, body): + def update_firmware(self, body, applicationID, fw_type='pybytes'): if "firmware" not in body: print_debug(0, "no firmware to update") return - version = body['firmware']["version"] - print_debug(0, "updating firmware to {}".format(version)) - customManifest = { - "firmware": { - "URL": "https://{}/downloads/appimg/firmware_{}_{}.bin".format( - constants.__DEFAULT_SW_HOST, - os.uname().sysname, - version), + + if "version" in body['firmware']: + version = body['firmware']["version"] + print_debug(0, "updating firmware to {}".format(version)) + + customManifest = { + "firmware": { + "URL": "https://{}/findupgrade?redirect=true&strict=true&type={}&model={}&version={}&download=true".format( + constants.__DEFAULT_SW_HOST, + fw_type, + os.uname().sysname, + version), + } } - } - self.write_firmware(customManifest) + self.write_firmware(customManifest) + else: + fileUrl = '{}://{}/firmware?'.format(constants.__DEFAULT_PYCONFIG_PROTOCOL, constants.__DEFAULT_PYCONFIG_DOMAIN) + customFirmwares = body['firmware']["customFirmwares"] + firmwareFilename = '' + for firmware in customFirmwares: + print_debug(1, "firmware['firmwareType']={} and os.uname().sysname.lower()={}".format(firmware['firmwareType'], os.uname().sysname.lower())) + print_debug(1, "firmware={}".format(firmware)) + if (firmware['firmwareType'] == os.uname().sysname.lower()): + firmwareFilename = firmware['firmwareFilename'] + targetFileLocation = '{}application_id={}&target_ver={}&target_path={}'.format( + fileUrl, + applicationID, + firmwareFilename, + '/{}.bin'.format(firmwareFilename) + ) + customManifest = { + "firmware": { + "URL": targetFileLocation, + } + } + self.write_firmware(customManifest) def deploy_new_release(self, body): try: @@ -783,12 +820,15 @@ def deploy_new_release(self, body): applicationID, currentReleaseID = self.get_application_details(body) letResp = self.get_update_manifest(applicationID, newReleaseID, currentReleaseID) + if not letResp: return + fwtype = 'pygate' if hasattr(os.uname(), 'pygate') else 'pybytes' + fwtype = 'pymesh' if hasattr(os.uname(), 'pymesh') else fwtype self.update_files(letResp, applicationID, newReleaseID) self.delete_files(letResp) self.update_application_config(letResp, applicationID) self.update_network_config(letResp) - self.update_firmware(letResp) + self.update_firmware(letResp, applicationID, fw_type=fwtype) machine.reset() diff --git a/esp32/frozen/Pybytes/_pybytes_pymesh_config.py b/esp32/frozen/Pybytes/_pybytes_pymesh_config.py index 116f797925..ff12070d1c 100644 --- a/esp32/frozen/Pybytes/_pybytes_pymesh_config.py +++ b/esp32/frozen/Pybytes/_pybytes_pymesh_config.py @@ -45,7 +45,10 @@ def pymesh_init(self): except: from _pymesh import Pymesh - pycom.heartbeat(False) + try: + pycom.heartbeat(False) + except: + pass # read config file, or set default values self.__pymesh_config = PymeshConfig.read_config() @@ -81,7 +84,7 @@ def unpack_pymesh_message(self, signal_number, value): # send data to the port equal with signal_number self.__pymesh.send_mess_external(pyb_ip, signal_number, pkt_start + value) - + time.sleep(3) # shouldn't send too fast to BR # hardcode monitoring data to be sent on signal #2 @@ -93,11 +96,14 @@ def pymesh_new_message_cb(self, rcv_ip, rcv_port, rcv_data): print_debug(99, 'Received: {} '.format(rcv_data)) # user code to be inserted, to send packet to the designated Mesh-external interface - for _ in range(3): - pycom.rgbled(0x888888) - time.sleep(.2) - pycom.rgbled(0) - time.sleep(.1) + try: + for _ in range(3): + pycom.rgbled(0x888888) + time.sleep(.2) + pycom.rgbled(0) + time.sleep(.1) + except: + pass return def pymesh_new_br_message_cb(self, rcv_ip, rcv_port, rcv_data, dest_ip, dest_port): @@ -106,11 +112,13 @@ def pymesh_new_br_message_cb(self, rcv_ip, rcv_port, rcv_data, dest_ip, dest_por print_debug(99, 'Incoming %d bytes from %s (port %d), to external IPv6 %s (port %d)' % (len(rcv_data), rcv_ip, rcv_port, dest_ip, dest_port)) print_debug(99, 'Received: {} '.format(rcv_data)) - for _ in range(2): - pycom.rgbled(0x0) - time.sleep(.1) - pycom.rgbled(0x663300) - + try: + for _ in range(2): + pycom.rgbled(0x0) + time.sleep(.1) + pycom.rgbled(0x663300) + except: + pass # try to find Pybytes Token if include in rcv_data token = "" if rcv_data.startswith(self.__pack_tocken_prefix): diff --git a/esp32/frozen/Pybytes/_terminal.py b/esp32/frozen/Pybytes/_terminal.py index 7125ff5729..35f0b82ec8 100644 --- a/esp32/frozen/Pybytes/_terminal.py +++ b/esp32/frozen/Pybytes/_terminal.py @@ -23,10 +23,16 @@ def write(self, data): self.message_to_send += data # self.__pybytes_protocol.__send_terminal_message(data) else: - self.original_terminal.write(data) + try: + self.original_terminal.write(data) + except: + pass def read(self, size): - return self.original_terminal.read(size) + try: + return self.original_terminal.read(size) + except: + return b'' def message_sent_from_pybytes_start(self): self.message_from_pybytes = True diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index dfa8be4d40..cbe246821c 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -17,7 +17,7 @@ #define SIGFOX_VERSION_NUMBER "1.0.1" #if (VARIANT == PYBYTES) -#define PYBYTES_VERSION_NUMBER "1.5.2" +#define PYBYTES_VERSION_NUMBER "1.6.1" #endif #ifdef PYGATE_ENABLED From d600b20bd4188b167ffc1fd9c961486aa872ae3e Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 23 Nov 2020 19:42:37 +0100 Subject: [PATCH 36/46] Update pycom_version.h Firmware release 1.20.2.r2 --- esp32/pycom_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index cbe246821c..55b3ed1ca3 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -10,7 +10,7 @@ #ifndef VERSION_H_ #define VERSION_H_ -#define SW_VERSION_NUMBER "1.20.2.rc11" +#define SW_VERSION_NUMBER "1.20.2.r2" #define LORAWAN_VERSION_NUMBER "1.0.2" From 742cc14efeebe68a86dc9b0b9d287aea57c7444d Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 23 Nov 2020 20:44:32 +0100 Subject: [PATCH 37/46] Update _pybytes_protocol.py Use correct web call for release upgrades --- esp32/frozen/Pybytes/_pybytes_protocol.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/esp32/frozen/Pybytes/_pybytes_protocol.py b/esp32/frozen/Pybytes/_pybytes_protocol.py index 6934f3ee44..f7d1ba41ed 100644 --- a/esp32/frozen/Pybytes/_pybytes_protocol.py +++ b/esp32/frozen/Pybytes/_pybytes_protocol.py @@ -69,6 +69,7 @@ import struct import machine import ujson +import pycom class PybytesProtocol: @@ -778,13 +779,16 @@ def update_firmware(self, body, applicationID, fw_type='pybytes'): customManifest = { "firmware": { - "URL": "https://{}/findupgrade?redirect=true&strict=true&type={}&model={}&version={}&download=true".format( + "URL": "https://{}/manifest.json?sysname={}&wmac={}&ota_slot={}&fwtype={}&target_ver={}&download=true".format( constants.__DEFAULT_SW_HOST, - fw_type, os.uname().sysname, + hexlify(machine.unique_id()).decode('ascii'), + hex(pycom.ota_slot()), + fw_type, version), } } + print_debug(5, "Custom Manifest: {}".format(customManifest)) self.write_firmware(customManifest) else: fileUrl = '{}://{}/firmware?'.format(constants.__DEFAULT_PYCONFIG_PROTOCOL, constants.__DEFAULT_PYCONFIG_DOMAIN) From 8340e1eb71796e7dad20c788845de578c9a4b2e9 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Wed, 23 Dec 2020 10:13:16 +0100 Subject: [PATCH 38/46] version 1.20.2.r3 --- esp32/pycom_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index 55b3ed1ca3..b85d758bb1 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -10,7 +10,7 @@ #ifndef VERSION_H_ #define VERSION_H_ -#define SW_VERSION_NUMBER "1.20.2.r2" +#define SW_VERSION_NUMBER "1.20.2.r3" #define LORAWAN_VERSION_NUMBER "1.0.2" From 3f690a5733d31ff938aad6219c498f7d1bf98346 Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Mon, 28 Dec 2020 10:17:04 +0100 Subject: [PATCH 39/46] Fix an issue that Bluetooth init() failed after deinit() --- esp32/mods/modbt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index 8b8ae40d1d..529159630b 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -1062,12 +1062,9 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ /// \class Bluetooth static mp_obj_t bt_init_helper(bt_obj_t *self, const mp_arg_val_t *args) { if (!self->init) { - if (!self->controller_active) { - esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); - esp_bt_controller_init(&bt_cfg); - self->controller_active = true; - } + esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); + esp_bt_controller_init(&bt_cfg); esp_bt_controller_enable(ESP_BT_MODE_BLE); if (ESP_OK != esp_bluedroid_init()) { From 826e233da82c374985871b037453ef4fae88854b Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Tue, 20 Oct 2020 19:59:15 +0200 Subject: [PATCH 40/46] Add API create_128bit_le_uuid_from_string() --- esp32/mods/modpycom.c | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/esp32/mods/modpycom.c b/esp32/mods/modpycom.c index a4007622f0..0e7f99ce0f 100644 --- a/esp32/mods/modpycom.c +++ b/esp32/mods/modpycom.c @@ -1013,6 +1013,53 @@ STATIC mp_obj_t mod_pycom_sigfox_info (size_t n_args, const mp_obj_t *pos_args, } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_pycom_sigfox_info_obj, 0, mod_pycom_sigfox_info); +// This function creates a 128 bit long UUID stored in a byte array in Little Endian order from an input String +STATIC mp_obj_t create_128bit_le_uuid_from_string(mp_obj_t uuid_in) { + + size_t length; + uint8_t new_uuid[16]; + uint8_t i, j; + + const char* uuid_char_in = mp_obj_str_get_data(uuid_in, &length); + // 1 character is stored on 1 byte because we received a String + // For 128 bit UUID maximum 32 characters long String can be accepted + if (length > 32) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "Input string must not be longer than 32 characters!")); + } + + // Pre-fill the whole array with 0 because the remaining/not given digits will be 0 + char uuid_char[32] = {0}; + memcpy(uuid_char, uuid_char_in, length); + + for(i = 0, j = 0; i < 32; i = i+2) { + + uint8_t lower_nibble = 0; + uint8_t upper_nibble = 0; + + if(uuid_char[i] > 0) { + upper_nibble = hex_from_char(uuid_char[i]); + } + + if(uuid_char[i+1] > 0) { + lower_nibble = hex_from_char(uuid_char[i+1]); + } + + if(lower_nibble == 16 || upper_nibble == 16) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "UUID must only contain hexadecimal digits!")); + } + + // Pack together the 4 bits digits into 1 byte + // Convert to Little Endian order because we expect that the digits of the input String follows the Natural Byte (Big Endian) order + new_uuid[15-j] = lower_nibble | (upper_nibble << 4); + j++; + } + + mp_obj_t new_uuid_mp = mp_obj_new_bytearray(16, new_uuid); + return new_uuid_mp; + +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(create_128bit_le_uuid_from_string_obj, create_128bit_le_uuid_from_string); + STATIC const mp_map_elem_t pycom_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_pycom) }, { MP_OBJ_NEW_QSTR(MP_QSTR_heartbeat), (mp_obj_t)&mod_pycom_heartbeat_obj }, @@ -1039,6 +1086,8 @@ STATIC const mp_map_elem_t pycom_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_wifi_pwd_sta), (mp_obj_t)&mod_pycom_wifi_pwd_sta_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_wifi_pwd_ap), (mp_obj_t)&mod_pycom_wifi_pwd_ap_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_wifi_mode_on_boot), (mp_obj_t)&mod_pycom_wifi_mode_obj }, + { MP_OBJ_NEW_QSTR(MP_QSTR_create_128bit_le_uuid_from_string), (mp_obj_t)&create_128bit_le_uuid_from_string_obj }, + #if defined(FIPY) || defined(LOPY4) || defined(SIPY) { MP_OBJ_NEW_QSTR(MP_QSTR_sigfox_info), (mp_obj_t)&mod_pycom_sigfox_info_obj }, From 684e9da9ef75bd4c7dce73b2774b34b570859523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9za=20Husi?= Date: Tue, 29 Dec 2020 18:48:13 +0100 Subject: [PATCH 41/46] Fix a bug causing multi-heap assert exception in modcoap and improve modcoap's memory handling (#208) The following is fixed: * Incorrectly called "free" on the "path" pointer, "path" pointer did not point to the correct memory area when free() was called * Changed m_malloc and m_free to malloc and free because those objects not needed to be allocated on the Garbage Collector controlled heap * Removed the "uri" member of "resource" object because it was not used --- esp32/mods/modcoap.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/esp32/mods/modcoap.c b/esp32/mods/modcoap.c index cae166d61d..ac8a98be41 100644 --- a/esp32/mods/modcoap.c +++ b/esp32/mods/modcoap.c @@ -43,7 +43,6 @@ typedef struct mod_coap_resource_obj_s { coap_resource_t* coap_resource; struct mod_coap_resource_obj_s* next; uint8_t* value; - unsigned char* uri; uint32_t max_age; uint16_t etag_value; uint16_t value_len; @@ -208,9 +207,10 @@ STATIC mod_coap_resource_obj_t* add_resource(const char* uri, uint8_t mediatype, resource->next = NULL; // uri parameter pointer will be destroyed, pass a pointer to a permanent location - resource->uri = m_malloc(strlen(uri)); - memcpy(resource->uri, uri, strlen(uri)); - resource->coap_resource = coap_resource_init((const unsigned char* )resource->uri, strlen(uri), 0); + unsigned char* uri_ptr = (unsigned char*)malloc(strlen(uri)); + memcpy(uri_ptr, uri, strlen(uri)); + // Pass COAP_RESOURCE_FLAGS_RELEASE_URI so Coap Library will free up the memory allocated to store the URI when the Resource is deleted + resource->coap_resource = coap_resource_init(uri_ptr, strlen(uri), COAP_RESOURCE_FLAGS_RELEASE_URI); if(resource->coap_resource != NULL) { // Add the resource to the Coap context coap_add_resource(context->context, resource->coap_resource); @@ -238,7 +238,7 @@ STATIC mod_coap_resource_obj_t* add_resource(const char* uri, uint8_t mediatype, return resource; } else { - m_free(resource->uri); + free(uri_ptr); m_del_obj(mod_coap_resource_obj_t, resource); // Resource cannot be created return NULL; @@ -278,14 +278,12 @@ STATIC void remove_resource_by_key(coap_key_t key) { previous->next = current->next; } - // Free the URI - m_free(current->uri); // Free the resource in coap's scope coap_delete_resource(context->context, key); // Free the element in MP scope - m_free(current->value); + free(current->value); // Free the resource itself - m_free(current); + m_del_obj(mod_coap_resource_obj_t, current); return; } @@ -320,7 +318,7 @@ STATIC void resource_update_value(mod_coap_resource_obj_t* resource, mp_obj_t ne // Invalidate current data first resource->value_len = 0; - m_free(resource->value); + free(resource->value); if (mp_obj_is_integer(new_value)) { @@ -334,7 +332,7 @@ STATIC void resource_update_value(mod_coap_resource_obj_t* resource, mp_obj_t ne } // Allocate memory for the new data - resource->value = m_malloc(resource->value_len); + resource->value = malloc(resource->value_len); memcpy(resource->value, &value, sizeof(value)); } else { @@ -344,7 +342,7 @@ STATIC void resource_update_value(mod_coap_resource_obj_t* resource, mp_obj_t ne resource->value_len = value_bufinfo.len; // Allocate memory for the new data - resource->value = m_malloc(resource->value_len); + resource->value = malloc(resource->value_len); memcpy(resource->value, value_bufinfo.buf, resource->value_len); } } @@ -748,16 +746,13 @@ STATIC coap_pdu_t * modcoap_new_request // Helper function to create a new option for a request message STATIC coap_list_t * modcoap_new_option_node(unsigned short key, unsigned int length, unsigned char *data) { - coap_list_t *node = m_malloc(sizeof(coap_list_t) + sizeof(coap_option) + length); + coap_list_t *node = malloc(sizeof(coap_list_t) + sizeof(coap_option) + length); if (node) { coap_option *option; option = (coap_option *)(node->data); COAP_OPTION_KEY(*option) = key; COAP_OPTION_LENGTH(*option) = length; memcpy(COAP_OPTION_DATA(*option), data, length); - } else { - m_free(node); - node = NULL; } return node; @@ -937,7 +932,7 @@ STATIC mp_obj_t mod_coap_init(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map // Only 1 context is supported currently if(initialized == false) { - MP_STATE_PORT(coap_ptr) = m_malloc(sizeof(mod_coap_obj_t)); + MP_STATE_PORT(coap_ptr) = m_new_obj(mod_coap_obj_t); coap_obj_ptr = MP_STATE_PORT(coap_ptr); coap_obj_ptr->context = NULL; coap_obj_ptr->resources = NULL; @@ -1235,19 +1230,21 @@ STATIC mp_obj_t mod_coap_send_request(mp_uint_t n_args, const mp_obj_t *pos_args //TODO: allocate the proper length size_t length = 300; unsigned char* path = malloc(length); - int segments = coap_split_path(coap_uri.path.s, coap_uri.path.length, path, &length); + // Need to use a different pointer because when the segments are composed the pointer itself is moved + unsigned char* path_segment = path; + int segments = coap_split_path(coap_uri.path.s, coap_uri.path.length, path_segment, &length); // Insert the segments as separate URI-Path options while (segments--) { - node = modcoap_new_option_node(COAP_OPTION_URI_PATH, COAP_OPT_LENGTH(path), COAP_OPT_VALUE(path)); + node = modcoap_new_option_node(COAP_OPTION_URI_PATH, COAP_OPT_LENGTH(path_segment), COAP_OPT_VALUE(path_segment)); if(node != NULL) { LL_APPEND(coap_obj_ptr->optlist, node); } - - path += COAP_OPT_SIZE(path); + // Move the path_segment pointer to the next segment + path_segment += COAP_OPT_SIZE(path_segment); } - + // Free up the memory using the pointer pointing to the beginning of the memory area free(path); // Put Content Format option if given @@ -1271,7 +1268,7 @@ STATIC mp_obj_t mod_coap_send_request(mp_uint_t n_args, const mp_obj_t *pos_args while(coap_obj_ptr->optlist != NULL) { next = coap_obj_ptr->optlist->next; coap_obj_ptr->optlist->next = NULL; - m_free(coap_obj_ptr->optlist); + free(coap_obj_ptr->optlist); coap_obj_ptr->optlist = next; } From 627e39c4a5ff968faaf19c43b4ed0bd454bdd054 Mon Sep 17 00:00:00 2001 From: msariisik Date: Thu, 7 Jan 2021 14:28:03 +0100 Subject: [PATCH 42/46] removed exit 0 condition for tests --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 28fdf0b66a..58ec285aa6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -122,7 +122,7 @@ def testBuild(short_name) { timeout(30) { // As some tests are randomly failing... enforce script always returns 0 (OK) sh '''export PATH=$PATH:/usr/local/bin; - ./run-tests --target=esp32 --device ''' + device_name + ' || exit 0' + ./run-tests --target=esp32 --device ''' + device_name } } sh 'python esp32/tools/pypic.py --port ' + device_name +' --enter' From 8cd6d219d1e348e66d19ed3ce59e30dab378536a Mon Sep 17 00:00:00 2001 From: msariisik Date: Mon, 11 Jan 2021 11:00:35 +0100 Subject: [PATCH 43/46] revert back exit 0 condition on Jenkins --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 58ec285aa6..28fdf0b66a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -122,7 +122,7 @@ def testBuild(short_name) { timeout(30) { // As some tests are randomly failing... enforce script always returns 0 (OK) sh '''export PATH=$PATH:/usr/local/bin; - ./run-tests --target=esp32 --device ''' + device_name + ./run-tests --target=esp32 --device ''' + device_name + ' || exit 0' } } sh 'python esp32/tools/pypic.py --port ' + device_name +' --enter' From 120f929baa1fb92ebdfdba066f9c51b9a34df856 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Mon, 11 Jan 2021 13:12:13 +0100 Subject: [PATCH 44/46] Rtc utime fix (#206) * fixed setting time in rtc * do not reset the time on init --- esp32/mods/machrtc.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/esp32/mods/machrtc.c b/esp32/mods/machrtc.c index f2a819b68b..df91a404ce 100644 --- a/esp32/mods/machrtc.c +++ b/esp32/mods/machrtc.c @@ -48,7 +48,6 @@ typedef struct _mach_rtc_obj_t { bool synced; } mach_rtc_obj_t; -static RTC_DATA_ATTR uint64_t delta_from_epoch_til_boot; static RTC_DATA_ATTR uint32_t rtc_user_mem_len; static RTC_DATA_ATTR uint8_t rtc_user_mem_data[MEM_USER_MAXLEN]; @@ -61,10 +60,10 @@ void rtc_init0(void) { void mach_rtc_set_us_since_epoch(uint64_t nowus) { struct timeval tv; - // store the packet timestamp - gettimeofday(&tv, NULL); - delta_from_epoch_til_boot = nowus - (uint64_t)((tv.tv_sec * 1000000ull) + tv.tv_usec); + tv.tv_usec = nowus % 1000000ull; + tv.tv_sec = nowus / 1000000ull; + settimeofday(&tv, NULL); } void mach_rtc_synced (void) { @@ -78,8 +77,9 @@ bool mach_is_rtc_synced (void) { uint64_t mach_rtc_get_us_since_epoch(void) { struct timeval tv; gettimeofday(&tv, NULL); - return (uint64_t)((tv.tv_sec * 1000000ull) + tv.tv_usec) + delta_from_epoch_til_boot; -}; + return (uint64_t)(tv.tv_sec * 1000000ull ) + (tv.tv_usec); + +} STATIC uint64_t mach_rtc_datetime_us(const mp_obj_t datetime) { timeutils_struct_time_t tm; @@ -132,8 +132,6 @@ STATIC void mach_rtc_datetime(const mp_obj_t datetime) { if (datetime != mp_const_none) { useconds = mach_rtc_datetime_us(datetime); mach_rtc_set_us_since_epoch(useconds); - } else { - mach_rtc_set_us_since_epoch(0); } } @@ -197,14 +195,10 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mach_rtc_init_obj, 1, mach_rtc_init); STATIC mp_obj_t mach_rtc_now (mp_obj_t self_in) { timeutils_struct_time_t tm; uint64_t useconds; + + useconds = mach_rtc_get_us_since_epoch(); - struct timeval now; - gettimeofday(&now, NULL); - - // get the time from the RTC - useconds = (now.tv_sec * 1000000ull ) + (now.tv_usec); timeutils_seconds_since_epoch_to_struct_time((useconds) / 1000000ull, &tm); - mp_obj_t tuple[8] = { mp_obj_new_int(tm.tm_year), mp_obj_new_int(tm.tm_mon), From f04187b5554007b0c9fa6ce6cd132d127d778f37 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Mon, 11 Jan 2021 13:21:44 +0100 Subject: [PATCH 45/46] update version to 1.20.2.r4 --- esp32/pycom_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index b85d758bb1..3a24ceee49 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -10,7 +10,7 @@ #ifndef VERSION_H_ #define VERSION_H_ -#define SW_VERSION_NUMBER "1.20.2.r3" +#define SW_VERSION_NUMBER "1.20.2.r4" #define LORAWAN_VERSION_NUMBER "1.0.2" From a37510c092bcec00671c924accb97dcdfa2f4b5d Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Tue, 9 Mar 2021 20:37:45 +0100 Subject: [PATCH 46/46] Update Copyright header --- drivers/sx127x/sx1272/sx1272.c | 2 +- drivers/sx127x/sx1276/sx1276.c | 2 +- drivers/sx1308/sx1308-config.h | 2 +- drivers/sx1308/sx1308-spi.c | 4 ++-- drivers/sx1308/sx1308-spi.h | 4 ++-- drivers/sx1308/sx1308.c | 2 +- drivers/sx1308/sx1308.h | 4 ++-- esp32/Makefile | 2 +- esp32/app_sys_evt.h | 2 +- esp32/application.mk | 2 +- esp32/boards/FIPY/mpconfigboard.h | 2 +- esp32/boards/GPY/mpconfigboard.h | 2 +- esp32/boards/LOPY/mpconfigboard.h | 2 +- esp32/boards/LOPY4/mpconfigboard.h | 2 +- esp32/boards/SIPY/mpconfigboard.h | 2 +- esp32/boards/WIPY/mpconfigboard.h | 2 +- esp32/boards/esp32_prefix.c | 2 +- esp32/boards/make-pins.py | 2 +- esp32/bootloader/bootmgr.c | 2 +- esp32/bootloader/bootmgr.h | 2 +- esp32/bootloader/mperror.c | 2 +- esp32/fatfs/src/drivers/sd_diskio.c | 2 +- esp32/fatfs/src/drivers/sd_diskio.h | 2 +- esp32/frozen/LTE/sqnsbrz.py | 2 +- esp32/frozen/LTE/sqnsupgrade.py | 2 +- esp32/frozen/Pybytes/_OTA.py | 2 +- esp32/frozen/Pybytes/_coap.py | 2 +- esp32/frozen/Pybytes/_flash_control_OTA.py | 2 +- esp32/frozen/Pybytes/_main_pybytes.py | 2 +- esp32/frozen/Pybytes/_mqtt.py | 2 +- esp32/frozen/Pybytes/_mqtt_core.py | 2 +- esp32/frozen/Pybytes/_msg_handl.py | 2 +- esp32/frozen/Pybytes/_periodical_pin.py | 2 +- esp32/frozen/Pybytes/_pybytes.py | 2 +- esp32/frozen/Pybytes/_pybytes_ca.py | 2 +- esp32/frozen/Pybytes/_pybytes_config.py | 2 +- esp32/frozen/Pybytes/_pybytes_config_reader.py | 2 +- esp32/frozen/Pybytes/_pybytes_connection.py | 2 +- esp32/frozen/Pybytes/_pybytes_constants.py | 2 +- esp32/frozen/Pybytes/_pybytes_debug.py | 2 +- esp32/frozen/Pybytes/_pybytes_library.py | 2 +- esp32/frozen/Pybytes/_pybytes_machine_learning.py | 2 +- esp32/frozen/Pybytes/_pybytes_main.py | 2 +- esp32/frozen/Pybytes/_pybytes_protocol.py | 2 +- esp32/frozen/Pybytes/_pybytes_pymesh_config.py | 2 +- esp32/frozen/Pybytes/_terminal.py | 2 +- esp32/ftp/ftp.c | 2 +- esp32/ftp/ftp.h | 2 +- esp32/ftp/updater.c | 2 +- esp32/ftp/updater.h | 2 +- esp32/hal/esp32_mphal.c | 2 +- esp32/hal/esp32_mphal.h | 2 +- esp32/lora/board.c | 2 +- esp32/lora/board.h | 2 +- esp32/lora/gpio-board.c | 2 +- esp32/lora/gpio-board.h | 2 +- esp32/lora/ot-log.c | 2 +- esp32/lora/ot-log.h | 2 +- esp32/lora/ot-settings.c | 2 +- esp32/lora/ot-settings.h | 2 +- esp32/lora/otplat_alarm.c | 2 +- esp32/lora/otplat_alarm.h | 2 +- esp32/lora/otplat_radio.c | 2 +- esp32/lora/otplat_radio.h | 2 +- esp32/lora/pinName-board.h | 2 +- esp32/lora/spi-board.c | 2 +- esp32/lora/spi-board.h | 2 +- esp32/lora/timer-board.c | 2 +- esp32/lora/timer-board.h | 2 +- esp32/lte/lteppp.c | 2 +- esp32/lte/lteppp.h | 2 +- esp32/main.c | 2 +- esp32/mods/lwipsocket.c | 2 +- esp32/mods/lwipsocket.h | 2 +- esp32/mods/machcan.c | 2 +- esp32/mods/machcan.h | 2 +- esp32/mods/machine_i2c.c | 2 +- esp32/mods/machine_i2c.h | 2 +- esp32/mods/machpin.c | 2 +- esp32/mods/machpin.h | 2 +- esp32/mods/machpwm.c | 2 +- esp32/mods/machpwm.h | 2 +- esp32/mods/machrmt.c | 2 +- esp32/mods/machrmt.h | 2 +- esp32/mods/machrtc.c | 2 +- esp32/mods/machrtc.h | 2 +- esp32/mods/machspi.c | 2 +- esp32/mods/machspi.h | 2 +- esp32/mods/machtimer.c | 2 +- esp32/mods/machtimer.h | 2 +- esp32/mods/machtouch.h | 2 +- esp32/mods/machuart.c | 2 +- esp32/mods/machuart.h | 2 +- esp32/mods/machwdt.c | 2 +- esp32/mods/machwdt.h | 2 +- esp32/mods/modbt.c | 2 +- esp32/mods/modbt.h | 2 +- esp32/mods/modcoap.c | 2 +- esp32/mods/modcoap.h | 2 +- esp32/mods/modeth.c | 2 +- esp32/mods/modeth.h | 2 +- esp32/mods/modled.c | 2 +- esp32/mods/modled.h | 2 +- esp32/mods/modlora.c | 2 +- esp32/mods/modlora.h | 2 +- esp32/mods/modlte.c | 2 +- esp32/mods/modlte.h | 2 +- esp32/mods/modmachine.c | 2 +- esp32/mods/modmachine.h | 2 +- esp32/mods/modmdns.c | 2 +- esp32/mods/modmdns.h | 2 +- esp32/mods/modmesh.c | 2 +- esp32/mods/modmesh.h | 2 +- esp32/mods/modnetwork.c | 2 +- esp32/mods/modnetwork.h | 2 +- esp32/mods/modpycom.c | 2 +- esp32/mods/modsigfox_api.c | 2 +- esp32/mods/moducrypto.c | 2 +- esp32/mods/moduhashlib.c | 2 +- esp32/mods/moduos.c | 2 +- esp32/mods/moduos.h | 2 +- esp32/mods/moduqueue.c | 2 +- esp32/mods/moduqueue.h | 2 +- esp32/mods/modusocket.c | 2 +- esp32/mods/modusocket.h | 2 +- esp32/mods/modussl.c | 2 +- esp32/mods/modussl.h | 2 +- esp32/mods/modutime.c | 2 +- esp32/mods/modwlan.c | 2 +- esp32/mods/modwlan.h | 2 +- esp32/mods/pybadc.c | 2 +- esp32/mods/pybadc.h | 2 +- esp32/mods/pybdac.c | 2 +- esp32/mods/pybdac.h | 2 +- esp32/mods/pybsd.c | 2 +- esp32/mods/pybsd.h | 2 +- esp32/mpconfigport.h | 2 +- esp32/mptask.c | 2 +- esp32/mptask.h | 2 +- esp32/mpthreadport.c | 2 +- esp32/mpthreadport.h | 2 +- esp32/pycom_config.c | 2 +- esp32/pycom_config.h | 2 +- esp32/pycom_version.h | 2 +- esp32/pygate/concentrator/cmd_manager.c | 2 +- esp32/pygate/concentrator/cmd_manager.h | 2 +- esp32/pygate/concentrator/loragw_hal_esp.c | 2 +- esp32/pygate/concentrator/loragw_hal_esp.h | 2 +- esp32/pygate/concentrator/loragw_radio_esp.h | 2 +- esp32/pygate/concentrator/loragw_reg_esp.c | 2 +- esp32/pygate/concentrator/loragw_reg_esp.h | 2 +- esp32/pygate/hal/include/loragw_aux.h | 2 +- esp32/pygate/hal/include/loragw_com.h | 2 +- esp32/pygate/hal/include/loragw_com_esp.h | 2 +- esp32/pygate/hal/include/loragw_hal.h | 2 +- esp32/pygate/hal/include/loragw_mcu.h | 2 +- esp32/pygate/hal/include/loragw_radio.h | 2 +- esp32/pygate/hal/include/loragw_reg.h | 2 +- esp32/pygate/hal/include/loragw_sx125x.h | 2 +- esp32/pygate/hal/loragw_aux.c | 2 +- esp32/pygate/hal/loragw_com.c | 2 +- esp32/pygate/hal/loragw_com_esp.c | 2 +- esp32/pygate/hal/loragw_hal.c | 2 +- esp32/pygate/hal/loragw_mcu.c | 2 +- esp32/pygate/hal/loragw_radio.c | 2 +- esp32/pygate/hal/loragw_reg.c | 2 +- esp32/pygate/lora_pkt_fwd/base64.c | 2 +- esp32/pygate/lora_pkt_fwd/base64.h | 2 +- esp32/pygate/lora_pkt_fwd/jitqueue.c | 2 +- esp32/pygate/lora_pkt_fwd/jitqueue.h | 2 +- esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c | 2 +- esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h | 2 +- esp32/pygate/lora_pkt_fwd/parson.c | 2 +- esp32/pygate/lora_pkt_fwd/parson.h | 2 +- esp32/pygate/lora_pkt_fwd/timersync.c | 2 +- esp32/pygate/lora_pkt_fwd/timersync.h | 2 +- esp32/pygate/lora_pkt_fwd/trace.h | 2 +- esp32/qstrdefsport.h | 2 +- esp32/serverstask.c | 2 +- esp32/serverstask.h | 2 +- esp32/sigfox/modsigfox.h | 2 +- esp32/telnet/telnet.c | 2 +- esp32/telnet/telnet.h | 2 +- esp32/tools/appsign.sh | 2 +- esp32/tools/flasher.py | 2 +- esp32/tools/fw_updater/pypic.py | 2 +- esp32/tools/fw_updater/updater.py | 2 +- esp32/tools/idfVerCheck.sh | 2 +- esp32/tools/lopy_final_test_board_script.py | 2 +- esp32/tools/lopy_initial_test_board_script.py | 2 +- esp32/tools/lopy_qa_test_board_script.py | 2 +- esp32/tools/lora/actility/actility.py | 2 +- esp32/tools/lora/certification/certification.py | 2 +- esp32/tools/run_final_lopy_test.py | 2 +- esp32/tools/run_initial_lopy_test.py | 2 +- esp32/tools/run_initial_wipy_test.py | 2 +- esp32/tools/run_qa_lopy_test.py | 2 +- esp32/tools/run_qa_wipy_test.py | 2 +- esp32/tools/wipy_initial_test_board_script.py | 2 +- esp32/tools/wipy_qa_test_board_script.py | 2 +- esp32/util/antenna.c | 2 +- esp32/util/antenna.h | 2 +- esp32/util/esp32chipinfo.c | 2 +- esp32/util/esp32chipinfo.h | 2 +- esp32/util/fifo.c | 2 +- esp32/util/fifo.h | 2 +- esp32/util/gccollect.c | 2 +- esp32/util/gccollect.h | 2 +- esp32/util/help.c | 2 +- esp32/util/mperror.c | 2 +- esp32/util/mperror.h | 2 +- esp32/util/mpexception.c | 2 +- esp32/util/mpexception.h | 2 +- esp32/util/mpirq.c | 2 +- esp32/util/mpirq.h | 2 +- esp32/util/mpsleep.c | 2 +- esp32/util/mpsleep.h | 2 +- esp32/util/pycom_general_util.c | 2 +- esp32/util/pycom_general_util.h | 2 +- esp32/util/random.c | 2 +- esp32/util/random.h | 2 +- esp32/util/socketfifo.c | 2 +- esp32/util/socketfifo.h | 2 +- lib/lora/system/gpio.h | 2 +- py/mpprint.c | 2 +- 225 files changed, 228 insertions(+), 228 deletions(-) diff --git a/drivers/sx127x/sx1272/sx1272.c b/drivers/sx127x/sx1272/sx1272.c index b78bae1465..29a8961643 100644 --- a/drivers/sx127x/sx1272/sx1272.c +++ b/drivers/sx127x/sx1272/sx1272.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/drivers/sx127x/sx1276/sx1276.c b/drivers/sx127x/sx1276/sx1276.c index 870c4abae1..87d9064ddd 100755 --- a/drivers/sx127x/sx1276/sx1276.c +++ b/drivers/sx127x/sx1276/sx1276.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/drivers/sx1308/sx1308-config.h b/drivers/sx1308/sx1308-config.h index e2be4ee6d6..3cf3814ffd 100644 --- a/drivers/sx1308/sx1308-config.h +++ b/drivers/sx1308/sx1308-config.h @@ -1,6 +1,6 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/drivers/sx1308/sx1308-spi.c b/drivers/sx1308/sx1308-spi.c index 96deabd83d..4650a8b010 100644 --- a/drivers/sx1308/sx1308-spi.c +++ b/drivers/sx1308/sx1308-spi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information @@ -9,7 +9,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2018, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/drivers/sx1308/sx1308-spi.h b/drivers/sx1308/sx1308-spi.h index b8ec2f9949..fd325e9687 100644 --- a/drivers/sx1308/sx1308-spi.h +++ b/drivers/sx1308/sx1308-spi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information @@ -9,7 +9,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2018, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/drivers/sx1308/sx1308.c b/drivers/sx1308/sx1308.c index 75ffb8e76a..8930ebb59e 100644 --- a/drivers/sx1308/sx1308.c +++ b/drivers/sx1308/sx1308.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/drivers/sx1308/sx1308.h b/drivers/sx1308/sx1308.h index 898863d360..5cdfa48cf1 100644 --- a/drivers/sx1308/sx1308.h +++ b/drivers/sx1308/sx1308.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information @@ -9,7 +9,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2018, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/Makefile b/esp32/Makefile index 5826d20992..3e475b7132 100644 --- a/esp32/Makefile +++ b/esp32/Makefile @@ -1,5 +1,5 @@ # -# Copyright © 2020, Pycom Limited. +# Copyright © 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/app_sys_evt.h b/esp32/app_sys_evt.h index 849e109dbb..00b00441be 100644 --- a/esp32/app_sys_evt.h +++ b/esp32/app_sys_evt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/application.mk b/esp32/application.mk index 299e96f87b..189a98b231 100644 --- a/esp32/application.mk +++ b/esp32/application.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/boards/FIPY/mpconfigboard.h b/esp32/boards/FIPY/mpconfigboard.h index 13cd4b120f..8a39ab9f29 100644 --- a/esp32/boards/FIPY/mpconfigboard.h +++ b/esp32/boards/FIPY/mpconfigboard.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/boards/GPY/mpconfigboard.h b/esp32/boards/GPY/mpconfigboard.h index b53c2c8e89..6f7d9078aa 100644 --- a/esp32/boards/GPY/mpconfigboard.h +++ b/esp32/boards/GPY/mpconfigboard.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/boards/LOPY/mpconfigboard.h b/esp32/boards/LOPY/mpconfigboard.h index e07d3d658d..48b1541d3f 100644 --- a/esp32/boards/LOPY/mpconfigboard.h +++ b/esp32/boards/LOPY/mpconfigboard.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/boards/LOPY4/mpconfigboard.h b/esp32/boards/LOPY4/mpconfigboard.h index 95b835feda..bc8fab3252 100644 --- a/esp32/boards/LOPY4/mpconfigboard.h +++ b/esp32/boards/LOPY4/mpconfigboard.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/boards/SIPY/mpconfigboard.h b/esp32/boards/SIPY/mpconfigboard.h index 229ea22d4b..799f142521 100644 --- a/esp32/boards/SIPY/mpconfigboard.h +++ b/esp32/boards/SIPY/mpconfigboard.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/boards/WIPY/mpconfigboard.h b/esp32/boards/WIPY/mpconfigboard.h index 5a37216506..6449424156 100644 --- a/esp32/boards/WIPY/mpconfigboard.h +++ b/esp32/boards/WIPY/mpconfigboard.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/boards/esp32_prefix.c b/esp32/boards/esp32_prefix.c index 206dd7b701..eba76268d0 100644 --- a/esp32/boards/esp32_prefix.c +++ b/esp32/boards/esp32_prefix.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/boards/make-pins.py b/esp32/boards/make-pins.py index df11593d31..69749aff7b 100644 --- a/esp32/boards/make-pins.py +++ b/esp32/boards/make-pins.py @@ -2,7 +2,7 @@ # This file is derived from the MicroPython project, http://micropython.org/ # -# Copyright (c) 2020, Pycom Limited and its licensors. +# Copyright (c) 2021, Pycom Limited and its licensors. # # This software is licensed under the GNU GPL version 3 or any later version, # with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/bootloader/bootmgr.c b/esp32/bootloader/bootmgr.c index 2db85adddd..233a513eb1 100644 --- a/esp32/bootloader/bootmgr.c +++ b/esp32/bootloader/bootmgr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/bootloader/bootmgr.h b/esp32/bootloader/bootmgr.h index 6b1877688d..b84acf6796 100644 --- a/esp32/bootloader/bootmgr.h +++ b/esp32/bootloader/bootmgr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/bootloader/mperror.c b/esp32/bootloader/mperror.c index d11795cf6d..c7dc6786b5 100644 --- a/esp32/bootloader/mperror.c +++ b/esp32/bootloader/mperror.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/fatfs/src/drivers/sd_diskio.c b/esp32/fatfs/src/drivers/sd_diskio.c index 3bd90b2c41..3220f4a9c7 100644 --- a/esp32/fatfs/src/drivers/sd_diskio.c +++ b/esp32/fatfs/src/drivers/sd_diskio.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/fatfs/src/drivers/sd_diskio.h b/esp32/fatfs/src/drivers/sd_diskio.h index 0c1d012da2..09bc7ea0cb 100644 --- a/esp32/fatfs/src/drivers/sd_diskio.h +++ b/esp32/fatfs/src/drivers/sd_diskio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/frozen/LTE/sqnsbrz.py b/esp32/frozen/LTE/sqnsbrz.py index 0755c2c8a1..147e42caff 100644 --- a/esp32/frozen/LTE/sqnsbrz.py +++ b/esp32/frozen/LTE/sqnsbrz.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/frozen/LTE/sqnsupgrade.py b/esp32/frozen/LTE/sqnsupgrade.py index 2aa6a49f2c..068200d6d4 100644 --- a/esp32/frozen/LTE/sqnsupgrade.py +++ b/esp32/frozen/LTE/sqnsupgrade.py @@ -1,7 +1,7 @@ #!/usr/bin/env python VERSION = "1.2.6" -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/frozen/Pybytes/_OTA.py b/esp32/frozen/Pybytes/_OTA.py index a1391035c3..1750d0fd45 100644 --- a/esp32/frozen/Pybytes/_OTA.py +++ b/esp32/frozen/Pybytes/_OTA.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_coap.py b/esp32/frozen/Pybytes/_coap.py index 234fccd3ac..cbd6cbeb6f 100644 --- a/esp32/frozen/Pybytes/_coap.py +++ b/esp32/frozen/Pybytes/_coap.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_flash_control_OTA.py b/esp32/frozen/Pybytes/_flash_control_OTA.py index 22b195112f..79e5867d30 100644 --- a/esp32/frozen/Pybytes/_flash_control_OTA.py +++ b/esp32/frozen/Pybytes/_flash_control_OTA.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_main_pybytes.py b/esp32/frozen/Pybytes/_main_pybytes.py index f89ab25054..2afd232a9b 100644 --- a/esp32/frozen/Pybytes/_main_pybytes.py +++ b/esp32/frozen/Pybytes/_main_pybytes.py @@ -1,6 +1,6 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_mqtt.py b/esp32/frozen/Pybytes/_mqtt.py index 89be0d3f73..c1d5060025 100644 --- a/esp32/frozen/Pybytes/_mqtt.py +++ b/esp32/frozen/Pybytes/_mqtt.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_mqtt_core.py b/esp32/frozen/Pybytes/_mqtt_core.py index 80da83bf98..d5f6ad1b23 100644 --- a/esp32/frozen/Pybytes/_mqtt_core.py +++ b/esp32/frozen/Pybytes/_mqtt_core.py @@ -2,7 +2,7 @@ umqtt is a simple MQTT client for MicroPython. Original code: https://github.com/micropython/micropython-lib/tree/master/umqtt.simple -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_msg_handl.py b/esp32/frozen/Pybytes/_msg_handl.py index a1b200587d..421c9e6e47 100644 --- a/esp32/frozen/Pybytes/_msg_handl.py +++ b/esp32/frozen/Pybytes/_msg_handl.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_periodical_pin.py b/esp32/frozen/Pybytes/_periodical_pin.py index df2463e552..976c034378 100644 --- a/esp32/frozen/Pybytes/_periodical_pin.py +++ b/esp32/frozen/Pybytes/_periodical_pin.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes.py b/esp32/frozen/Pybytes/_pybytes.py index 4251baa2c6..2516982c0b 100644 --- a/esp32/frozen/Pybytes/_pybytes.py +++ b/esp32/frozen/Pybytes/_pybytes.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_ca.py b/esp32/frozen/Pybytes/_pybytes_ca.py index 292d045718..c9a91548fd 100644 --- a/esp32/frozen/Pybytes/_pybytes_ca.py +++ b/esp32/frozen/Pybytes/_pybytes_ca.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_config.py b/esp32/frozen/Pybytes/_pybytes_config.py index 3b980a02a9..f80ed6aa7b 100644 --- a/esp32/frozen/Pybytes/_pybytes_config.py +++ b/esp32/frozen/Pybytes/_pybytes_config.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_config_reader.py b/esp32/frozen/Pybytes/_pybytes_config_reader.py index bb13ab1842..43b252d426 100644 --- a/esp32/frozen/Pybytes/_pybytes_config_reader.py +++ b/esp32/frozen/Pybytes/_pybytes_config_reader.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_connection.py b/esp32/frozen/Pybytes/_pybytes_connection.py index 6ddc2d68c4..e0a59ed73d 100644 --- a/esp32/frozen/Pybytes/_pybytes_connection.py +++ b/esp32/frozen/Pybytes/_pybytes_connection.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_constants.py b/esp32/frozen/Pybytes/_pybytes_constants.py index 8ae4058530..4e5463dcba 100644 --- a/esp32/frozen/Pybytes/_pybytes_constants.py +++ b/esp32/frozen/Pybytes/_pybytes_constants.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_debug.py b/esp32/frozen/Pybytes/_pybytes_debug.py index a8be1ddbaf..afb950dae3 100644 --- a/esp32/frozen/Pybytes/_pybytes_debug.py +++ b/esp32/frozen/Pybytes/_pybytes_debug.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_library.py b/esp32/frozen/Pybytes/_pybytes_library.py index 78ee000abc..fd4fa2abb1 100644 --- a/esp32/frozen/Pybytes/_pybytes_library.py +++ b/esp32/frozen/Pybytes/_pybytes_library.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_machine_learning.py b/esp32/frozen/Pybytes/_pybytes_machine_learning.py index 5c1fce6626..3c0131da00 100644 --- a/esp32/frozen/Pybytes/_pybytes_machine_learning.py +++ b/esp32/frozen/Pybytes/_pybytes_machine_learning.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_main.py b/esp32/frozen/Pybytes/_pybytes_main.py index f89ab25054..2afd232a9b 100644 --- a/esp32/frozen/Pybytes/_pybytes_main.py +++ b/esp32/frozen/Pybytes/_pybytes_main.py @@ -1,6 +1,6 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_protocol.py b/esp32/frozen/Pybytes/_pybytes_protocol.py index f7d1ba41ed..190dd8eb78 100644 --- a/esp32/frozen/Pybytes/_pybytes_protocol.py +++ b/esp32/frozen/Pybytes/_pybytes_protocol.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_pybytes_pymesh_config.py b/esp32/frozen/Pybytes/_pybytes_pymesh_config.py index ff12070d1c..54b7e1f971 100644 --- a/esp32/frozen/Pybytes/_pybytes_pymesh_config.py +++ b/esp32/frozen/Pybytes/_pybytes_pymesh_config.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/frozen/Pybytes/_terminal.py b/esp32/frozen/Pybytes/_terminal.py index 35f0b82ec8..a5fa9ee664 100644 --- a/esp32/frozen/Pybytes/_terminal.py +++ b/esp32/frozen/Pybytes/_terminal.py @@ -1,5 +1,5 @@ ''' -Copyright (c) 2020, Pycom Limited. +Copyright (c) 2021, Pycom Limited. This software is licensed under the GNU GPL version 3 or any later version, with permitted additional terms. For more information see the Pycom Licence v1.0 document supplied with this file, or diff --git a/esp32/ftp/ftp.c b/esp32/ftp/ftp.c index 2ea6efbdbb..4da2114497 100644 --- a/esp32/ftp/ftp.c +++ b/esp32/ftp/ftp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/ftp/ftp.h b/esp32/ftp/ftp.h index 39e9d4658c..4f7197da51 100644 --- a/esp32/ftp/ftp.h +++ b/esp32/ftp/ftp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/ftp/updater.c b/esp32/ftp/updater.c index b106a2c562..54c2a34435 100644 --- a/esp32/ftp/updater.c +++ b/esp32/ftp/updater.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/ftp/updater.h b/esp32/ftp/updater.h index 1cfa832a95..2c30249773 100644 --- a/esp32/ftp/updater.h +++ b/esp32/ftp/updater.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/hal/esp32_mphal.c b/esp32/hal/esp32_mphal.c index cdca99d8b5..78f8324fdc 100644 --- a/esp32/hal/esp32_mphal.c +++ b/esp32/hal/esp32_mphal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/hal/esp32_mphal.h b/esp32/hal/esp32_mphal.h index 8958e391ed..a025aef1d0 100644 --- a/esp32/hal/esp32_mphal.h +++ b/esp32/hal/esp32_mphal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/board.c b/esp32/lora/board.c index 7a6c7f1bd9..d250be35b2 100644 --- a/esp32/lora/board.c +++ b/esp32/lora/board.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/board.h b/esp32/lora/board.h index fc4829f8b5..758967bf7d 100644 --- a/esp32/lora/board.h +++ b/esp32/lora/board.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/gpio-board.c b/esp32/lora/gpio-board.c index babbbcefdd..d2ea596fee 100644 --- a/esp32/lora/gpio-board.c +++ b/esp32/lora/gpio-board.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/gpio-board.h b/esp32/lora/gpio-board.h index a5d3577cea..1477fd053c 100644 --- a/esp32/lora/gpio-board.h +++ b/esp32/lora/gpio-board.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/ot-log.c b/esp32/lora/ot-log.c index d9de4a30e4..58a5e04713 100644 --- a/esp32/lora/ot-log.c +++ b/esp32/lora/ot-log.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/ot-log.h b/esp32/lora/ot-log.h index 678e92c9ec..5ca68d005f 100644 --- a/esp32/lora/ot-log.h +++ b/esp32/lora/ot-log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/ot-settings.c b/esp32/lora/ot-settings.c index 3948116791..25c95d53e9 100644 --- a/esp32/lora/ot-settings.c +++ b/esp32/lora/ot-settings.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/ot-settings.h b/esp32/lora/ot-settings.h index a367d41473..521979c831 100644 --- a/esp32/lora/ot-settings.h +++ b/esp32/lora/ot-settings.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/otplat_alarm.c b/esp32/lora/otplat_alarm.c index 9506db43e3..1f114a6d93 100644 --- a/esp32/lora/otplat_alarm.c +++ b/esp32/lora/otplat_alarm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/otplat_alarm.h b/esp32/lora/otplat_alarm.h index bdbfa6af59..ad9d9641bd 100644 --- a/esp32/lora/otplat_alarm.h +++ b/esp32/lora/otplat_alarm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/otplat_radio.c b/esp32/lora/otplat_radio.c index 365a6771a0..bbe3297429 100644 --- a/esp32/lora/otplat_radio.c +++ b/esp32/lora/otplat_radio.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/otplat_radio.h b/esp32/lora/otplat_radio.h index f0baa82918..2f5f859305 100644 --- a/esp32/lora/otplat_radio.h +++ b/esp32/lora/otplat_radio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lora/pinName-board.h b/esp32/lora/pinName-board.h index a50a67b1c3..4ff7e32474 100644 --- a/esp32/lora/pinName-board.h +++ b/esp32/lora/pinName-board.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/spi-board.c b/esp32/lora/spi-board.c index 27a7b6330a..61b51077a7 100644 --- a/esp32/lora/spi-board.c +++ b/esp32/lora/spi-board.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/spi-board.h b/esp32/lora/spi-board.h index 4c77ec4aa5..78241eb7e3 100644 --- a/esp32/lora/spi-board.h +++ b/esp32/lora/spi-board.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/timer-board.c b/esp32/lora/timer-board.c index 7c11b0e392..5ea025b796 100644 --- a/esp32/lora/timer-board.c +++ b/esp32/lora/timer-board.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lora/timer-board.h b/esp32/lora/timer-board.h index cde36de4fb..19c3cd8bd5 100644 --- a/esp32/lora/timer-board.h +++ b/esp32/lora/timer-board.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/lte/lteppp.c b/esp32/lte/lteppp.c index 01035c1d74..9bd411fd74 100644 --- a/esp32/lte/lteppp.c +++ b/esp32/lte/lteppp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/lte/lteppp.h b/esp32/lte/lteppp.h index 64b260e80e..f577b8b165 100644 --- a/esp32/lte/lteppp.h +++ b/esp32/lte/lteppp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/main.c b/esp32/main.c index 5f921cf8f5..5a6ab0f909 100644 --- a/esp32/main.c +++ b/esp32/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/lwipsocket.c b/esp32/mods/lwipsocket.c index ebe5e70859..5bc5b977d9 100644 --- a/esp32/mods/lwipsocket.c +++ b/esp32/mods/lwipsocket.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/lwipsocket.h b/esp32/mods/lwipsocket.h index 08c5b30528..6beac8005b 100644 --- a/esp32/mods/lwipsocket.h +++ b/esp32/mods/lwipsocket.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machcan.c b/esp32/mods/machcan.c index 3715acb540..61c092aa25 100644 --- a/esp32/mods/machcan.c +++ b/esp32/mods/machcan.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machcan.h b/esp32/mods/machcan.h index 2b62acf5c5..afcb77bd37 100644 --- a/esp32/mods/machcan.h +++ b/esp32/mods/machcan.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machine_i2c.c b/esp32/mods/machine_i2c.c index a29c0492be..d060a06446 100644 --- a/esp32/mods/machine_i2c.c +++ b/esp32/mods/machine_i2c.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/machine_i2c.h b/esp32/mods/machine_i2c.h index 9762b88904..29dc7e931d 100644 --- a/esp32/mods/machine_i2c.h +++ b/esp32/mods/machine_i2c.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/machpin.c b/esp32/mods/machpin.c index ced3e65ef5..f01e69b059 100644 --- a/esp32/mods/machpin.c +++ b/esp32/mods/machpin.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/machpin.h b/esp32/mods/machpin.h index af432283c6..745c1356fc 100644 --- a/esp32/mods/machpin.h +++ b/esp32/mods/machpin.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machpwm.c b/esp32/mods/machpwm.c index 323deb4f46..d7298ce096 100644 --- a/esp32/mods/machpwm.c +++ b/esp32/mods/machpwm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machpwm.h b/esp32/mods/machpwm.h index ea268c78c1..10e6d21afc 100644 --- a/esp32/mods/machpwm.h +++ b/esp32/mods/machpwm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machrmt.c b/esp32/mods/machrmt.c index 880f64b803..ee224b24d5 100644 --- a/esp32/mods/machrmt.c +++ b/esp32/mods/machrmt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machrmt.h b/esp32/mods/machrmt.h index bfae12b30f..9053573f71 100644 --- a/esp32/mods/machrmt.h +++ b/esp32/mods/machrmt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machrtc.c b/esp32/mods/machrtc.c index df91a404ce..e4f8335867 100644 --- a/esp32/mods/machrtc.c +++ b/esp32/mods/machrtc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machrtc.h b/esp32/mods/machrtc.h index 2f61ca6a76..a97ab92412 100644 --- a/esp32/mods/machrtc.h +++ b/esp32/mods/machrtc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machspi.c b/esp32/mods/machspi.c index 6ac7f81df0..9e005d5e65 100644 --- a/esp32/mods/machspi.c +++ b/esp32/mods/machspi.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/machspi.h b/esp32/mods/machspi.h index 73fa967d77..c913e869a7 100644 --- a/esp32/mods/machspi.h +++ b/esp32/mods/machspi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machtimer.c b/esp32/mods/machtimer.c index 03e2c902bc..d0db382f94 100644 --- a/esp32/mods/machtimer.c +++ b/esp32/mods/machtimer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machtimer.h b/esp32/mods/machtimer.h index e2ed094fb1..6024fc62ff 100644 --- a/esp32/mods/machtimer.h +++ b/esp32/mods/machtimer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machtouch.h b/esp32/mods/machtouch.h index 0ad70ced7e..5f17b9952e 100644 --- a/esp32/mods/machtouch.h +++ b/esp32/mods/machtouch.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machuart.c b/esp32/mods/machuart.c index e92009c2a4..7cded2a2ec 100644 --- a/esp32/mods/machuart.c +++ b/esp32/mods/machuart.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machuart.h b/esp32/mods/machuart.h index f116a29414..9d573619be 100644 --- a/esp32/mods/machuart.h +++ b/esp32/mods/machuart.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machwdt.c b/esp32/mods/machwdt.c index ad4e165958..31dbe91392 100644 --- a/esp32/mods/machwdt.c +++ b/esp32/mods/machwdt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/machwdt.h b/esp32/mods/machwdt.h index 10f3a83cca..9e9c5ad40b 100644 --- a/esp32/mods/machwdt.h +++ b/esp32/mods/machwdt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modbt.c b/esp32/mods/modbt.c index 529159630b..f11c7d2622 100644 --- a/esp32/mods/modbt.c +++ b/esp32/mods/modbt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modbt.h b/esp32/mods/modbt.h index 5c04a98f18..32a97f32b4 100644 --- a/esp32/mods/modbt.h +++ b/esp32/mods/modbt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modcoap.c b/esp32/mods/modcoap.c index ac8a98be41..9280f2ba5d 100644 --- a/esp32/mods/modcoap.c +++ b/esp32/mods/modcoap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modcoap.h b/esp32/mods/modcoap.h index 76a89f7190..78d5f40e3d 100644 --- a/esp32/mods/modcoap.h +++ b/esp32/mods/modcoap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modeth.c b/esp32/mods/modeth.c index 984fdfc220..c0afe812ee 100644 --- a/esp32/mods/modeth.c +++ b/esp32/mods/modeth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modeth.h b/esp32/mods/modeth.h index 3470318ca8..f067e9b921 100644 --- a/esp32/mods/modeth.h +++ b/esp32/mods/modeth.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modled.c b/esp32/mods/modled.c index 665db353c4..4488328f8a 100644 --- a/esp32/mods/modled.c +++ b/esp32/mods/modled.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modled.h b/esp32/mods/modled.h index 7981405c1d..d2b6d8bc3d 100644 --- a/esp32/mods/modled.h +++ b/esp32/mods/modled.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modlora.c b/esp32/mods/modlora.c index 94f742094d..cf63333192 100644 --- a/esp32/mods/modlora.c +++ b/esp32/mods/modlora.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modlora.h b/esp32/mods/modlora.h index e2b7b0e4ac..4136c8dd0b 100644 --- a/esp32/mods/modlora.h +++ b/esp32/mods/modlora.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index b823883ef9..5afdc7e9c7 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -1,5 +1,5 @@ /* -* Copyright (c) 2020, Pycom Limited and its licensors. +* Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modlte.h b/esp32/mods/modlte.h index 10880877d4..83fa6c615b 100644 --- a/esp32/mods/modlte.h +++ b/esp32/mods/modlte.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2020, Pycom Limited and its licensors. +* Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modmachine.c b/esp32/mods/modmachine.c index 28f4f4b9e0..3dad51c2f9 100644 --- a/esp32/mods/modmachine.c +++ b/esp32/mods/modmachine.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modmachine.h b/esp32/mods/modmachine.h index 4bf602975a..85ce0f28ee 100644 --- a/esp32/mods/modmachine.h +++ b/esp32/mods/modmachine.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modmdns.c b/esp32/mods/modmdns.c index bb0814d220..ab66a9d653 100644 --- a/esp32/mods/modmdns.c +++ b/esp32/mods/modmdns.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modmdns.h b/esp32/mods/modmdns.h index cb3a095868..1f3686d6ea 100644 --- a/esp32/mods/modmdns.h +++ b/esp32/mods/modmdns.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modmesh.c b/esp32/mods/modmesh.c index 0e2a67aa9e..e81d79b10c 100644 --- a/esp32/mods/modmesh.c +++ b/esp32/mods/modmesh.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modmesh.h b/esp32/mods/modmesh.h index 5460e00528..a27a4dedb7 100644 --- a/esp32/mods/modmesh.h +++ b/esp32/mods/modmesh.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modnetwork.c b/esp32/mods/modnetwork.c index 26e52323b3..ea7763d595 100644 --- a/esp32/mods/modnetwork.c +++ b/esp32/mods/modnetwork.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modnetwork.h b/esp32/mods/modnetwork.h index 97aee48580..ddab095522 100644 --- a/esp32/mods/modnetwork.h +++ b/esp32/mods/modnetwork.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modpycom.c b/esp32/mods/modpycom.c index 0e7f99ce0f..8ef265607d 100644 --- a/esp32/mods/modpycom.c +++ b/esp32/mods/modpycom.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modsigfox_api.c b/esp32/mods/modsigfox_api.c index 0041b258ed..ffe9c55766 100644 --- a/esp32/mods/modsigfox_api.c +++ b/esp32/mods/modsigfox_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/moducrypto.c b/esp32/mods/moducrypto.c index f6340b8998..9eb0787d76 100644 --- a/esp32/mods/moducrypto.c +++ b/esp32/mods/moducrypto.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/moduhashlib.c b/esp32/mods/moduhashlib.c index 3652676181..07bad81aff 100644 --- a/esp32/mods/moduhashlib.c +++ b/esp32/mods/moduhashlib.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/moduos.c b/esp32/mods/moduos.c index cb1b548e49..e9c90611f8 100644 --- a/esp32/mods/moduos.c +++ b/esp32/mods/moduos.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/moduos.h b/esp32/mods/moduos.h index c91eadf406..3c73114100 100644 --- a/esp32/mods/moduos.h +++ b/esp32/mods/moduos.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/moduqueue.c b/esp32/mods/moduqueue.c index 0a5aa10bdd..37f737ab7e 100644 --- a/esp32/mods/moduqueue.c +++ b/esp32/mods/moduqueue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/moduqueue.h b/esp32/mods/moduqueue.h index bdefb02da5..d9ce833051 100644 --- a/esp32/mods/moduqueue.h +++ b/esp32/mods/moduqueue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modusocket.c b/esp32/mods/modusocket.c index cd660932b2..f88a6ba315 100644 --- a/esp32/mods/modusocket.c +++ b/esp32/mods/modusocket.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modusocket.h b/esp32/mods/modusocket.h index e1a2b5e3d8..dbb33dae37 100644 --- a/esp32/mods/modusocket.h +++ b/esp32/mods/modusocket.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modussl.c b/esp32/mods/modussl.c index 9e1dbe9a02..f351b7af07 100644 --- a/esp32/mods/modussl.c +++ b/esp32/mods/modussl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modussl.h b/esp32/mods/modussl.h index 9784311eb4..4adcfb05df 100644 --- a/esp32/mods/modussl.h +++ b/esp32/mods/modussl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modutime.c b/esp32/mods/modutime.c index adbf85bb59..3b69756bd0 100644 --- a/esp32/mods/modutime.c +++ b/esp32/mods/modutime.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mods/modwlan.c b/esp32/mods/modwlan.c index 55d5b793ea..4f64efa6fe 100644 --- a/esp32/mods/modwlan.c +++ b/esp32/mods/modwlan.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/modwlan.h b/esp32/mods/modwlan.h index 97f572b15f..8db8375a68 100644 --- a/esp32/mods/modwlan.h +++ b/esp32/mods/modwlan.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/pybadc.c b/esp32/mods/pybadc.c index 1f442fe2c9..8ae202e472 100644 --- a/esp32/mods/pybadc.c +++ b/esp32/mods/pybadc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/pybadc.h b/esp32/mods/pybadc.h index 53b6d885ad..93779f4113 100644 --- a/esp32/mods/pybadc.h +++ b/esp32/mods/pybadc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/pybdac.c b/esp32/mods/pybdac.c index ea809d1b78..a5d040abd4 100644 --- a/esp32/mods/pybdac.c +++ b/esp32/mods/pybdac.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/pybdac.h b/esp32/mods/pybdac.h index 7b537eea8b..3ea7d0b9df 100644 --- a/esp32/mods/pybdac.h +++ b/esp32/mods/pybdac.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/pybsd.c b/esp32/mods/pybsd.c index c6b6c1bcf3..e5cfb756cd 100644 --- a/esp32/mods/pybsd.c +++ b/esp32/mods/pybsd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mods/pybsd.h b/esp32/mods/pybsd.h index 130a51af49..f5e0661d47 100644 --- a/esp32/mods/pybsd.h +++ b/esp32/mods/pybsd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mpconfigport.h b/esp32/mpconfigport.h index e6d2228138..64a9af24ce 100644 --- a/esp32/mpconfigport.h +++ b/esp32/mpconfigport.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mptask.c b/esp32/mptask.c index e5e89919d7..423bce4c3f 100644 --- a/esp32/mptask.c +++ b/esp32/mptask.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mptask.h b/esp32/mptask.h index f1ba4f870b..126f2b5579 100644 --- a/esp32/mptask.h +++ b/esp32/mptask.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/mpthreadport.c b/esp32/mpthreadport.c index de383be612..4a5d3f4db1 100644 --- a/esp32/mpthreadport.c +++ b/esp32/mpthreadport.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/mpthreadport.h b/esp32/mpthreadport.h index c54d0bc4a7..3768aed421 100644 --- a/esp32/mpthreadport.h +++ b/esp32/mpthreadport.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/pycom_config.c b/esp32/pycom_config.c index 74c75b5752..9e9416cafd 100644 --- a/esp32/pycom_config.c +++ b/esp32/pycom_config.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pycom_config.h b/esp32/pycom_config.h index 9c23f5ae17..978d2d5013 100644 --- a/esp32/pycom_config.h +++ b/esp32/pycom_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index 3a24ceee49..629ba13a75 100644 --- a/esp32/pycom_version.h +++ b/esp32/pycom_version.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/concentrator/cmd_manager.c b/esp32/pygate/concentrator/cmd_manager.c index 2673147977..dba7ce5116 100644 --- a/esp32/pygate/concentrator/cmd_manager.c +++ b/esp32/pygate/concentrator/cmd_manager.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/concentrator/cmd_manager.h b/esp32/pygate/concentrator/cmd_manager.h index f1ec140ba1..10c4d311ed 100644 --- a/esp32/pygate/concentrator/cmd_manager.h +++ b/esp32/pygate/concentrator/cmd_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/concentrator/loragw_hal_esp.c b/esp32/pygate/concentrator/loragw_hal_esp.c index 417a4abbc3..e0116a6f85 100644 --- a/esp32/pygate/concentrator/loragw_hal_esp.c +++ b/esp32/pygate/concentrator/loragw_hal_esp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/concentrator/loragw_hal_esp.h b/esp32/pygate/concentrator/loragw_hal_esp.h index 4734e978f6..05b6ea7f2a 100644 --- a/esp32/pygate/concentrator/loragw_hal_esp.h +++ b/esp32/pygate/concentrator/loragw_hal_esp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/concentrator/loragw_radio_esp.h b/esp32/pygate/concentrator/loragw_radio_esp.h index 702e71d633..9ee5a2fdb5 100644 --- a/esp32/pygate/concentrator/loragw_radio_esp.h +++ b/esp32/pygate/concentrator/loragw_radio_esp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/concentrator/loragw_reg_esp.c b/esp32/pygate/concentrator/loragw_reg_esp.c index 7fab0c7f4c..6da34bda4f 100644 --- a/esp32/pygate/concentrator/loragw_reg_esp.c +++ b/esp32/pygate/concentrator/loragw_reg_esp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/concentrator/loragw_reg_esp.h b/esp32/pygate/concentrator/loragw_reg_esp.h index 5c14fd18e6..da741cfb1a 100644 --- a/esp32/pygate/concentrator/loragw_reg_esp.h +++ b/esp32/pygate/concentrator/loragw_reg_esp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_aux.h b/esp32/pygate/hal/include/loragw_aux.h index 8e386b20f1..669f4118b6 100644 --- a/esp32/pygate/hal/include/loragw_aux.h +++ b/esp32/pygate/hal/include/loragw_aux.h @@ -1,6 +1,6 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_com.h b/esp32/pygate/hal/include/loragw_com.h index a720a92e02..5b080bf3a4 100644 --- a/esp32/pygate/hal/include/loragw_com.h +++ b/esp32/pygate/hal/include/loragw_com.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_com_esp.h b/esp32/pygate/hal/include/loragw_com_esp.h index f789bf617a..c4213c1ef2 100644 --- a/esp32/pygate/hal/include/loragw_com_esp.h +++ b/esp32/pygate/hal/include/loragw_com_esp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_hal.h b/esp32/pygate/hal/include/loragw_hal.h index c8cff296c7..ec3b27fced 100644 --- a/esp32/pygate/hal/include/loragw_hal.h +++ b/esp32/pygate/hal/include/loragw_hal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_mcu.h b/esp32/pygate/hal/include/loragw_mcu.h index 7196817440..e9d6a2b293 100644 --- a/esp32/pygate/hal/include/loragw_mcu.h +++ b/esp32/pygate/hal/include/loragw_mcu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_radio.h b/esp32/pygate/hal/include/loragw_radio.h index 4dfbf7c271..9176af0e19 100644 --- a/esp32/pygate/hal/include/loragw_radio.h +++ b/esp32/pygate/hal/include/loragw_radio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_reg.h b/esp32/pygate/hal/include/loragw_reg.h index af024a1fb5..a0aed0a3bb 100644 --- a/esp32/pygate/hal/include/loragw_reg.h +++ b/esp32/pygate/hal/include/loragw_reg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/include/loragw_sx125x.h b/esp32/pygate/hal/include/loragw_sx125x.h index c66713a123..b42a5e7aff 100644 --- a/esp32/pygate/hal/include/loragw_sx125x.h +++ b/esp32/pygate/hal/include/loragw_sx125x.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/loragw_aux.c b/esp32/pygate/hal/loragw_aux.c index b898b1e2d4..1e8cc4d89e 100644 --- a/esp32/pygate/hal/loragw_aux.c +++ b/esp32/pygate/hal/loragw_aux.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/loragw_com.c b/esp32/pygate/hal/loragw_com.c index 9c1ce2d906..6e6d65c5e4 100644 --- a/esp32/pygate/hal/loragw_com.c +++ b/esp32/pygate/hal/loragw_com.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/loragw_com_esp.c b/esp32/pygate/hal/loragw_com_esp.c index 5f0211e4bc..6b9e0d8dbc 100644 --- a/esp32/pygate/hal/loragw_com_esp.c +++ b/esp32/pygate/hal/loragw_com_esp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/loragw_hal.c b/esp32/pygate/hal/loragw_hal.c index 36226eb10e..3933d20f56 100644 --- a/esp32/pygate/hal/loragw_hal.c +++ b/esp32/pygate/hal/loragw_hal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/loragw_mcu.c b/esp32/pygate/hal/loragw_mcu.c index 3b56ab7bf2..7f8b2854a9 100644 --- a/esp32/pygate/hal/loragw_mcu.c +++ b/esp32/pygate/hal/loragw_mcu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/loragw_radio.c b/esp32/pygate/hal/loragw_radio.c index 672c1c866c..8f667f231f 100644 --- a/esp32/pygate/hal/loragw_radio.c +++ b/esp32/pygate/hal/loragw_radio.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/hal/loragw_reg.c b/esp32/pygate/hal/loragw_reg.c index 3b8de47c6f..73b17b178e 100644 --- a/esp32/pygate/hal/loragw_reg.c +++ b/esp32/pygate/hal/loragw_reg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/base64.c b/esp32/pygate/lora_pkt_fwd/base64.c index addeda8074..b31c51111a 100644 --- a/esp32/pygate/lora_pkt_fwd/base64.c +++ b/esp32/pygate/lora_pkt_fwd/base64.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/base64.h b/esp32/pygate/lora_pkt_fwd/base64.h index 8515aa05bc..05a5e973dc 100644 --- a/esp32/pygate/lora_pkt_fwd/base64.h +++ b/esp32/pygate/lora_pkt_fwd/base64.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/jitqueue.c b/esp32/pygate/lora_pkt_fwd/jitqueue.c index c078e2f39b..d1bdce8dbf 100644 --- a/esp32/pygate/lora_pkt_fwd/jitqueue.c +++ b/esp32/pygate/lora_pkt_fwd/jitqueue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/jitqueue.h b/esp32/pygate/lora_pkt_fwd/jitqueue.h index 01e69bab69..c3e28b6598 100644 --- a/esp32/pygate/lora_pkt_fwd/jitqueue.h +++ b/esp32/pygate/lora_pkt_fwd/jitqueue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c index 0938dab46b..294e9c2609 100644 --- a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c +++ b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h index 3b2bbf83d2..0043a5494a 100644 --- a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h +++ b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/parson.c b/esp32/pygate/lora_pkt_fwd/parson.c index 452719762b..e24a196cf5 100644 --- a/esp32/pygate/lora_pkt_fwd/parson.c +++ b/esp32/pygate/lora_pkt_fwd/parson.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/parson.h b/esp32/pygate/lora_pkt_fwd/parson.h index f5d7221f25..a28ab16da1 100644 --- a/esp32/pygate/lora_pkt_fwd/parson.h +++ b/esp32/pygate/lora_pkt_fwd/parson.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/timersync.c b/esp32/pygate/lora_pkt_fwd/timersync.c index ed1c512382..9525acc945 100644 --- a/esp32/pygate/lora_pkt_fwd/timersync.c +++ b/esp32/pygate/lora_pkt_fwd/timersync.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/timersync.h b/esp32/pygate/lora_pkt_fwd/timersync.h index bf48fed0f9..68c01c055b 100644 --- a/esp32/pygate/lora_pkt_fwd/timersync.h +++ b/esp32/pygate/lora_pkt_fwd/timersync.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/pygate/lora_pkt_fwd/trace.h b/esp32/pygate/lora_pkt_fwd/trace.h index fdc399abdb..b995ddac26 100644 --- a/esp32/pygate/lora_pkt_fwd/trace.h +++ b/esp32/pygate/lora_pkt_fwd/trace.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/qstrdefsport.h b/esp32/qstrdefsport.h index 63a2b5d304..b7a5e0e252 100644 --- a/esp32/qstrdefsport.h +++ b/esp32/qstrdefsport.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/serverstask.c b/esp32/serverstask.c index 016e449727..9639c27d74 100644 --- a/esp32/serverstask.c +++ b/esp32/serverstask.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/serverstask.h b/esp32/serverstask.h index 5762acbd28..f73a9d7a0f 100644 --- a/esp32/serverstask.h +++ b/esp32/serverstask.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/sigfox/modsigfox.h b/esp32/sigfox/modsigfox.h index eee2292b42..8e62b328dd 100644 --- a/esp32/sigfox/modsigfox.h +++ b/esp32/sigfox/modsigfox.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/telnet/telnet.c b/esp32/telnet/telnet.c index 91972ecdfe..1483928de1 100644 --- a/esp32/telnet/telnet.c +++ b/esp32/telnet/telnet.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/telnet/telnet.h b/esp32/telnet/telnet.h index 754f69b7e9..a2da541b1e 100644 --- a/esp32/telnet/telnet.h +++ b/esp32/telnet/telnet.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/tools/appsign.sh b/esp32/tools/appsign.sh index ba85a3091a..c371e6b209 100644 --- a/esp32/tools/appsign.sh +++ b/esp32/tools/appsign.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/flasher.py b/esp32/tools/flasher.py index 420223bd7d..eacfce4f6a 100644 --- a/esp32/tools/flasher.py +++ b/esp32/tools/flasher.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/fw_updater/pypic.py b/esp32/tools/fw_updater/pypic.py index d0701a4637..d5f16014ce 100755 --- a/esp32/tools/fw_updater/pypic.py +++ b/esp32/tools/fw_updater/pypic.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2016-2020, Pycom Limited. +# Copyright (c) 2016-2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/fw_updater/updater.py b/esp32/tools/fw_updater/updater.py index 401330c2cd..2a7f9fcf92 100755 --- a/esp32/tools/fw_updater/updater.py +++ b/esp32/tools/fw_updater/updater.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2016-2020, Pycom Limited. +# Copyright (c) 2016-2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/idfVerCheck.sh b/esp32/tools/idfVerCheck.sh index 3323cb8e0e..ebe6ebeff4 100644 --- a/esp32/tools/idfVerCheck.sh +++ b/esp32/tools/idfVerCheck.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/lopy_final_test_board_script.py b/esp32/tools/lopy_final_test_board_script.py index 63e5a5be05..5984f97023 100644 --- a/esp32/tools/lopy_final_test_board_script.py +++ b/esp32/tools/lopy_final_test_board_script.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/lopy_initial_test_board_script.py b/esp32/tools/lopy_initial_test_board_script.py index 0f47f653fa..d4c346092f 100644 --- a/esp32/tools/lopy_initial_test_board_script.py +++ b/esp32/tools/lopy_initial_test_board_script.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/lopy_qa_test_board_script.py b/esp32/tools/lopy_qa_test_board_script.py index 144c972b5e..f485627746 100644 --- a/esp32/tools/lopy_qa_test_board_script.py +++ b/esp32/tools/lopy_qa_test_board_script.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/lora/actility/actility.py b/esp32/tools/lora/actility/actility.py index bd98eb3232..162554532c 100644 --- a/esp32/tools/lora/actility/actility.py +++ b/esp32/tools/lora/actility/actility.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/lora/certification/certification.py b/esp32/tools/lora/certification/certification.py index 8c68811730..6f19c950be 100644 --- a/esp32/tools/lora/certification/certification.py +++ b/esp32/tools/lora/certification/certification.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/run_final_lopy_test.py b/esp32/tools/run_final_lopy_test.py index f16f1047c0..a55a0e65e0 100644 --- a/esp32/tools/run_final_lopy_test.py +++ b/esp32/tools/run_final_lopy_test.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/run_initial_lopy_test.py b/esp32/tools/run_initial_lopy_test.py index ade3c20b4a..d324e0b015 100644 --- a/esp32/tools/run_initial_lopy_test.py +++ b/esp32/tools/run_initial_lopy_test.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/run_initial_wipy_test.py b/esp32/tools/run_initial_wipy_test.py index c7769718f0..756c1d08a4 100644 --- a/esp32/tools/run_initial_wipy_test.py +++ b/esp32/tools/run_initial_wipy_test.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/run_qa_lopy_test.py b/esp32/tools/run_qa_lopy_test.py index 6cca6ff692..35b136d5b4 100644 --- a/esp32/tools/run_qa_lopy_test.py +++ b/esp32/tools/run_qa_lopy_test.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/run_qa_wipy_test.py b/esp32/tools/run_qa_wipy_test.py index 75a95056dd..27fa308fc1 100644 --- a/esp32/tools/run_qa_wipy_test.py +++ b/esp32/tools/run_qa_wipy_test.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/wipy_initial_test_board_script.py b/esp32/tools/wipy_initial_test_board_script.py index 61b79825d4..b973ca30a6 100644 --- a/esp32/tools/wipy_initial_test_board_script.py +++ b/esp32/tools/wipy_initial_test_board_script.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/tools/wipy_qa_test_board_script.py b/esp32/tools/wipy_qa_test_board_script.py index c29e547300..9f8da3d2b1 100644 --- a/esp32/tools/wipy_qa_test_board_script.py +++ b/esp32/tools/wipy_qa_test_board_script.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Pycom Limited. +# Copyright (c) 2021, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information diff --git a/esp32/util/antenna.c b/esp32/util/antenna.c index 8b884081de..6cbe63c7e7 100644 --- a/esp32/util/antenna.c +++ b/esp32/util/antenna.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/antenna.h b/esp32/util/antenna.h index b5e9c7dcf2..a45fa08d4a 100644 --- a/esp32/util/antenna.h +++ b/esp32/util/antenna.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/esp32chipinfo.c b/esp32/util/esp32chipinfo.c index 627e39f7e0..5d42a0e846 100644 --- a/esp32/util/esp32chipinfo.c +++ b/esp32/util/esp32chipinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/esp32chipinfo.h b/esp32/util/esp32chipinfo.h index 97957e6a86..bb0ea812d1 100644 --- a/esp32/util/esp32chipinfo.h +++ b/esp32/util/esp32chipinfo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/fifo.c b/esp32/util/fifo.c index 5c4592b36d..bf854d29f2 100644 --- a/esp32/util/fifo.c +++ b/esp32/util/fifo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/fifo.h b/esp32/util/fifo.h index 79fec735b3..cb8b659578 100644 --- a/esp32/util/fifo.h +++ b/esp32/util/fifo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/gccollect.c b/esp32/util/gccollect.c index 3446bcf923..478eada1ac 100644 --- a/esp32/util/gccollect.c +++ b/esp32/util/gccollect.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/util/gccollect.h b/esp32/util/gccollect.h index 673c66f3c5..c717db9649 100644 --- a/esp32/util/gccollect.h +++ b/esp32/util/gccollect.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/util/help.c b/esp32/util/help.c index ed8ab8fbff..def284c16b 100644 --- a/esp32/util/help.c +++ b/esp32/util/help.c @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/esp32/util/mperror.c b/esp32/util/mperror.c index b963b45a18..3a2dfd214c 100644 --- a/esp32/util/mperror.c +++ b/esp32/util/mperror.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/mperror.h b/esp32/util/mperror.h index 98b2b89f9e..649313bc1e 100644 --- a/esp32/util/mperror.h +++ b/esp32/util/mperror.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/mpexception.c b/esp32/util/mpexception.c index d30db8c483..f862cc8e6d 100644 --- a/esp32/util/mpexception.c +++ b/esp32/util/mpexception.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/mpexception.h b/esp32/util/mpexception.h index 547263810a..0912f942d1 100644 --- a/esp32/util/mpexception.h +++ b/esp32/util/mpexception.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/mpirq.c b/esp32/util/mpirq.c index dc378506a3..706d3bf428 100644 --- a/esp32/util/mpirq.c +++ b/esp32/util/mpirq.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/mpirq.h b/esp32/util/mpirq.h index 8f4af32f08..5f1e4c3bc6 100644 --- a/esp32/util/mpirq.h +++ b/esp32/util/mpirq.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/mpsleep.c b/esp32/util/mpsleep.c index e14e5d8da1..246bc075bc 100644 --- a/esp32/util/mpsleep.c +++ b/esp32/util/mpsleep.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/mpsleep.h b/esp32/util/mpsleep.h index ab838a228d..110adf0326 100644 --- a/esp32/util/mpsleep.h +++ b/esp32/util/mpsleep.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/pycom_general_util.c b/esp32/util/pycom_general_util.c index 38c891c038..1f985838a7 100644 --- a/esp32/util/pycom_general_util.c +++ b/esp32/util/pycom_general_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/pycom_general_util.h b/esp32/util/pycom_general_util.h index 97cd1e3d14..c038ff06d9 100644 --- a/esp32/util/pycom_general_util.h +++ b/esp32/util/pycom_general_util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/random.c b/esp32/util/random.c index 6516ea27b9..e5c59bff9c 100644 --- a/esp32/util/random.c +++ b/esp32/util/random.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/random.h b/esp32/util/random.h index 0a651e6af8..b49b017318 100644 --- a/esp32/util/random.h +++ b/esp32/util/random.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/socketfifo.c b/esp32/util/socketfifo.c index 58169799b1..9d6e88e602 100644 --- a/esp32/util/socketfifo.c +++ b/esp32/util/socketfifo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/esp32/util/socketfifo.h b/esp32/util/socketfifo.h index db7bfa4a7f..293de29800 100644 --- a/esp32/util/socketfifo.h +++ b/esp32/util/socketfifo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information diff --git a/lib/lora/system/gpio.h b/lib/lora/system/gpio.h index 95b13593c3..73ba736ea5 100644 --- a/lib/lora/system/gpio.h +++ b/lib/lora/system/gpio.h @@ -1,7 +1,7 @@ /* * This file is derived from the MicroPython project, http://micropython.org/ * - * Copyright (c) 2020, Pycom Limited and its licensors. + * Copyright (c) 2021, Pycom Limited and its licensors. * * This software is licensed under the GNU GPL version 3 or any later version, * with permitted additional terms. For more information see the Pycom Licence diff --git a/py/mpprint.c b/py/mpprint.c index 3be364d36a..98b65234dc 100644 --- a/py/mpprint.c +++ b/py/mpprint.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 2020, Pycom Limited. + * Copyright (c) 2021, Pycom Limited. * * This software is licensed under the GNU GPL version 3 or any * later version, with permitted additional terms. For more information pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy