<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[http requests do not resolve local dns]]></title><description><![CDATA[<p dir="auto">Using the http demo project on a M5 Core works fine,<br />
also querying my internet servers work fine.<br />
When trying to send http GET requests to my local servers, it works with the IP-adress only, not with the local dns as it works in the browser.<br />
So my question is, how does "urequests.request"  resolve the DNS to an IP to do the connection ?   It should use the DNS-server from the WiFi-Connection and not some internet facing server such as google or  1.1.1.1.</p>
<p dir="auto">Not all apllications use servers in the cloud! There are also local applications or in company networks !!</p>
<p dir="auto">I've seen the same issue using the  python function  socket.getaddrinfo<br />
this queries also an internet DNS server and not the local ones.</p>
<p dir="auto">Anybody knows a solution ?</p>
]]></description><link>https://community.m5stack.com/topic/4593/http-requests-do-not-resolve-local-dns</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Mar 2026 05:54:15 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4593.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Sep 2022 15:17:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to http requests do not resolve local dns on Wed, 07 Sep 2022 13:21:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a><br />
This looks very nice, I'll try it out.<br />
Thanks for your post !</p>
]]></description><link>https://community.m5stack.com/post/18568</link><guid isPermaLink="true">https://community.m5stack.com/post/18568</guid><dc:creator><![CDATA[sgu]]></dc:creator><pubDate>Wed, 07 Sep 2022 13:21:36 GMT</pubDate></item><item><title><![CDATA[Reply to http requests do not resolve local dns on Wed, 07 Sep 2022 05:21:15 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1662527924405-screenshot-2022-09-07-at-06.18.13-resized.png" alt="0_1662527911433_Screenshot 2022-09-07 at 06.18.13.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The following code snippet has been working fine for me and uses a local DNS aka the router.</p>
<p dir="auto">The reason that</p>
<pre><code>label1.setText(str(wlan.ifconfig()))
</code></pre>
<p dir="auto">Is failing is because you haven't told the code to create a station and activate the interface as shown in my image.</p>
]]></description><link>https://community.m5stack.com/post/18561</link><guid isPermaLink="true">https://community.m5stack.com/post/18561</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 07 Sep 2022 05:21:15 GMT</pubDate></item><item><title><![CDATA[Reply to http requests do not resolve local dns on Tue, 06 Sep 2022 19:58:36 GMT]]></title><description><![CDATA[<p dir="auto">Thanks a lot for your test.<br />
My code also uses the wlan.ifconfig this way you can see the ipaddress, gateway and DNS.</p>
<p dir="auto">I've upgraded the M5 Core to latest Firmware V1.10.4 and I still can reproduce the error that it does not work with local DNS.<br />
Even if the M5 Core would use the firewall as the DNS server, this would work as well.</p>
<p dir="auto">Additionally found another bug:</p>
<p dir="auto">when using the Online Ui Flow  and adding the block for getting ifconfig  <img src="/assets/uploads/files/1662492115482-c2635e39-6ea4-46b9-8183-da8df125edec-image.png" alt="0_1662492113133_c2635e39-6ea4-46b9-8183-da8df125edec-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">then it creates a runtime error. The cause is:</p>
<p dir="auto">blockly adds text     "wlan.ifconfig"<br />
<img src="/assets/uploads/files/1662492209360-0ce61608-6624-48dd-a940-a1daddf22503-image.png" alt="0_1662492206969_0ce61608-6624-48dd-a940-a1daddf22503-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">but it must be    "wlan_sta.ifconfig"     and then it runs<br />
<img src="/assets/uploads/files/1662492324779-6774c2c6-3268-4eaa-bc96-e3109ce82096-image.png" alt="0_1662492322169_6774c2c6-3268-4eaa-bc96-e3109ce82096-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The same issue als on a M5 Core2   it does not show an error message, just the screen stay white  :-(<br />
what a poor software quality.</p>
]]></description><link>https://community.m5stack.com/post/18555</link><guid isPermaLink="true">https://community.m5stack.com/post/18555</guid><dc:creator><![CDATA[sgu]]></dc:creator><pubDate>Tue, 06 Sep 2022 19:58:36 GMT</pubDate></item><item><title><![CDATA[Reply to http requests do not resolve local dns on Tue, 06 Sep 2022 17:09:51 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/7797">@sgu</a></p>
<p dir="auto">I've just tried the provided HTTP example (UIFlow online) and in my case it is using the local DNS server IP address which it gets from the DHCP server. Have you checked your DHCP server settings?</p>
<p dir="auto">What do you get when you print <code>wlan.ifconfig()</code>. The last IP address is the DNS.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18554</link><guid isPermaLink="true">https://community.m5stack.com/post/18554</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 06 Sep 2022 17:09:51 GMT</pubDate></item></channel></rss>