From 26a10b28e7480b47efa71c9370a5758bf360faf0 Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Mon, 23 Nov 2020 19:42:05 +0100 Subject: [PATCH 01/37] 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 02/37] 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 03/37] 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 04/37] 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 05/37] 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 06/37] 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 07/37] 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 08/37] 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 09/37] 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 10/37] 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 11/37] 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 12e32a603d4e5ee5ac6dfb7db494c014335603fe Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Thu, 27 Aug 2020 13:04:56 +0200 Subject: [PATCH 12/37] add gps coordinates to the pygate json status --- esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c index 0938dab46b..fb30214fcf 100644 --- a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c +++ b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c @@ -1392,7 +1392,12 @@ void TASK_lora_gw(void *pvParameters) { /* generate a JSON report (will be sent to server by upstream thread) */ pthread_mutex_lock(&mx_stat_rep); - snprintf(status_report, STATUS_SIZE, "\"stat\":{\"time\":\"%s\",\"rxnb\":%u,\"rxok\":%u,\"rxfw\":%u,\"ackr\":%.1f,\"dwnb\":%u,\"txnb\":%u}", stat_timestamp, cp_nb_rx_rcv, cp_nb_rx_ok, cp_up_pkt_fwd, 100.0 * up_ack_ratio, cp_dw_dgram_rcv, cp_nb_tx_ok); + if(gps_fake_enable){ + snprintf(status_report, STATUS_SIZE, "\"stat\":{\"time\":\"%s\",\"lati\":%.5f,\"long\":%.5f,\"alti\":%i,\"rxnb\":%u,\"rxok\":%u,\"rxfw\":%u,\"ackr\":%.1f,\"dwnb\":%u,\"txnb\":%u}", stat_timestamp, cp_gps_coord.lat, cp_gps_coord.lon, cp_gps_coord.alt, cp_nb_rx_rcv, cp_nb_rx_ok, cp_up_pkt_fwd, 100.0 * up_ack_ratio, cp_dw_dgram_rcv, cp_nb_tx_ok); + MSG_WARN("sendint GPS coordingats"); + }else{ + snprintf(status_report, STATUS_SIZE, "\"stat\":{\"time\":\"%s\",\"rxnb\":%u,\"rxok\":%u,\"rxfw\":%u,\"ackr\":%.1f,\"dwnb\":%u,\"txnb\":%u}", stat_timestamp, cp_nb_rx_rcv, cp_nb_rx_ok, cp_up_pkt_fwd, 100.0 * up_ack_ratio, cp_dw_dgram_rcv, cp_nb_tx_ok); + } report_ready = true; pthread_mutex_unlock(&mx_stat_rep); } From c046f5ff37283b95c912ee7344e924ece94025c9 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Thu, 27 Aug 2020 13:07:13 +0200 Subject: [PATCH 13/37] fixes the re-initialization of lora OTAA return the semaphore taken by the previous, unsuccesful, join attempt. When re-initializing lora, it would wait indefinitely --- esp32/mods/modlora.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/esp32/mods/modlora.c b/esp32/mods/modlora.c index 94f742094d..619c6043ad 100644 --- a/esp32/mods/modlora.c +++ b/esp32/mods/modlora.c @@ -1102,16 +1102,16 @@ static void TASK_LoRa (void *pvParameters) { #endif mibReq.Type = MIB_NETWORK_ACTIVATION; mibReq.Param.NetworkActivation = ACTIVATION_TYPE_OTAA; - LoRaMacMibSetRequestConfirm( &mibReq ); - - TimerStart( &TxNextActReqTimer ); + LoRaMacMibSetRequestConfirm( &mibReq ); + + TimerStart( &TxNextActReqTimer ); mlmeReq.Type = MLME_JOIN; mlmeReq.Req.Join.DevEui = (uint8_t *)lora_obj.u.otaa.DevEui; mlmeReq.Req.Join.AppEui = (uint8_t *)lora_obj.u.otaa.AppEui; mlmeReq.Req.Join.AppKey = (uint8_t *)lora_obj.u.otaa.AppKey; mlmeReq.Req.Join.NbTrials = 1; mlmeReq.Req.Join.DR = (uint8_t) lora_obj.otaa_dr; - LoRaMacMlmeRequest( &mlmeReq ); + LoRaMacMlmeRequest( &mlmeReq ); } else { mibReq.Type = MIB_NETWORK_ACTIVATION; mibReq.Param.NetworkActivation = ACTIVATION_TYPE_ABP; @@ -1692,6 +1692,13 @@ static bool lora_tx_space (void) { /// \class LoRa - Semtech SX1272 radio driver static mp_obj_t lora_init_helper(lora_obj_t *self, const mp_arg_val_t *args) { lora_cmd_data_t cmd_data; + xSemaphoreGive(xLoRaSigfoxSem); + // vEventGroupDelete(LoRaEvents); + // xQueueReset(xCmdQueue); + // xQueueReset(xRxQueue); + // xQueueReset(xCbQueue); + // LoRaEvents = xEventGroupCreate(); + cmd_data.info.init.stack_mode = args[0].u_int; lora_validate_mode (cmd_data.info.init.stack_mode); From 21af0b7b559d03656ed79ed8a7d87f82fe7f0114 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Thu, 27 Aug 2020 13:10:01 +0200 Subject: [PATCH 14/37] Revert "add gps coordinates to the pygate json status" This reverts commit 9e3de606aa6023bce71ade976253b6e1b85605af. --- esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c index fb30214fcf..0938dab46b 100644 --- a/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c +++ b/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c @@ -1392,12 +1392,7 @@ void TASK_lora_gw(void *pvParameters) { /* generate a JSON report (will be sent to server by upstream thread) */ pthread_mutex_lock(&mx_stat_rep); - if(gps_fake_enable){ - snprintf(status_report, STATUS_SIZE, "\"stat\":{\"time\":\"%s\",\"lati\":%.5f,\"long\":%.5f,\"alti\":%i,\"rxnb\":%u,\"rxok\":%u,\"rxfw\":%u,\"ackr\":%.1f,\"dwnb\":%u,\"txnb\":%u}", stat_timestamp, cp_gps_coord.lat, cp_gps_coord.lon, cp_gps_coord.alt, cp_nb_rx_rcv, cp_nb_rx_ok, cp_up_pkt_fwd, 100.0 * up_ack_ratio, cp_dw_dgram_rcv, cp_nb_tx_ok); - MSG_WARN("sendint GPS coordingats"); - }else{ - snprintf(status_report, STATUS_SIZE, "\"stat\":{\"time\":\"%s\",\"rxnb\":%u,\"rxok\":%u,\"rxfw\":%u,\"ackr\":%.1f,\"dwnb\":%u,\"txnb\":%u}", stat_timestamp, cp_nb_rx_rcv, cp_nb_rx_ok, cp_up_pkt_fwd, 100.0 * up_ack_ratio, cp_dw_dgram_rcv, cp_nb_tx_ok); - } + snprintf(status_report, STATUS_SIZE, "\"stat\":{\"time\":\"%s\",\"rxnb\":%u,\"rxok\":%u,\"rxfw\":%u,\"ackr\":%.1f,\"dwnb\":%u,\"txnb\":%u}", stat_timestamp, cp_nb_rx_rcv, cp_nb_rx_ok, cp_up_pkt_fwd, 100.0 * up_ack_ratio, cp_dw_dgram_rcv, cp_nb_tx_ok); report_ready = true; pthread_mutex_unlock(&mx_stat_rep); } From a5dff88ca93bdf1fb1aa4e548124bdad24818f84 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:05:23 +0200 Subject: [PATCH 15/37] fixed the timeout --- esp32/mods/modlora.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esp32/mods/modlora.c b/esp32/mods/modlora.c index 619c6043ad..753b0cdf74 100644 --- a/esp32/mods/modlora.c +++ b/esp32/mods/modlora.c @@ -1102,9 +1102,9 @@ static void TASK_LoRa (void *pvParameters) { #endif mibReq.Type = MIB_NETWORK_ACTIVATION; mibReq.Param.NetworkActivation = ACTIVATION_TYPE_OTAA; - LoRaMacMibSetRequestConfirm( &mibReq ); + LoRaMacMibSetRequestConfirm( &mibReq ); - TimerStart( &TxNextActReqTimer ); + TimerStart( &TxNextActReqTimer ); mlmeReq.Type = MLME_JOIN; mlmeReq.Req.Join.DevEui = (uint8_t *)lora_obj.u.otaa.DevEui; mlmeReq.Req.Join.AppEui = (uint8_t *)lora_obj.u.otaa.AppEui; @@ -1981,6 +1981,7 @@ STATIC mp_obj_t lora_join(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t * timeout -= LORA_JOIN_WAIT_MS; } if (timeout <= 0) { + TimerStop( &TxNextActReqTimer ); nlr_raise(mp_obj_new_exception_msg(&mp_type_TimeoutError, "timed out")); } } From 6153b01d3175e0f3e7910bce3cddd03987bb8822 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Fri, 15 Jan 2021 13:11:42 +0100 Subject: [PATCH 16/37] removed commented code --- esp32/mods/modlora.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/esp32/mods/modlora.c b/esp32/mods/modlora.c index 753b0cdf74..433bd2ea67 100644 --- a/esp32/mods/modlora.c +++ b/esp32/mods/modlora.c @@ -1111,7 +1111,7 @@ static void TASK_LoRa (void *pvParameters) { mlmeReq.Req.Join.AppKey = (uint8_t *)lora_obj.u.otaa.AppKey; mlmeReq.Req.Join.NbTrials = 1; mlmeReq.Req.Join.DR = (uint8_t) lora_obj.otaa_dr; - LoRaMacMlmeRequest( &mlmeReq ); + LoRaMacMlmeRequest( &mlmeReq ); } else { mibReq.Type = MIB_NETWORK_ACTIVATION; mibReq.Param.NetworkActivation = ACTIVATION_TYPE_ABP; @@ -1693,12 +1693,6 @@ static bool lora_tx_space (void) { static mp_obj_t lora_init_helper(lora_obj_t *self, const mp_arg_val_t *args) { lora_cmd_data_t cmd_data; xSemaphoreGive(xLoRaSigfoxSem); - // vEventGroupDelete(LoRaEvents); - // xQueueReset(xCmdQueue); - // xQueueReset(xRxQueue); - // xQueueReset(xCbQueue); - // LoRaEvents = xEventGroupCreate(); - cmd_data.info.init.stack_mode = args[0].u_int; lora_validate_mode (cmd_data.info.init.stack_mode); From 144e161d48cec3fae7496d0702eca5d5a7922868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9za=20Husi?= Date: Thu, 21 Jan 2021 11:39:34 +0100 Subject: [PATCH 17/37] Fix problem in mod_coap_resource_callback_enable() which forbids to disable a given action on the resource (#216) --- esp32/mods/modcoap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/mods/modcoap.c b/esp32/mods/modcoap.c index ac8a98be41..f6e45db919 100644 --- a/esp32/mods/modcoap.c +++ b/esp32/mods/modcoap.c @@ -816,7 +816,7 @@ STATIC mp_obj_t mod_coap_resource_callback_enable(mp_obj_t self_in, mp_obj_t req mod_coap_resource_obj_t* self = (mod_coap_resource_obj_t*)self_in; mp_int_t request_type = mp_obj_get_int(request_type_in); - bool enable = mp_obj_get_int(request_type_in) == 0 ? false : true; + bool enable = mp_obj_get_int(enable_in) == 0 ? false : true; if(request_type & MODCOAP_REQUEST_GET) { if(enable) coap_register_handler(self->coap_resource, COAP_REQUEST_GET, coap_resource_callback_get); From ed4e1910619b1598b11a850cec53582b21364afc Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Mon, 25 Jan 2021 16:16:35 +0100 Subject: [PATCH 18/37] Lora reinit fix (#219) * semaphore exists only for Fipy and Lopy4 --- esp32/mods/modlora.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esp32/mods/modlora.c b/esp32/mods/modlora.c index 433bd2ea67..9a7f58150b 100644 --- a/esp32/mods/modlora.c +++ b/esp32/mods/modlora.c @@ -1692,8 +1692,9 @@ static bool lora_tx_space (void) { /// \class LoRa - Semtech SX1272 radio driver static mp_obj_t lora_init_helper(lora_obj_t *self, const mp_arg_val_t *args) { lora_cmd_data_t cmd_data; +#if defined(FIPY) || defined(LOPY4) xSemaphoreGive(xLoRaSigfoxSem); - +#endif cmd_data.info.init.stack_mode = args[0].u_int; lora_validate_mode (cmd_data.info.init.stack_mode); From 9499afd7677232f8a6d1ad4ae61e621385169f34 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Sun, 31 Jan 2021 21:47:20 +0100 Subject: [PATCH 19/37] vfs_littlefs_file.c: Prevent double close of a file An attempt to close a file twice resulted in a crash, because buffers should have been freed again. This change checks first, if a file is already closed. --- esp32/littlefs/vfs_littlefs_file.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/esp32/littlefs/vfs_littlefs_file.c b/esp32/littlefs/vfs_littlefs_file.c index aa7a90edb5..35698c1b20 100644 --- a/esp32/littlefs/vfs_littlefs_file.c +++ b/esp32/littlefs/vfs_littlefs_file.c @@ -100,17 +100,19 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, return 0; } else if (request == MP_STREAM_CLOSE) { + if (self->littlefs == NULL) { + return 0; + } xSemaphoreTake(self->littlefs->mutex, portMAX_DELAY); int res = littlefs_close_common_helper(&self->littlefs->lfs, &self->fp, &self->cfg, &self->timestamp_update); xSemaphoreGive(self->littlefs->mutex); + + self->littlefs = NULL; // indicate a closed file if (res < 0) { *errcode = littleFsErrorToErrno(res); return MP_STREAM_ERROR; } - // Free up the object so GC does not need to do that - m_del_obj(pyb_file_obj_t, self); - return 0; } else { *errcode = MP_EINVAL; From 8baf148659d3e04b32a17293f59cbfc7731a33c1 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Thu, 4 Mar 2021 20:21:40 +0100 Subject: [PATCH 20/37] vfs_littlefs_file.c: Move tagging files as closed. Move it behind the error check for the close. --- esp32/littlefs/vfs_littlefs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/littlefs/vfs_littlefs_file.c b/esp32/littlefs/vfs_littlefs_file.c index 35698c1b20..fe575115e3 100644 --- a/esp32/littlefs/vfs_littlefs_file.c +++ b/esp32/littlefs/vfs_littlefs_file.c @@ -108,11 +108,11 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, int res = littlefs_close_common_helper(&self->littlefs->lfs, &self->fp, &self->cfg, &self->timestamp_update); xSemaphoreGive(self->littlefs->mutex); - self->littlefs = NULL; // indicate a closed file if (res < 0) { *errcode = littleFsErrorToErrno(res); return MP_STREAM_ERROR; } + self->littlefs = NULL; // indicate a closed file return 0; } else { *errcode = MP_EINVAL; From 92531016779901e3d27a318d58cbb786b61e821c Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sun, 7 Mar 2021 10:37:23 +0100 Subject: [PATCH 21/37] Adjust the fix so calling other file operations (e.g. write, read etc.) after close() not crash the system --- esp32/littlefs/vfs_littlefs_file.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/esp32/littlefs/vfs_littlefs_file.c b/esp32/littlefs/vfs_littlefs_file.c index fe575115e3..3f3c44da3d 100644 --- a/esp32/littlefs/vfs_littlefs_file.c +++ b/esp32/littlefs/vfs_littlefs_file.c @@ -20,6 +20,7 @@ typedef struct _pyb_file_obj_t { vfs_lfs_struct_t* littlefs; struct lfs_file_config cfg; // Attributes of the file, e.g.: timestamp bool timestamp_update; // For requesting timestamp update when closing the file + bool opened; // Indicate whether the file is opened } pyb_file_obj_t; STATIC void file_obj_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { @@ -100,7 +101,8 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, return 0; } else if (request == MP_STREAM_CLOSE) { - if (self->littlefs == NULL) { + // This check is needed here because calling close() twice makes LFS crash in lfs_file_close() + if (self->opened == false) { return 0; } @@ -112,7 +114,7 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, *errcode = littleFsErrorToErrno(res); return MP_STREAM_ERROR; } - self->littlefs = NULL; // indicate a closed file + self->opened = false; // indicate a closed file return 0; } else { *errcode = MP_EINVAL; @@ -167,6 +169,7 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar pyb_file_obj_t *o = m_new_obj_with_finaliser(pyb_file_obj_t); o->base.type = type; o->timestamp_update = false; + o->opened = false; xSemaphoreTake(vfs->fs.littlefs.mutex, portMAX_DELAY); const char *fname = concat_with_cwd(&vfs->fs.littlefs, mp_obj_str_get_str(args[0].u_obj)); @@ -180,6 +183,7 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar } o->littlefs = &vfs->fs.littlefs; + o->opened = true; // File is opened successfully return MP_OBJ_FROM_PTR(o); } From 39ca3002f6f35b80808604ab383098073d8e2725 Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sun, 7 Mar 2021 11:11:45 +0100 Subject: [PATCH 22/37] Adjust to be the same as FatFs --- esp32/littlefs/vfs_littlefs_file.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/esp32/littlefs/vfs_littlefs_file.c b/esp32/littlefs/vfs_littlefs_file.c index 3f3c44da3d..4003521325 100644 --- a/esp32/littlefs/vfs_littlefs_file.c +++ b/esp32/littlefs/vfs_littlefs_file.c @@ -32,6 +32,12 @@ STATIC mp_uint_t file_obj_read(mp_obj_t self_in, void *buf, mp_uint_t size, int pyb_file_obj_t *self = MP_OBJ_TO_PTR(self_in); + if (self->opened == false) { + // Return EINVAL just as FatFS if the file is not opened + *errcode = MP_EINVAL; + return MP_STREAM_ERROR; + } + xSemaphoreTake(self->littlefs->mutex, portMAX_DELAY); lfs_ssize_t sz_out = lfs_file_read(&self->littlefs->lfs ,&self->fp, buf, size); xSemaphoreGive(self->littlefs->mutex); @@ -47,6 +53,12 @@ STATIC mp_uint_t file_obj_write(mp_obj_t self_in, const void *buf, mp_uint_t siz pyb_file_obj_t *self = MP_OBJ_TO_PTR(self_in); + if (self->opened == false) { + // Return EINVAL just as FatFS if the file is not opened + *errcode = MP_EINVAL; + return MP_STREAM_ERROR; + } + xSemaphoreTake(self->littlefs->mutex, portMAX_DELAY); lfs_ssize_t sz_out = lfs_file_write(&self->littlefs->lfs, &self->fp, buf, size); // Request timestamp update if file has been written successfully @@ -90,6 +102,12 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, } else if (request == MP_STREAM_FLUSH) { + if (self->opened == false) { + // Return EINVAL just as FatFS if the file is not opened + *errcode = MP_EINVAL; + return MP_STREAM_ERROR; + } + xSemaphoreTake(self->littlefs->mutex, portMAX_DELAY); int res = lfs_file_sync(&self->littlefs->lfs, &self->fp); xSemaphoreGive(self->littlefs->mutex); @@ -101,8 +119,9 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, return 0; } else if (request == MP_STREAM_CLOSE) { - // This check is needed here because calling close() twice makes LFS crash in lfs_file_close() + if (self->opened == false) { + // Return 0 just as FatFs if the file is not opened return 0; } @@ -114,6 +133,7 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, *errcode = littleFsErrorToErrno(res); return MP_STREAM_ERROR; } + self->opened = false; // indicate a closed file return 0; } else { From 56dd0ed92f7034fcef5a0859346300f4b3eecccd Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sun, 7 Mar 2021 11:45:28 +0100 Subject: [PATCH 23/37] Add the modified functionality to the regression tests --- tests/esp32/fs_file.py | 34 ++++++++++++++++++++++++++++++++++ tests/esp32/fs_file.py.exp | 6 ++++++ 2 files changed, 40 insertions(+) diff --git a/tests/esp32/fs_file.py b/tests/esp32/fs_file.py index ab647a0079..3924887bb2 100644 --- a/tests/esp32/fs_file.py +++ b/tests/esp32/fs_file.py @@ -74,6 +74,32 @@ def file_seek_test(path): print("{0}, f.tell(): {1}".format(path, f.tell())) f.close() +def file_double_close_test(path): + f = open(path) + # Nothing should be printed out + f.close() + f.close() + f.close() + +def file_operations_after_close_test(path): + f = open(path, "rw") + f.close() + try: + f.read() + except Exception as e: + print("{0}, Exception after f.read: {1}".format(path, e)) + try: + f.write("aaa") + except Exception as e: + print("{0}, Exception after f.write: {1}".format(path, e)) + try: + f.flush() + except Exception as e: + print("{0}, Exception after f.flush: {1}".format(path, e)) + # No exception should be dropped + f.seek(12) + f.tell() + sd = SD() sd_fat_fs = os.mkfat(sd) @@ -157,6 +183,14 @@ def file_seek_test(path): file_readline_test(f_path) file_readline_test(sd_path) +#Test multiple file.close +file_double_close_test(f_path) +file_double_close_test(sd_path) + +#Test other operations after file.close() +file_operations_after_close_test(f_path) +file_operations_after_close_test(sd_path) + os.remove(f_path) os.remove(sd_path) os.umount("/sd") diff --git a/tests/esp32/fs_file.py.exp b/tests/esp32/fs_file.py.exp index 42d8f43e3b..d671c7b9ec 100644 --- a/tests/esp32/fs_file.py.exp +++ b/tests/esp32/fs_file.py.exp @@ -66,3 +66,9 @@ bytearray(b'0123456789') /sd/t.txt, f.readline(10): 01234 /sd/t.txt, f.readlines(): ['01234\n', '56789'] +/flash/t.txt, Exception after f.read: [Errno 22] EINVAL +/flash/t.txt, Exception after f.write: [Errno 22] EINVAL +/flash/t.txt, Exception after f.flush: [Errno 22] EINVAL +/sd/t.txt, Exception after f.read: [Errno 22] EINVAL +/sd/t.txt, Exception after f.write: [Errno 22] EINVAL +/sd/t.txt, Exception after f.flush: [Errno 22] EINVAL From a37510c092bcec00671c924accb97dcdfa2f4b5d Mon Sep 17 00:00:00 2001 From: Christian Ehlers Date: Tue, 9 Mar 2021 20:37:45 +0100 Subject: [PATCH 24/37] 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 From a66cdec5b20efcc153031ffdfafd0ea037f9e5fa Mon Sep 17 00:00:00 2001 From: robert-hh Date: Thu, 14 Jan 2021 20:24:50 +0100 Subject: [PATCH 25/37] sflash_diskio_littlefs.c: Enable block level wear-leveling Otherwise, superblocks will be overly used and wear out in cases, where a single file is rewritten again and again. See https://forum.pycom.io/topic/6734/external-flash-lose-files --- esp32/littlefs/sflash_diskio_littlefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/littlefs/sflash_diskio_littlefs.c b/esp32/littlefs/sflash_diskio_littlefs.c index f386cf47f4..db02f84bd3 100644 --- a/esp32/littlefs/sflash_diskio_littlefs.c +++ b/esp32/littlefs/sflash_diskio_littlefs.c @@ -45,7 +45,7 @@ struct lfs_config lfscfg = .prog_size = SFLASH_BLOCK_SIZE, .block_size = SFLASH_BLOCK_SIZE, .block_count = 0, // To be initialized according to the flash size of the chip - .block_cycles = 0, // No block-level wear-leveling + .block_cycles = 1000, // Enable block-level wear-leveling /* Current implementation of littlefs_read/prog/erase/sync() functions only operates with * full blocks, always the starting address of the block is passed to the driver. * This helps on the Power-loss resilient behavior of LittleFS, with this approach the File System will not be corrupted by corruption of a single file/block From bdebb495e820cb6a9547d6d9749748708c970f0c Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sun, 21 Mar 2021 14:26:19 +0100 Subject: [PATCH 26/37] sflash_diskio_littlefs.c: change block_cycles to 100 --- esp32/littlefs/sflash_diskio_littlefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/littlefs/sflash_diskio_littlefs.c b/esp32/littlefs/sflash_diskio_littlefs.c index db02f84bd3..ea61ada52c 100644 --- a/esp32/littlefs/sflash_diskio_littlefs.c +++ b/esp32/littlefs/sflash_diskio_littlefs.c @@ -45,7 +45,7 @@ struct lfs_config lfscfg = .prog_size = SFLASH_BLOCK_SIZE, .block_size = SFLASH_BLOCK_SIZE, .block_count = 0, // To be initialized according to the flash size of the chip - .block_cycles = 1000, // Enable block-level wear-leveling + .block_cycles = 100, // Enable block-level wear-leveling /* Current implementation of littlefs_read/prog/erase/sync() functions only operates with * full blocks, always the starting address of the block is passed to the driver. * This helps on the Power-loss resilient behavior of LittleFS, with this approach the File System will not be corrupted by corruption of a single file/block From 7d28bd1842aaae066ca71a7d64c70c03be2ee975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9za=20Husi?= Date: Sat, 10 Apr 2021 10:14:22 +0200 Subject: [PATCH 27/37] mperror.c: Move noticing of the next heartbeat transition (#235) The place at which the time for the next transition is noticed moves from the start of the respective block to it's end, when the RGB led has switched. Co-authored-by: robert-hh --- esp32/util/mperror.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/esp32/util/mperror.c b/esp32/util/mperror.c index b963b45a18..ac0a677d13 100644 --- a/esp32/util/mperror.c +++ b/esp32/util/mperror.c @@ -131,16 +131,18 @@ bool mperror_heartbeat_signal (void) { mperror_heart_beat.do_disable = false; } else if (mperror_heart_beat.enabled) { if (!mperror_heart_beat.beating) { - if ((mperror_heart_beat.on_time = mp_hal_ticks_ms_non_blocking()) - mperror_heart_beat.off_time > MPERROR_HEARTBEAT_OFF_MS) { + if (mp_hal_ticks_ms_non_blocking() > mperror_heart_beat.off_time) { led_info.color.value = MPERROR_HEARTBEAT_COLOR; - led_set_color(&led_info, false, false); + led_set_color(&led_info, true, false); mperror_heart_beat.beating = true; + mperror_heart_beat.on_time = mp_hal_ticks_ms_non_blocking() + MPERROR_HEARTBEAT_ON_MS; } } else { - if ((mperror_heart_beat.off_time = mp_hal_ticks_ms_non_blocking()) - mperror_heart_beat.on_time > MPERROR_HEARTBEAT_ON_MS) { + if (mp_hal_ticks_ms_non_blocking() > mperror_heart_beat.on_time) { led_info.color.value = 0; - led_set_color(&led_info, false, false); + led_set_color(&led_info, true, false); mperror_heart_beat.beating = false; + mperror_heart_beat.off_time = mp_hal_ticks_ms_non_blocking() + MPERROR_HEARTBEAT_OFF_MS; } } } From 46d4a319b537ffeeaf7d494ea166e6a4b57d4a14 Mon Sep 17 00:00:00 2001 From: Sven Herrmann Date: Wed, 20 Jan 2021 20:25:54 +0100 Subject: [PATCH 28/37] LTE: fix conditional in lte_check_attached We used to check the AcT to be equal 7 or 9 (lte). Since CEREG=1 8e631ef the AcT is not returned in this call. So we can't check for it, but that's no problem. Checking for attached state 1 or 5 is good enough. Signed-off-by: Peter Putz --- esp32/mods/modlte.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/esp32/mods/modlte.c b/esp32/mods/modlte.c index b823883ef9..8e61193d4e 100644 --- a/esp32/mods/modlte.c +++ b/esp32/mods/modlte.c @@ -280,8 +280,7 @@ 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: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5"))) - && (strlen(pos) >= 31) && (pos[30] == '7' || pos[30] == '9')) { + if ((pos = strstr(modlte_rsp.data, "+CEREG: 1,1")) || (pos = strstr(modlte_rsp.data, "+CEREG: 1,5"))) { attached = true; } } else { From aace45a5d58d9319af0f06d709e1a353cb5b3dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kov=C3=A1cs-Nagy?= Date: Sun, 16 Feb 2020 20:30:17 +0100 Subject: [PATCH 29/37] Define uart id as int instead of mp_obj --- esp32/mods/machuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp32/mods/machuart.c b/esp32/mods/machuart.c index e92009c2a4..a9fbabee90 100644 --- a/esp32/mods/machuart.c +++ b/esp32/mods/machuart.c @@ -456,7 +456,7 @@ STATIC mp_obj_t mach_uart_init_helper(mach_uart_obj_t *self, const mp_arg_val_t } STATIC const mp_arg_t mach_uart_init_args[] = { - { MP_QSTR_id, MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_id, MP_ARG_INT, {.u_int = MACH_UART_0} }, { MP_QSTR_baudrate, MP_ARG_INT, {.u_int = 9600} }, { MP_QSTR_bits, MP_ARG_INT, {.u_int = 8} }, { MP_QSTR_parity, MP_ARG_OBJ, {.u_obj = mp_const_none} }, @@ -473,7 +473,7 @@ STATIC mp_obj_t mach_uart_make_new(const mp_obj_type_t *type, mp_uint_t n_args, mp_arg_parse_all(n_args, all_args, &kw_args, MP_ARRAY_SIZE(args), mach_uart_init_args, args); // work out the uart id - uint uart_id = mp_obj_get_int(args[0].u_obj); + uint uart_id = args[0].u_int; #if defined(GPY) || defined(FIPY) if (uart_id > MACH_UART_1) { From d6a17b1da1416d82b1fc436d5ce8d7105c403ad6 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Fri, 19 Feb 2021 15:38:23 +0100 Subject: [PATCH 30/37] machuart: change default to UART 1 afterall UART 0 is the REPL. I think it makes sense to not break the REPL by default. If needed people can still configure UART 0 explicitly. --- esp32/mods/machuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/mods/machuart.c b/esp32/mods/machuart.c index a9fbabee90..50181f0cc7 100644 --- a/esp32/mods/machuart.c +++ b/esp32/mods/machuart.c @@ -456,7 +456,7 @@ STATIC mp_obj_t mach_uart_init_helper(mach_uart_obj_t *self, const mp_arg_val_t } STATIC const mp_arg_t mach_uart_init_args[] = { - { MP_QSTR_id, MP_ARG_INT, {.u_int = MACH_UART_0} }, + { MP_QSTR_id, MP_ARG_INT, {.u_int = MACH_UART_1} }, { MP_QSTR_baudrate, MP_ARG_INT, {.u_int = 9600} }, { MP_QSTR_bits, MP_ARG_INT, {.u_int = 8} }, { MP_QSTR_parity, MP_ARG_OBJ, {.u_obj = mp_const_none} }, From 4cf727321ed6d5cacef5973e9b41aefa7a5f6982 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Fri, 19 Feb 2021 13:05:18 +0100 Subject: [PATCH 31/37] fix mpy-cross build --- py/makeversionhdr.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/py/makeversionhdr.py b/py/makeversionhdr.py index 2ab99d89b4..0af0049870 100644 --- a/py/makeversionhdr.py +++ b/py/makeversionhdr.py @@ -57,11 +57,20 @@ def get_version_info_from_docs_conf(): return git_tag, "" return None +def get_version_info_from_pycom_version(): + with open(os.path.join(os.path.dirname(sys.argv[0]), "..", "esp32", "pycom_version.h")) as f: + for line in f: + if line.startswith("#define SW_VERSION_NUMBER"): + ver = line.strip().split('"')[1] + git_tag = "v" + ver + return git_tag, "" + return None + def make_version_header(filename): # Get version info using git, with fallback to docs/conf.py info = get_version_info_from_git() if info is None: - info = get_version_info_from_docs_conf() + info = get_version_info_from_pycom_version() git_tag, git_hash = info From efaea4d4c7a9646c4662c82bbcbf5c9d49a71737 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Wed, 30 Jun 2021 13:55:37 +0200 Subject: [PATCH 32/37] thread: allocate internal mem malloc() may silently allocate external ram if it can't find enough internal ram and then we only get a core dump from an assert in xTaskCreate --- esp32/mpthreadport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esp32/mpthreadport.c b/esp32/mpthreadport.c index de383be612..63b8b083b9 100644 --- a/esp32/mpthreadport.c +++ b/esp32/mpthreadport.c @@ -171,15 +171,15 @@ void mp_thread_create_ex(void *(*entry)(void*), void *arg, size_t *stack_size, i // allocate TCB, stack and linked-list node (must be outside thread_mutex lock) if (mp_chip_revision > 0) { // for revision 1 devices we allocate from the internal memory of the malloc heap - tcb = malloc(sizeof(StaticTask_t)); + tcb = heap_caps_malloc(sizeof(StaticTask_t), MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); if (!tcb) { goto memory_error; } - stack = malloc(*stack_size); + stack = heap_caps_malloc(*stack_size, MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); if (!stack) { goto memory_error; } - th = malloc(sizeof(thread_t)); + th = heap_caps_malloc(sizeof(thread_t), MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); if (!th) { goto memory_error; } From b596cea32c7f318177d82624be3dcac0fd2d51e4 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Fri, 16 Jul 2021 14:43:00 +0200 Subject: [PATCH 33/37] micropython task: allocate internal ram malloc() may silently allocate external ram if it can't find enough internal ram and then we only get a core dump from an assert in xTaskCreate --- esp32/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp32/main.c b/esp32/main.c index 5f921cf8f5..23db9e1226 100644 --- a/esp32/main.c +++ b/esp32/main.c @@ -173,7 +173,7 @@ void app_main(void) { micropy_lpwan_dio_pin_num = 23; micropy_lpwan_dio_pin = &pin_GPIO23; - mpTaskStack = malloc(MICROPY_TASK_STACK_SIZE_PSRAM); + mpTaskStack = heap_caps_malloc(MICROPY_TASK_STACK_SIZE_PSRAM, MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); // create the MicroPython task mpTaskHandle = @@ -196,7 +196,7 @@ void app_main(void) { micropy_lpwan_dio_pin_num = 23; micropy_lpwan_dio_pin = &pin_GPIO23; - mpTaskStack = malloc(MICROPY_TASK_STACK_SIZE); + mpTaskStack = heap_caps_malloc(MICROPY_TASK_STACK_SIZE, MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); // create the MicroPython task mpTaskHandle = From 68c00633883ebd968f6ba25a220687f2ae1eb2af Mon Sep 17 00:00:00 2001 From: VladPetrovici Date: Mon, 28 Jun 2021 14:39:49 +0300 Subject: [PATCH 34/37] Fix for the missing certificated in WPA2 Enterprise connection (#263) * Fix for the missing certificated in WPA2 Enterprise connection * Added verification check for the certificate content, updated comment Co-authored-by: VladP --- esp32/mods/modwlan.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/esp32/mods/modwlan.c b/esp32/mods/modwlan.c index 55d5b793ea..a4744d688f 100644 --- a/esp32/mods/modwlan.c +++ b/esp32/mods/modwlan.c @@ -760,6 +760,28 @@ STATIC void wlan_do_connect (const char* ssid, const char* bssid, const wifi_aut goto os_error; } + /* Read certificates content (if they are available) for the WPA2 Enterprise authentication */ + if (auth == WIFI_AUTH_WPA2_ENTERPRISE) { + const char *wpa_cert = NULL; + if (wlan_wpa2_ent.ca_certs_path != NULL) { + wpa_cert = pycom_util_read_file(wlan_wpa2_ent.ca_certs_path, &wlan_obj.vstr_ca); + if(wpa_cert == NULL) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "certificate file not found")); + } + } + + if (wlan_wpa2_ent.client_key_path != NULL && wlan_wpa2_ent.client_cert_path != NULL) { + wpa_cert = pycom_util_read_file(wlan_wpa2_ent.client_key_path, &wlan_obj.vstr_key); + if(wpa_cert == NULL) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "device key certificate file not found")); + } + wpa_cert = pycom_util_read_file(wlan_wpa2_ent.client_cert_path, &wlan_obj.vstr_cert); + if(wpa_cert == NULL) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "device client certificate file not found")); + } + } + } + // The certificate files are already read at this point because this function runs outside of GIL, and the file_read functions uses MicroPython APIs if (auth == WIFI_AUTH_WPA2_ENTERPRISE) { // CA Certificate is not mandatory From 08cbc20875a01684ad00e322465bdae347aad8d6 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Wed, 22 Sep 2021 17:50:02 +0200 Subject: [PATCH 35/37] update pybytes 1.7.0 975e984 --- esp32/frozen/Pybytes/_OTA.py | 6 +- esp32/frozen/Pybytes/_flash_control_OTA.py | 26 +++++--- esp32/frozen/Pybytes/_main_pybytes.py | 2 +- esp32/frozen/Pybytes/_msg_handl.py | 6 +- esp32/frozen/Pybytes/_pybytes.py | 65 ++++++++++++++++-- esp32/frozen/Pybytes/_pybytes_connection.py | 5 +- esp32/frozen/Pybytes/_pybytes_constants.py | 3 + esp32/frozen/Pybytes/_pybytes_debug.py | 8 ++- esp32/frozen/Pybytes/_pybytes_library.py | 3 + esp32/frozen/Pybytes/_pybytes_protocol.py | 74 ++++++++++++++++++++- esp32/frozen/Pybytes/_pybytes_pyconfig.py | 44 ++++++++++++ esp32/pycom_version.h | 2 +- 12 files changed, 218 insertions(+), 26 deletions(-) create mode 100644 esp32/frozen/Pybytes/_pybytes_pyconfig.py diff --git a/esp32/frozen/Pybytes/_OTA.py b/esp32/frozen/Pybytes/_OTA.py index a1391035c3..5aa7add464 100644 --- a/esp32/frozen/Pybytes/_OTA.py +++ b/esp32/frozen/Pybytes/_OTA.py @@ -63,10 +63,12 @@ def get_update_manifest(self, fwtype=None, token=None): wmac = hexlify(machine.unique_id()).decode('ascii') if fwtype == 'pymesh': request_template = "manifest.json?current_ver={}&sysname={}&token={}&ota_slot={}&wmac={}&fwtype={}¤t_fwtype={}" - req = request_template.format(current_version, sysname, token, hex(pycom.ota_slot()), wmac.upper(), fwtype, 'pymesh' if hasattr(os.uname(),'pymesh') else 'pybytes') + current_fwtype = 'pymesh' if hasattr(os.uname(), 'pymesh') else 'pybytes' + req = request_template.format(current_version, sysname, token, hex(pycom.ota_slot()), wmac.upper(), fwtype, current_fwtype) elif fwtype == 'pygate': request_template = "manifest.json?current_ver={}&sysname={}&ota_slot={}&wmac={}&fwtype={}¤t_fwtype={}" - req = request_template.format(current_version, sysname, hex(pycom.ota_slot()), wmac.upper(), fwtype, 'pygate' if hasattr(os.uname(),'pygate') else 'pybytes') + current_fwtype = 'pygate' if hasattr(os.uname(), 'pygate') else 'pybytes' + req = request_template.format(current_version, sysname, hex(pycom.ota_slot()), wmac.upper(), fwtype, current_fwtype) else: request_template = "manifest.json?current_ver={}&sysname={}&wmac={}&ota_slot={}" req = request_template.format(current_version, sysname, wmac, hex(pycom.ota_slot())) diff --git a/esp32/frozen/Pybytes/_flash_control_OTA.py b/esp32/frozen/Pybytes/_flash_control_OTA.py index 22b195112f..f17186129a 100644 --- a/esp32/frozen/Pybytes/_flash_control_OTA.py +++ b/esp32/frozen/Pybytes/_flash_control_OTA.py @@ -17,10 +17,20 @@ class FCOTA: def __init__(self): pass + def is_folder(self, name): + try: + os.listdir(name) + return True + except: + return False + + def is_file(self, name): + return not self.is_folder(name) + def update_file_content(self, path, newContent): print_debug(2, 'Updating file [{}]'.format(path)) - if '.' in path: + if self.is_file(path): listfDir = path.split('/') currentPath = '/' for value in listfDir: @@ -34,7 +44,7 @@ def update_file_content(self, path, newContent): # check if dir exists if value not in parentList: # create dir - if '.' in currentPath: + if self.is_file(currentPath): continue os.mkdir(currentPath) @@ -52,7 +62,7 @@ def update_file_content(self, path, newContent): def delete_file(self, path): print_debug(2, 'FCOTA deleting file [{}]'.format(path)) try: - if ('.' in path): + if self.is_file(path): os.remove(path) else: targetedFiles = [] @@ -67,7 +77,7 @@ def delete_file(self, path): while maxDepth >= 0: for elem in targetedFiles: if elem.count('/') == maxDepth: - if '.' in elem: + if self.is_file(elem): os.remove(elem) else: os.rmdir(elem) @@ -87,7 +97,7 @@ def convert_bytes(self, num): def get_file_size(self, path): print_debug(2, 'FCOTA getting file infos [{}]'.format(path)) - if '.' in path: + if self.is_file(path): fileInfo = os.stat(path) print_debug(2, 'printing fileInfo tupple: ' + str(fileInfo)) return self.convert_bytes(fileInfo[6]) @@ -96,7 +106,7 @@ def get_file_size(self, path): def get_file_content(self, path): print_debug(2, 'FCOTA reading file [{}]'.format(path)) - if '.' in path: + if self.is_file(path): f = open(path, 'r') content = f.read() f.close() @@ -113,7 +123,7 @@ def get_flash_hierarchy(self): hierarchy = os.listdir() folders = [] for elem in hierarchy: - if '.' not in elem: + if self.is_folder(elem): folders.append(elem) while len(folders) > 0: @@ -130,7 +140,7 @@ def get_flash_hierarchy(self): path = folders[i] + '/' + subFolders[j] hierarchy.append(path) - if '.' not in path: + if self.is_folder(path): foldersToCheck.append(path) j += 1 diff --git a/esp32/frozen/Pybytes/_main_pybytes.py b/esp32/frozen/Pybytes/_main_pybytes.py index f89ab25054..5b1e2a6e6d 100644 --- a/esp32/frozen/Pybytes/_main_pybytes.py +++ b/esp32/frozen/Pybytes/_main_pybytes.py @@ -96,4 +96,4 @@ # def custom_print(params): # print("Custom method called") # return [255, 20] - # pybytes.add_custom_method(0, custom_print) + # pybytes.add_custom_method(0, custom_print) \ No newline at end of file diff --git a/esp32/frozen/Pybytes/_msg_handl.py b/esp32/frozen/Pybytes/_msg_handl.py index a1b200587d..adc2e62919 100644 --- a/esp32/frozen/Pybytes/_msg_handl.py +++ b/esp32/frozen/Pybytes/_msg_handl.py @@ -31,6 +31,7 @@ def __init__( receive_timeout=3000, reconnectMethod=None ): + print_debug(5, 'starting new MsgHandler') self._host = "" self._port = -1 self._sock = None @@ -152,7 +153,8 @@ def _receive_packet(self): try: self._sock.setblocking(False) msg_type = self._sock.recv(1) - except socket.error: + except socket.error as err: + print_debug(2, '_receive_packet() socket error: {}'.format(err)) self.disconnect() self.reconnectMethod() return False @@ -213,7 +215,7 @@ def _send_packet(self, packet): else: print_debug(2, 'Packet sent. (Length: %d)' % written) except socket.error as err: - print_debug(2, 'Socket send error {0}'.format(err)) + print_debug(2, '_send_packet() socket error {0}'.format(err)) return False return True if len(packet) == written else False diff --git a/esp32/frozen/Pybytes/_pybytes.py b/esp32/frozen/Pybytes/_pybytes.py index 4251baa2c6..e7a68d377b 100644 --- a/esp32/frozen/Pybytes/_pybytes.py +++ b/esp32/frozen/Pybytes/_pybytes.py @@ -11,9 +11,10 @@ import time import pycom import sys +import gc from network import WLAN from binascii import hexlify, a2b_base64 -from machine import Timer, deepsleep, pin_sleep_wakeup, unique_id +from machine import Timer, deepsleep, pin_sleep_wakeup, unique_id, pygate_init, RTC, pygate_debug_level, reset try: from periodical_pin import PeriodicalPin @@ -21,9 +22,9 @@ from _periodical_pin import PeriodicalPin try: - from pybytes_debug import print_debug + from pybytes_debug import print_debug, DEBUG except: - from _pybytes_debug import print_debug + from _pybytes_debug import print_debug, DEBUG try: from pybytes_config_reader import PybytesConfigReader @@ -36,7 +37,7 @@ class Pybytes: WAKEUP_ALL_LOW = const(0) # noqa: F821 WAKEUP_ANY_HIGH = const(1) # noqa: F821 - def __init__(self, config, activation=False, autoconnect=False): + def __init__(self, config, activation=False, autoconnect=False, user_callback=None): self.__frozen = globals().get('__name__') == '_pybytes' self.__activation = activation self.__custom_message_callback = None @@ -45,11 +46,15 @@ def __init__(self, config, activation=False, autoconnect=False): self.__smart_config = False self.__conf = {} self.__pymesh = None + self.__user_callback = user_callback if not self.__activation: self.__conf = config self.__conf_reader = PybytesConfigReader(config) pycom.wifi_on_boot(False, True) + if pycom.lte_modem_en_on_boot(): + pycom.lte_modem_en_on_boot(False) + reset() self.__check_dump_ca() self.__create_pybytes_connection(self.__conf) @@ -66,7 +71,7 @@ def __create_pybytes_connection(self, conf): except: from _pybytes_connection import PybytesConnection - self.__pybytes_connection = PybytesConnection(conf, self.__recv_message) + self.__pybytes_connection = PybytesConnection(conf, self.__recv_message, user_callback=self.__user_callback) def __check_config(self): try: @@ -155,9 +160,9 @@ def send_node_signal(self, signal_number, value, token): topic = 'br/{}'.format(token) self.__pybytes_connection.__pybytes_protocol.send_pybytes_custom_method_values(signal_number, [value], topic) - def send_signal(self, signal_number, value): + def send_signal(self, signal_number, value, nomesh=False): self.__check_init() - if self.__pymesh: + if self.__pymesh and not nomesh: self.__pymesh.unpack_pymesh_message(signal_number, value) else: self.__pybytes_connection.__pybytes_protocol.send_pybytes_custom_method_values(signal_number, [value]) @@ -280,11 +285,51 @@ def connect(self): from _pybytes_pymesh_config import PybytesPymeshConfig self.__pymesh = PybytesPymeshConfig(self) self.__pymesh.pymesh_init() + elif hasattr(os.uname(), 'pygate') and self.get_config('gateway'): + # PYGATE FIRMWARE VERSION + buf = None + try: + with open('/flash/pybytes_pygate_config.json','r') as fp: + buf = fp.read() + except Exception as e: + print_debug(5, e) + print('pybytes_pygate_config.json file is missing or has wrong format') + return + + try: + print('Syncing RTC via ntp...', end='') + rtc = RTC() + if not rtc.synced(): + rtc.ntp_sync(server="pool.ntp.org") + to_s = 20 + while not rtc.synced() and to_s > 0: + print('.', end='') + time.sleep(1) + to_s -= 1 + if not rtc.synced(): + print('RTC sync failed. Gateway will not work') + return + print(" RTC synced") + + except Exception as e: + print_debug(5, e) + print('RTC sync failed. Gateway will not work') + return + + try: + gc.collect() + if not DEBUG: + pygate_debug_level(0) + pygate_init(buf) + except Exception as e: + print('Pygate failed to start', e) + return else: print('ERROR! Could not connect to Pybytes!') except Exception as ex: print("Unable to connect to Pybytes: {}".format(ex)) + sys.print_exception(ex) def write_config(self, file='/flash/pybytes_config.json', silent=False): try: @@ -428,6 +473,12 @@ def deepsleep(self, ms, pins=None, mode=None, enable_pull=None): self.disconnect() deepsleep(ms) + def message_queue_len(self): + try: + return len(pybytes.__pybytes_connection.__connection.__mqtt._msgHandler._output_queue) + except: + return None + def dump_ca(self, ca_file='/flash/cert/pycom-ca.pem'): try: from _pybytes_ca import PYBYTES_CA diff --git a/esp32/frozen/Pybytes/_pybytes_connection.py b/esp32/frozen/Pybytes/_pybytes_connection.py index 6ddc2d68c4..f6bed21d0e 100644 --- a/esp32/frozen/Pybytes/_pybytes_connection.py +++ b/esp32/frozen/Pybytes/_pybytes_connection.py @@ -46,7 +46,7 @@ class PybytesConnection: - def __init__(self, config, message_callback): + def __init__(self, config, message_callback, user_callback=None): if config is not None: self.__conf = config self.__conf_reader = PybytesConfigReader(config) @@ -61,7 +61,8 @@ def __init__(self, config, message_callback): self.__mqtt_download_topic = "d" + self.__device_id self.__mqtt_upload_topic = "u" + self.__device_id self.__pybytes_protocol = PybytesProtocol( - config, message_callback, pybytes_connection=self + config, message_callback, pybytes_connection=self, + user_callback=user_callback ) self.__connection = None self.__connection_status = constants.__CONNECTION_STATUS_DISCONNECTED diff --git a/esp32/frozen/Pybytes/_pybytes_constants.py b/esp32/frozen/Pybytes/_pybytes_constants.py index 8ae4058530..b43761aced 100644 --- a/esp32/frozen/Pybytes/_pybytes_constants.py +++ b/esp32/frozen/Pybytes/_pybytes_constants.py @@ -75,6 +75,7 @@ class constants: __TYPE_PYMESH = 0x0D __TYPE_PYBYTES = 0x0E __TYPE_ML = 0x0F + __TYPE_USER = 0x08 __PYBYTES_PROTOCOL = ">B%ds" __PYBYTES_PROTOCOL_PING = ">B" __PYBYTES_INTERNAL_PROTOCOL = ">BBH" @@ -100,6 +101,8 @@ class constants: __FCOTA_PING = 0x03 __FCOTA_COMMAND_FILE_DELETE = 0x04 __FCOTA_COMMAND_FILE_UPDATE_NO_RESET = 0x05 + __FCOTA_COMMAND_GATEWAY_DEPLOY = 0x06 + __FCOTA_COMMAND_TOGGLE_GATEWAY = 0x07 __DEVICE_TYPE_WIPY = 0x00 __DEVICE_TYPE_LOPY = 0x01 diff --git a/esp32/frozen/Pybytes/_pybytes_debug.py b/esp32/frozen/Pybytes/_pybytes_debug.py index a8be1ddbaf..5b2a5540a5 100644 --- a/esp32/frozen/Pybytes/_pybytes_debug.py +++ b/esp32/frozen/Pybytes/_pybytes_debug.py @@ -8,6 +8,8 @@ import os import pycom # pylint: disable=import-error +import _thread +import time from machine import RTC from time import timezone @@ -22,7 +24,11 @@ def print_debug(level, msg): """Print log messages into console.""" if DEBUG is not None and level <= DEBUG: - print(msg) + print("[{:15.3f}] [{:10d}] {}".format( + time.ticks_ms() / 1000, + _thread.get_ident(), + msg + )) def print_debug_local(level, msg): diff --git a/esp32/frozen/Pybytes/_pybytes_library.py b/esp32/frozen/Pybytes/_pybytes_library.py index 78ee000abc..079b41b4ad 100644 --- a/esp32/frozen/Pybytes/_pybytes_library.py +++ b/esp32/frozen/Pybytes/_pybytes_library.py @@ -94,10 +94,13 @@ def pack_info_message(self, releaseVersion=None): if hasattr(os.uname(), 'pymesh'): body.append(constants.__FWTYPE_PYMESH) + print_debug(4, "pymesh") elif hasattr(os.uname(), 'pygate'): body.append(constants.__FWTYPE_PYGATE) + print_debug(4, "pygate") else: body.append(constants.__FWTYPE_DEFAULT) + print_debug(4, "pybytes") return self.__pack_message(constants.__TYPE_INFO, body) diff --git a/esp32/frozen/Pybytes/_pybytes_protocol.py b/esp32/frozen/Pybytes/_pybytes_protocol.py index f7d1ba41ed..f5b38fb2de 100644 --- a/esp32/frozen/Pybytes/_pybytes_protocol.py +++ b/esp32/frozen/Pybytes/_pybytes_protocol.py @@ -50,6 +50,12 @@ from pybytes_debug import print_debug except: from _pybytes_debug import print_debug + +try: + from pybytes_pyconfig import Pyconfig +except: + from _pybytes_pyconfig import Pyconfig + try: import urequest except: @@ -64,6 +70,7 @@ from network import Coap import os +import sys import _thread import time import struct @@ -73,7 +80,7 @@ class PybytesProtocol: - def __init__(self, config, message_callback, pybytes_connection): + def __init__(self, config, message_callback, pybytes_connection, user_callback=None): self.__conf = config self.__conf_reader = PybytesConfigReader(config) self.__thread_stack_size = 8192 @@ -84,6 +91,7 @@ def __init__(self, config, message_callback, pybytes_connection): self.__pybytes_library = PybytesLibrary( pybytes_connection=pybytes_connection, pybytes_protocol=self) self.__user_message_callback = message_callback + self.__user_callback = user_callback self.__pins = {} self.__pin_modes = {} self.__custom_methods = {} @@ -150,19 +158,28 @@ def __check_lora_messages(self): def __process_recv_message(self, message): print_debug(5, "This is PybytesProtocol.__process_recv_message()") - if message.payload: network_type, message_type, body = self.__pybytes_library.unpack_message(message.payload) + print_debug(99,'Message: network_type={}, message_type={}, body={}'.format(network_type, message_type, body)) else: # for lora messages network_type, message_type, body = self.__pybytes_library.unpack_message(message) + print_debug(99,'Message: network_type={}, message_type={}, body={}'.format(network_type, message_type, body)) if self.__user_message_callback is not None: + if (message_type == constants.__TYPE_PING): self.send_ping_message() elif message_type == constants.__TYPE_PONG and self.__conf.get('connection_watchdog', True): self.__pybytes_connection.__wifi_lte_watchdog.feed() + print_debug(5, 'message type is PONG, feed watchdog') + + elif (message_type == constants.__TYPE_USER and self.__user_callback is not None): + try: + self.__user_callback(body) + except Exception as ex: + sys.print_exception(ex) elif (message_type == constants.__TYPE_INFO): self.send_info_message() @@ -314,6 +331,21 @@ def __process_recv_message(self, message): else: self.send_fcota_ping('deletion failed!') + elif (command == constants.__FCOTA_COMMAND_GATEWAY_DEPLOY): + self.deploy_gateway() + + elif (command == constants.__FCOTA_COMMAND_TOGGLE_GATEWAY): + bodyString = body[1:len(body)].decode() + try: + self.toggleGateway( + True if bodyString == 'true' else False + ) + machine.reset() + except Exception as ex: + print( + 'error toggleGateway({}):{}'.format(bodyString, ex) + ) + else: print_debug(2, "Unknown FCOTA command received") @@ -836,3 +868,41 @@ def deploy_new_release(self, body): self.update_network_config(letResp) self.update_firmware(letResp, applicationID, fw_type=fwtype) machine.reset() + + def deploy_gateway(self): + print_debug(0, 'deploying gateway...') + pyconfig_url = '{}://{}'.format( + constants.__DEFAULT_PYCONFIG_PROTOCOL, + constants.__DEFAULT_PYCONFIG_DOMAIN + ) + device_id = self.__conf['device_id'] + pyconfig = Pyconfig(pyconfig_url, device_id) + pygate_configurations = pyconfig.get_gateway_config() + + print_debug(5, pygate_configurations) + + json_pygate_string = ujson.dumps(pygate_configurations) + self.__FCOTA.update_file_content( + '/flash/pybytes_pygate_config.json', + json_pygate_string + ) + self.toggleGateway(True) + + if not hasattr(os.uname(), 'pygate'): + print_debug(0, 'OTA deploy Pygate Firmware') + ota = WiFiOTA( + self.__conf['wifi']['ssid'], + self.__conf['wifi']['password'], + self.__conf['ota_server']['domain'], + self.__conf['ota_server']['port'] + ) + ota.update(fwtype='pygate', token=device_id) + machine.reset() + + def toggleGateway(self, value): + self.__conf['gateway'] = value + json_string = ujson.dumps(self.__conf) + self.__FCOTA.update_file_content( + '/flash/pybytes_config.json', + json_string + ) diff --git a/esp32/frozen/Pybytes/_pybytes_pyconfig.py b/esp32/frozen/Pybytes/_pybytes_pyconfig.py new file mode 100644 index 0000000000..fa41bb9189 --- /dev/null +++ b/esp32/frozen/Pybytes/_pybytes_pyconfig.py @@ -0,0 +1,44 @@ +''' +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 +''' +try: + from pybytes_debug import print_debug +except: + from _pybytes_debug import print_debug + +try: + import urequest +except: + import _urequest as urequest + + +class Pyconfig: + """ + A class used to represent communication with pybytes + all pybytes communication should happen with one rest api + called pyconfig microServices + + + """ + + def __init__(self, url, device_id): + self.base_url = url + self.device_id = device_id + + def get_gateway_config(self): + target_url = '{}/device/gateway/{}'.format(self.base_url, self.device_id) + headers = { + 'content-type': 'application/json' + } + try: + request = urequest.get(target_url, headers=headers) + configurations = request.json() + request.close() + print_debug(6, "Response Details: {}".format(configurations)) + return configurations + except Exception as ex: + print_debug(1, "error while calling {}!: {}".format(target_url, ex)) diff --git a/esp32/pycom_version.h b/esp32/pycom_version.h index 3a24ceee49..1da23ca018 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.6.1" +#define PYBYTES_VERSION_NUMBER "1.7.0" #endif #ifdef PYGATE_ENABLED From 04a44542a4bf7a9518c8cd618fdad3aac38291a5 Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Wed, 22 Sep 2021 18:16:07 +0200 Subject: [PATCH 36/37] bump version to 1.20.2.r5 --- 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 1da23ca018..522627798c 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.r4" +#define SW_VERSION_NUMBER "1.20.2.r5" #define LORAWAN_VERSION_NUMBER "1.0.2" From e932a949cc2ed9023efc400c4807a725d905d76c Mon Sep 17 00:00:00 2001 From: Peter Putz Date: Tue, 5 Oct 2021 17:29:39 +0200 Subject: [PATCH 37/37] lora: Fix losing of multicast params we're allocating MulticastParams_t inside garbage collected memory, then pass it into the C-level implementation. It seems the garbage collector cannot keep track of the usage this way, so eventually recycles the memory. At that point we lose the multicast addresses and when we check it in LoraMac.c: 842 case FRAME_TYPE_DATA_CONFIRMED_DOWN: case FRAME_TYPE_DATA_UNCONFIRMED_DOWN: and further we end up dereferencing those pointers still and then it's a bit random whether we core dump due to illegal memory address, or simply ignore the lora packets and become "deaf" to them --- esp32/mods/modlora.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/esp32/mods/modlora.c b/esp32/mods/modlora.c index 9a7f58150b..dc0d069b9c 100644 --- a/esp32/mods/modlora.c +++ b/esp32/mods/modlora.c @@ -1993,26 +1993,28 @@ STATIC mp_obj_t lora_join_multicast_group (mp_uint_t n_args, const mp_obj_t *pos { MP_QSTR_mcNwkKey, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_mcAppKey, MP_ARG_REQUIRED | 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); - + mp_buffer_info_t bufinfo_0, bufinfo_1; mp_get_buffer_raise(args[1].u_obj, &bufinfo_0, MP_BUFFER_READ); mp_get_buffer_raise(args[2].u_obj, &bufinfo_1, MP_BUFFER_READ); - - MulticastParams_t *channelParam = m_new_obj(MulticastParams_t); + + MulticastParams_t *channelParam = heap_caps_malloc(sizeof(MulticastParams_t), MALLOC_CAP_SPIRAM); channelParam->Next = NULL; channelParam->DownLinkCounter = 0; channelParam->Address = args[0].u_int; memcpy(channelParam->NwkSKey, bufinfo_0.buf, sizeof(channelParam->NwkSKey)); memcpy(channelParam->AppSKey, bufinfo_1.buf, sizeof(channelParam->AppSKey)); - + if (LoRaMacMulticastChannelLink(channelParam) == LORAMAC_STATUS_OK) { return mp_const_true; } - + + // adding to the list failed, so free the memory again + free(channelParam); return mp_const_false; } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(lora_join_multicast_group_obj, 0, lora_join_multicast_group); @@ -2021,7 +2023,7 @@ STATIC mp_obj_t lora_leave_multicast_group (mp_obj_t self_in, mp_obj_t multicast uint32_t mcAddr = mp_obj_get_int(multicast_addr_obj); MulticastParams_t *channelParam = LoRaMacMulticastGetChannel(mcAddr); if (LoRaMacMulticastChannelUnlink(channelParam) == LORAMAC_STATUS_OK) { - m_del_obj(MulticastParams_t, channelParam); + free(channelParam); return mp_const_true; } return mp_const_false;