Cant connect 2 boards again after reset.

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
Appleicon
Posts: 2
Joined: Sun Mar 14, 2021 10:21 am

Cant connect 2 boards again after reset.

Post by Appleicon » Sun Mar 14, 2021 10:23 am

I made a server.py and client.py and they are working fine. Able to send and receive data.

But everytime I did a reset on both, I can't connect them back again. I will get an error 103, ECCONABORTED.

The only workaround is to erase and flash the client board again.

Is there anyway to prevent erasing and flash everytime I want to connect them again?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Cant connect 2 boards again after reset.

Post by pythoncoder » Mon Mar 15, 2021 10:16 am

You'll need to provide more information if we are to diagnose this network problem. Are either of the boards acting as an access point? What about DHCP and IP addresses - are these being allocated consistently? How are you connecting?
Peter Hinch
Index to my micropython libraries.

Appleicon
Posts: 2
Joined: Sun Mar 14, 2021 10:21 am

Re: Cant connect 2 boards again after reset.

Post by Appleicon » Tue Mar 16, 2021 12:28 pm

I managed to get past this problem by changing the default IP (192.168.4.1) to something else and it worked. Its able to reconnect, send and receive data.

So a little background to this, the server.py have an access point. The problem that I had was that client.py was able to connect to the AP using sta_if.connect but was unable to get a connection for socket bind using socket connect.

Before I had this problem, I was always able to get connection for AP and sockets but recently it stopped working for the default IP (192.168.4.1). Changing the port bind didnt work but changing the IP works.

It will be good if it can be explained on why this is happening.

Post Reply