I’m connected to ESP-WROOM device from a PC on Windows 11. I’m trying to connect a socket in MicroPython to a server on my LAN.
I simplified my code to the following to show the error I keep getting.
import socket
import network
wlan = network.WLAN(network.STA_IF)
if wlan.isconnected() : print('Connected')
tgt=(('192.168.1.90',50000))
s=socket.socket()
s.connect(tgt)
print('Done')
type here
The result when I run:
MPY: soft reboot
Connected
Traceback (most recent call last):
File “”, line 9, in
OSError: [Errno 104] ECONNRESET
Line 9 is the s.connect()
line. I’ve seen many examples that suggest this should work.
Why do I get this error?