MCU: TM4C1294NCPDT
TI-RTOS: v2.01.00.03
NDK: v2.23.01.01
CCS: v6.0.1.0040
-
Hi,
Following the post , I am using the following code in a task to get the IP address of "www.google.com" but the function "DNSGetHostByName()" returns 19 (NO DNS REPLY). Is there any solution to the issue?
-
System_printf("CfgGetImmediate(DNS) = %d\r\n", CfgGetImmediate( 0, CFGTAG_SYSINFO, CFGITEM_DHCP_DOMAINNAMESERVER, 1, 4, (UINT8 *)&IPTmp ));
System_printf("DNS IP = %d.%d.%d.%d\r\n", (UINT8)(IPTmp)&0xFF, (UINT8)(IPTmp>>8)&0xFF, (UINT8)(IPTmp>>16)&0xFF, (UINT8)(IPTmp>>24)&0xFF);
Task_sleep(5000);
System_printf("DNSGetHostByName = %d\r\n", DNSGetHostByName("www.google.com", &host, sizeof(host)));
-
The code above shows the DNS set to "208.67.222.222", but still the function "DNSGetHostByName()" fails to resolve the host.
-
Thanks
-
Regards
Soumyajit