STM32F4 ==> LwIP_DNS
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-07-18 2: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
- MX_LWIP_Init()
- dns_init()
- get the ip addresss use ""dns_gethostbyname()""
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.
Labels:
- Labels:
-
Ethernet
-
STM32F4 Series
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
