From ddec8b1143bea43b40f4d6f41d203fceeb39faa5 Mon Sep 17 00:00:00 2001 From: Nikolaos Ftylitakis Date: Mon, 12 Jun 2023 19:42:14 +0300 Subject: [PATCH] increase timeouts when querying for http download through AT commands --- insighioNode/apps/demo_console/ota.py | 6 +++--- insighioNode/lib/networking/modem/modem_bg600.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/insighioNode/apps/demo_console/ota.py b/insighioNode/apps/demo_console/ota.py index 377fc10..0efb619 100644 --- a/insighioNode/apps/demo_console/ota.py +++ b/insighioNode/apps/demo_console/ota.py @@ -187,7 +187,7 @@ def downloadDeviceConfigurationHTTP(client): ) if client.modem_based: file = "tmpconfig" - file_downloaded = client.modem_instance.http_get_with_auth_header(URL_base, URL_PATH + "?" + URL_QUERY_PARAMS, protocol_config.thing_token, file) + file_downloaded = client.modem_instance.http_get_with_auth_header(URL_base, URL_PATH + "?" + URL_QUERY_PARAMS, protocol_config.thing_token, file, 120000) if file_downloaded: local_file_name = device_info.get_device_root_folder() + file is_file_locally = client.modem_instance.get_file(file, local_file_name) @@ -242,8 +242,8 @@ def downloadOTA(client, fileId, fileType, fileSize): # TODO: fix support of redirections protocol_config = cfg.get_protocol_config() URL = 'https://{}/mf-rproxy/packages/download?fuid={}&did={}&dk={}&cid={}'.format( - # cfg.protocol_config.server_ip, - "console.insigh.io", + cfg.protocol_config.server_ip, + #"console.insigh.io", fileId, protocol_config.thing_id, protocol_config.thing_token, diff --git a/insighioNode/lib/networking/modem/modem_bg600.py b/insighioNode/lib/networking/modem/modem_bg600.py index 64ba240..f538ad4 100644 --- a/insighioNode/lib/networking/modem/modem_bg600.py +++ b/insighioNode/lib/networking/modem/modem_bg600.py @@ -465,7 +465,7 @@ def http_get_with_auth_header(self, url_base, url_request_route, auth_token, des if not url_setup: return None - (url_req_ready, _) = self.send_at_cmd('AT+QHTTPGET=80,' + str(len(requestHeader)), 8000, "CONNECT") + (url_req_ready, _) = self.send_at_cmd('AT+QHTTPGET=80,' + str(len(requestHeader)), 90000, "CONNECT") if not url_req_ready: return None