Skip to content

Commit

Permalink
increase timeouts when querying for http download through AT commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ftylitak committed Jun 12, 2023
1 parent 3f9c795 commit ddec8b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions insighioNode/apps/demo_console/ota.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion insighioNode/lib/networking/modem/modem_bg600.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ddec8b1

Please sign in to comment.