return ERRCODE_FAIL;
}
- if (argc != 2) {
+ if (argc != 4) {
PRINT("CUSTOM_UTILSTEST ATCMD Set Parameter Failed argc %d\n",argc);
return ERRCODE_FAIL;
}
//通讯开始,唤醒cat1
uapi_cat1_wakeup_cat1(1);
- uint8_t *uri = (uint8_t*)argv[0];
- uint8_t *otadatapath = (uint8_t*)argv[1];
- PRINT("custom_start_ota_download %s to %s\r\n",uri,otadatapath);
+ uint8_t *server = (uint8_t*)argv[0];
+ uint8_t port = atoi((const char*)argv[1]);
+ uint8_t *uri = (uint8_t*)argv[2];
+ uint8_t *otadatapath = (uint8_t*)argv[3];
+ PRINT("custom_start_ota_download %s:%d %s to %s\r\n",server,port,uri,otadatapath);
httpc_connection_t settings = {0};
settings.result_fn=httpc_download_result;
settings.headers_done_fn=httpc_download_headers_done;
httpc_state_t* connection=NULL;
err_t rett = httpc_get_file_dns_to_disk(
- (const char*) "icfota.snicker.com.cn",
- 8089,
+ (const char*) server,
+ port,
(const char*) uri,
(const httpc_connection_t *)&settings,
NULL,