<?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[socket.getaddrinfo returns error]]></title><description><![CDATA[<pre><code>from network import LTE
import time
import usocket

lte = LTE()
lte.init()
#some carriers have special requirements, check print(lte.send_at_cmd(&quot;AT+SQNCTM=?&quot;)) to see if your carrier is listed.
#when using verizon, use 
#lte.init(carrier=verizon)
#when usint AT&amp;T use, 
#lte.init(carrier=at&amp;t)

#some carriers do not require an APN
#also, check the band settings with your carrier
lte.attach(band=20, apn=&quot;nbiot&quot;) 
print(&quot;attaching..&quot;,end='')
while not lte.isattached():
    time.sleep(0.25)

    print('.',end='')
    print(lte.send_at_cmd('AT!=&quot;fsm&quot;')) 
    print(lte.send_at_cmd('AT+CSQ'))         # get the System FSM
print(&quot;attached!&quot;)

lte.connect()
print(&quot;connecting [##&quot;,end='')
while not lte.isconnected():
    time.sleep(0.25)
    print('#',end='')
    #print(lte.send_at_cmd('AT!=&quot;showphy&quot;'))
    print(lte.send_at_cmd('AT!=&quot;fsm&quot;'))
print(&quot;] connected!&quot;)
print(usocket.getaddrinfo('google.com', 80))  
lte.deinit()
</code></pre>
<p dir="auto">I can connect to lte. but then this print (usocket.getaddrinfo ('<a href="http://google.com" target="_blank" rel="noopener noreferrer nofollow">google.com</a>', 80)) fails on the line. The error is as follows.</p>
<p dir="auto"><img src="/assets/uploads/files/1597663611194-whatsapp-image-2020-08-17-at-14.14.41.jpeg" alt="WhatsApp Image 2020-08-17 at 14.14.41.jpeg" class="img-responsive img-markdown" /></p>
<p dir="auto">Anyone can help me</p>
]]></description><link>https://forum.pycom.io/topic/6258/socket-getaddrinfo-returns-error</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 10:42:42 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/6258.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Aug 2020 11:27:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to socket.getaddrinfo returns error on Mon, 17 Aug 2020 11:27:11 GMT]]></title><description><![CDATA[<pre><code>from network import LTE
import time
import usocket

lte = LTE()
lte.init()
#some carriers have special requirements, check print(lte.send_at_cmd(&quot;AT+SQNCTM=?&quot;)) to see if your carrier is listed.
#when using verizon, use 
#lte.init(carrier=verizon)
#when usint AT&amp;T use, 
#lte.init(carrier=at&amp;t)

#some carriers do not require an APN
#also, check the band settings with your carrier
lte.attach(band=20, apn=&quot;nbiot&quot;) 
print(&quot;attaching..&quot;,end='')
while not lte.isattached():
    time.sleep(0.25)

    print('.',end='')
    print(lte.send_at_cmd('AT!=&quot;fsm&quot;')) 
    print(lte.send_at_cmd('AT+CSQ'))         # get the System FSM
print(&quot;attached!&quot;)

lte.connect()
print(&quot;connecting [##&quot;,end='')
while not lte.isconnected():
    time.sleep(0.25)
    print('#',end='')
    #print(lte.send_at_cmd('AT!=&quot;showphy&quot;'))
    print(lte.send_at_cmd('AT!=&quot;fsm&quot;'))
print(&quot;] connected!&quot;)
print(usocket.getaddrinfo('google.com', 80))  
lte.deinit()
</code></pre>
<p dir="auto">I can connect to lte. but then this print (usocket.getaddrinfo ('<a href="http://google.com" target="_blank" rel="noopener noreferrer nofollow">google.com</a>', 80)) fails on the line. The error is as follows.</p>
<p dir="auto"><img src="/assets/uploads/files/1597663611194-whatsapp-image-2020-08-17-at-14.14.41.jpeg" alt="WhatsApp Image 2020-08-17 at 14.14.41.jpeg" class="img-responsive img-markdown" /></p>
<p dir="auto">Anyone can help me</p>
]]></description><link>https://forum.pycom.io/post/34006</link><guid isPermaLink="true">https://forum.pycom.io/post/34006</guid><dc:creator><![CDATA[AlganEren]]></dc:creator><pubDate>Mon, 17 Aug 2020 11:27:11 GMT</pubDate></item><item><title><![CDATA[Reply to socket.getaddrinfo returns error on Mon, 17 Aug 2020 12:39:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/6387">@AlganEren</a> What SIM are you using? If you are using a Pycom-provided Vodafone SIM, see <a href="https://forum.pycom.io/topic/6064/oserror-errno-202-eai_fail-when-connected-to-nb-iot-vodafone-germany/2">https://forum.pycom.io/topic/6064/oserror-errno-202-eai_fail-when-connected-to-nb-iot-vodafone-germany/2</a></p>
]]></description><link>https://forum.pycom.io/post/34010</link><guid isPermaLink="true">https://forum.pycom.io/post/34010</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Mon, 17 Aug 2020 12:39:28 GMT</pubDate></item><item><title><![CDATA[Reply to socket.getaddrinfo returns error on Tue, 18 Aug 2020 11:29:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1538">@jcaron</a> ı am from Turkey and using turkcell nb-ıot sim card. Is it a problem?<br />
Thanks for reply!</p>
]]></description><link>https://forum.pycom.io/post/34020</link><guid isPermaLink="true">https://forum.pycom.io/post/34020</guid><dc:creator><![CDATA[AlganEren]]></dc:creator><pubDate>Tue, 18 Aug 2020 11:29:02 GMT</pubDate></item><item><title><![CDATA[Reply to socket.getaddrinfo returns error on Tue, 18 Aug 2020 11:44:18 GMT]]></title><description><![CDATA[<p dir="auto">The function should work as expected and return the address info.. EAI (Error Address Info) fail usually means the DNS could not be resolved. Im not sure of the internet limitations provided by your carrier, but have you tried other addresses?</p>
]]></description><link>https://forum.pycom.io/post/34021</link><guid isPermaLink="true">https://forum.pycom.io/post/34021</guid><dc:creator><![CDATA[Gijs]]></dc:creator><pubDate>Tue, 18 Aug 2020 11:44:18 GMT</pubDate></item><item><title><![CDATA[Reply to socket.getaddrinfo returns error on Wed, 19 Aug 2020 12:57:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/6387">@AlganEren</a> Note that some providers do not send DNS server info during the connection process (so you have to configure them manually), and that older versions of the firmware had issues with DNS over NB-IoT, apparently.</p>
<p dir="auto">You may want to check this thread:<br />
<a href="https://forum.pycom.io/topic/4247/dns-now-working-a-list-documentation-of-all-lte-nb1-nb-iot-lte-m-lte-catm1-operators-around-the-world">https://forum.pycom.io/topic/4247/dns-now-working-a-list-documentation-of-all-lte-nb1-nb-iot-lte-m-lte-catm1-operators-around-the-world</a></p>
]]></description><link>https://forum.pycom.io/post/34028</link><guid isPermaLink="true">https://forum.pycom.io/post/34028</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Wed, 19 Aug 2020 12:57:55 GMT</pubDate></item></channel></rss>