Error while connecting pybytes with LTE
-
@Gijs said in Error while connecting pybytes with LTE:
Hello Gijs,
I've tried to connect with mqtt.pybytes.pycom.io in port 1883 and there is no problem if I use a wifi connection but I obtain the same OSError: [Errno 202] EAI_FAIL when I execute the same code with the LTE attached.
It seems as if the NB-IOT network is not allowing to connect to the internet.
Any other idea?. -
@Osquillar
Below the modem answer to AT+CGCONTRDP:
+CGCONTRDP: 1,5,"pycom.io.MNC028.MCC901.GPRS","10.200.1.108.255.255.255.255","","","","","" -
@Gijs Hello, the problem I've found is related to DNS, do you know how to handle it?.
If I use socket.getaddrinfo("google.com", 80)[0][-1]), I obtain the same OSError: [Errno 202] EAI_FAILThe same sofware tested with the wifi connection is working fine, so the problem is in the modem side and in the DNS.
Any idea? -
Hi,
Sorry for the slow reply. I have never actually used a Pycom simcard myself, so details might vary.The Pycom simcards are purposed to only connect using pycom services (pybytes mqtt), so the DNS request with google could indeed show as an EAI_FAIL error.
I checked last week with our services and the DNS to pybytes should work as expected. Next to that we have not received any other complaintes on this part. I still believe it is weird the Pybytes mqtt connection is not resolving correctly. Maybe @Xykon can help us out here?
Gijs
-
Hi,
Can you check for me the modem firmware using the following:import sqnsupgrade; sqnsupgrade.info()The modem firmware should start with LR6.xx for NB-IoT
Gijs
-
@Gijs Hi, the modem firmware is LR6.0.0.0-41019 so I think it is correct.
I still belive the problem is within vodafone side because the AT command to CGCONTRDP is not returning any DNS address. What do you think?+CGCONTRDP: 1,5,"pycom.io.MNC028.MCC901.GPRS","10.200.1.108.255.255.255.255","","","","",""
-
It indeed seems to be related to the DNS server not being set correctly by the Vodafone service. You can manually set the DNS server by using:
import socket; socket.dnsserver() #this should return empty socket.dnsserver('primary','secondary')My colleague @Xykon can tell you more about the DNS server IP address. It has to be specific to the pycom servers (so setting
8.8.8.8as the dns server should not work)Best,
Gijs -
Hi, I'm facing the same issue as @Osquillar. I use NB-IoT on my Fipy. The device sends messages correctly when I power it on, then all of a sudden it starts to have these problems: 202 eai_fail and 128 enotconn. After the first time it encounters this problem, it never recovers. This problem is triggered when calling the function pybytes.start or pybytes.connect.
So the problem is on the DNS server? Can we use 8.8.8.8 or do we need to use another one?
Thank you @Gijs for your constant help. -
I think your issue is different.
If you're able to send signals to pybytes a first, but get an eai_fail error later, it might be related to your network connection. It should not reset the DNS servers, as is the issue above (the LTE network does not provide a DNS server from the start there). Just to be sure, could you let me know whatsocket.dnsserver()gives you (before it fails and after it fails), and whatlte.send_at_cmd('AT+CGCONTRDP?')returns ? -
@Gijs Hi. The output of dnsserver after pybytes.start is ('172.31.16.100', '172.31.32.100'), while the output of AT+CGCONTRDP? is always ERROR. I tried to move the AT command in different parts of the code but the result was always ERROR. When the device fails I cannot retrieve any information, so I don't know what the dnsserver output is. I'm using your Vodafone SIM in Italy. Thank you
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login