2019-07-18 02:54 AM
Hello sir,
I want to use DNS for my project, but it is not easy,
I need your help.
From now, I succeed to port IP address. but it is failed to use DNS.
I set the DNS on the STMC32CUBEMX and checked in the file <<Lwipopts.h>>
=================
Procedure
void dns_found(const char *name,ip_addr_t *addr,void *arg)
{
LWIP_UNUSED_ARG(arg);
printf(" dns \r\n");
printf("%s: %s\n", name, addr ? ip_ntoa(addr) : "<not found>");
}
void get_IP(void)
{
int test=dns_gethostbyname("www.freertos.com",&resolved,dns_found,NULL);
printf("error = %d \r\n",test);
}
=================
Finally, I received error = -6
How can I get the ip address to use above Domain Name?
Best regards,
Choi.