Full domain name required for getaddrinfo?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
sn81
Posts: 4
Joined: Thu Sep 05, 2019 1:39 pm

Full domain name required for getaddrinfo?

Post by sn81 » Thu Sep 05, 2019 1:50 pm

Hi,

I'm currently experimenting with some ESP8266 based boards.

The boards connect to my network and receive their addresses via dhcp, pointing the DNS to my local DNS server.

When I try to resolve some hostname within my network, e.g., "server.my.site" using getaddrinfo, I need to specify the full domain name of the host (in this example "server.my.site") to get its IP address. Using only the hostname "server" does not work. Is there some option I am missing?

Would it be possible to determine the domain name from the DNS server, so that I at least can append it automatically to my getaddrinfo request?

Thanks!
Stefan

smurf
Posts: 7
Joined: Wed Feb 27, 2019 11:25 am

Re: Full domain name required for getaddrinfo?

Post by smurf » Thu Sep 12, 2019 4:12 pm

The default domain is passed to you with DHCP. µPy doesn't seem to handle that. Open an issue …

Post Reply