Whenever I disconnect my ESP32 from my PC, I get a open serial error, please try again
error when I try to reconnect to it with Upycraft after a while. The python script on the chip still works, but i cannot establish a serial connection.
The only thing I can do at the moment is re-flash the firmware, but that is really annoying since every time i do this, i have to erase all the scripts on the board and start from scratch
That’s very annoying indeed. Basically, we think this is what’s happening: when you’re running a script in your board, sometimes it’s busy running that script and performing the tasks. So, you need to try opening the COM port multiple times or restart the ESP to catch it available to establish the serial communication with uPyCraft IDE.
If you’re running a script that uses Wi-Fi, deep sleep, or it’s doing multiple tasks, I recommend trying 3 or 4 times to establish the communication. If you can’t, you really need to re-flash the ESP with MicroPython firmware.
Alternatively, you can use Thonny IDE (it is very intuitive and simple to use – simpler than uPyCraft, in my opinion). With Thonny IDE, you won’t have that problem so often. Will you try it?