"Disconnected from Serial Port" while running Hello World on M5Stack (UIFlow2, Ubuntu)
-
Issue Summary
I'm trying to run a simple "Hello World" program on my M5Stack Core using UIFlow2 on Ubuntu 22.04, but I keep experiencing an issue where the serial connection drops unexpectedly. Hereโs what happens when clicking Run or Download the program to the device: a pop up appears, the device connects successfully and logs RAM information:
heap RAM free: 55760 heap RAM alloc: 45296 heap RAM free: 55760 heap RAM alloc: 45296 ...After a few seconds, I get
"Disconnected from Serial Port", and the device is no longer accessible.My device shows Public, the device mac, the associated user account, a QR Code ...
What I've Tried So Far
- Checked USB connection
- Used a high-quality data USB cable.
- Switched between USB 2.0 and USB 3.0 ports.
- Tried a different cable and another PC.
- Verified Serial Port availability
After disconnection, I ran
ls /dev/ttyACM*Before and After disconnection:
/dev/ttyACM0is listed. I can't see if it disconnects when I upload the code- Disabled ModemManager (Ubuntu)
sudo systemctl stop ModemManager- Flashed the latest UIFlow2 firmware using M5Burner
- Used M5Burner to install the latest version of UIFlow2.
- Issue persists even after flashing and rebooting.
- Tried a minimal script in UIFlow2
from m5stack import * from m5ui import * from uiflow import * lcd.clear() lcd.print("Hello World", 10, 10)The screen does not display "Hello World" before disconnection occurs.
Questions
- Why does my M5Stack disconnect from the serial port after a few seconds?
- Is this a firmware issue or a hardware problem?
- Could this be related to power management settings or a driver issue on Linux?
Any help would be greatly appreciated! Thanks in advance. ๐
-
Hi.
I have the same problem. My Mint Linux pops up the terminal; says it connected; says it disconnected.
Have you made any progress solving this problem?
-
Yup, same. Got my M5Stack Basic 2.7 today, burned UIFlow2, but when I try to open a console, or run a program, it shows some log about connecting and disconnecting, and does nothing:
Connected to Serial Port! 4592 heap RAM free: 86704 heap RAM alloc: 2heap RAM free: 86704 heap RAM alloc: 24592 heap RAM free: 86704 heap RAM alloc: 24592 heap RAM free: 86704 heap RAM alloc: 24592 heap RAM free: 86704 heap RAM alloc: 24592 heap RAM free: 86704 heap RAM alloc: 24592 heap RAM free: 86704 heap RAM 4592 heap RAM free: 86704 heap RAM alloc: 24592 Disconnected from Serial Port -
@Zverik
have you flashed the correct firmware? -
@kuriko Of course, I've used M5Burner with the latest UIFlow2, as per the documentation. Just tried with the updated 2.2.7 version, still nothing.
-
@Zverik
that's a bit of weird, i think you should try flash the factory firmware to test out if that was a hardware failure
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better ๐
Register Login