Test DNS NB-IoT FiPy (v. 41019)
I'm looking for help for this mistake:
Do you have any ideas please?
Thank you in advance!
This post is deleted!
I still have an error that is EHOSTUNREACH yet google servers should be available? I use the Windows console with tracert google.com to know the IP address then I enter it in the socket.connect to avoid the EAI_FAIL bug of the getaddrinfo()...
If you have any ideas I'm listening, thank you :)
Maybe some progress? I have no error this time when I do ss.connect() but nevertheless it remains blocked at this step for more than an hour... Any idea, please?
Even with the last update of the pycom firmware I couldn't find a solution...
@oligauc @robert-hh I tried with your code I get the same errors as before. If I use getaddrinfo then it returns EAI_FAIL and if I put the IP address directly with the port then it returns ECONNABORTED :/
@Tgasser Please can you use secure sockets ? Most servers no long accept connections on port 80.
s = socket.socket() s = ssl.wrap_socket(s) s.connect(socket.getaddrinfo('www.google.com', 443)[-1]) s.send(b"GET / HTTP/1.0\r\n\r\n") print(s.recv(4096)) s.close()
robert-hh last edited by
@Tgasser This sequence works for me:
s = socket.socket() ss = ssl.wrap_socket(s) socket.dnsserver(0, "126.96.36.199") i = socket.getaddrinfo('www.google.com', 443)[-1] # i = ('188.8.131.52', 443) print('Connecting to socket...') ss.connect(i) print('Send...') ss.send(b"GET / HTTP/1.0\r\n\r\n") print(ss.recv(4096)) print('Close...') ss.close()
No one ?
I have another mistake when I try this way:
But I can't find any information to unlock the problem either.