The DNS-function is working fine when calling service etc. My problem is when filling the structure needed for calling
system_upgrade_start(upServer)
upServer = (struct upgrade_server_info *)os_zalloc(sizeof(struct upgrade_server_info));
os_sprintf(upServer->pre_version, "v%d.%d", 1, 0);
os_sprintf(upServer->upgrade_version, "v%d.%d", 1, 1);
upServer->check_cb = ota_cb;
upServer->check_times = 60000;
upServer->port = OTASERVERPORT;
uint32_t otaip = ipaddr_addr(OTASERVERIP);
os_memcpy(upServer->ip, &otaip, 4);
upServer->url = (uint8 *) os_zalloc(512);
os_sprintf(upServer->url,"GET /v1/device/rom/?action=download_rom&version=%s&filename=user%d.bin HTTP/1.1\r\nHost: "IPSTR":%d\r\n\r\n",upServer->upgrade_version,user_bin_n,IP2STR(upServer->ip),upServer->port);
As you can see I can only set the IP-Address, where the binaries should be downloaded from.
I would like to enter a hostname and then let system_upgrade_start(upServer) do the DNS-lookup
Best regards
ThorvaldStatistics: Posted by Thorvald — Tue Mar 03, 2015 5:58 pm
]]>