Socket Module connect throwing error. #10706
Unanswered
IFX-Anusha
asked this question in
RP2040 / Pico
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to use the socket module in micropython using thonny IDE. Pico is connected to wifi & the following code is executed
import socket
s = socket.socket()
try:
s.connect(socket.getaddrinfo('www.micropython.org', 80)[0][-1])
print(s)
except Exception as e:
print("connect raised", e)
This gives output socket state=3 timeout=-1 incoming=0 off=0.
The expected socket state is 1.
Could anyone help me with this? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions