• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

uPyCraft looses connection to ESP32

Q&A Forum › Category: ESP32 › uPyCraft looses connection to ESP32
0 Vote Up Vote Down
ajocius asked 6 years ago

Hi, I have followed great tutorial to get short micropython code on ESP32 from here:

MicroPython – Getting Started with MQTT on ESP32/ESP8266


After trying and failing for a while I got it working finally. However, during that process I came several times to the situation where uPyCraft was not seeing or recognizing software on ESP32 and it was suggesting me to burn firmware. First i did it couple of times, then it works for a while and suddenly looses ESP32 again. It still sees COM port that ESP32 is connected to, PC also shows that specific COM PORT active. 
Since that ESP32 is programmed to publish simple mqtt message every 5 sec, I can still see messages coming to mqtt broker. Meaning that ESP32 does what it is intended to do, so it has all files in tact.
I have thought usb cable is faulty. It can not be that it is just a power usb cable (without data) as I used same cable to program it. But I tried several cables anyway, same result. I have then thought that PC USB might not provide enough power to ensure communication, so I tried different USB on same PC. PC recognizes also I see COM port appear in uPyCraft, however, when I select it uPyCraft suggest me to burn firmware. I also tried external USB bridge with separate power supply, still the same.
So I got stuck a bit. Could that be that bitrate set in COM port settings might have something to do with it? I see that uPyCraft under Tools, Preferences, Serial baud is set by default on 115 200 ( I ceckon that is bits per second), while PC COM port settings has 9 600 bits per second.
Any thoughts?

Question Tags: ESP32, uPyCraft
3 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello, thanks for providing all the details. The baud rate for MicroPython firmware is 115200, do not change it or try with a different baud rate, because it will not work.

It also looks like you’re using a good USB cable with data wires, otherwise you wouldn’t even see the board in your computer.

Basically, I think this is what’s happening: if you’re running a script in your board sometimes it’s busy running the script and performing the tasks.

So, you might need to try to open 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 is using Wi-Fi or doing multiple tasks and try 3 or 4 times to establish the communication and you can’t, I usually re-flash the ESP with MicroPython…

0 Vote Up Vote Down
ajocius answered 6 years ago

I have then tried uPyLoader IDE and that connects successfully and sees/opens files inside ESP32. So it must be something wrong with uPyCraft settings I guess. I prefer uPyCraft due to its editor, that looks better than uPyLoader.

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

I rarely have that problem, but sometimes with a script that is running that uses a lot of resources, it takes some attempts to establish the serial communication with uPyCraft IDE…
It’s a limitation and a bit frustrating, but I still think it’s the best option to program the ESP with MicroPython.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.