🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    "Disconnected from Serial Port" while running Hello World on M5Stack (UIFlow2, Ubuntu)

    Bug Report
    4
    4
    439
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      AlphaBrabo
      last edited by

      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

      1. 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.
      1. Verified Serial Port availability

      After disconnection, I ran ls /dev/ttyACM*

      Before and After disconnection: /dev/ttyACM0 is listed. I can't see if it disconnects when I upload the code

      1. Disabled ModemManager (Ubuntu)
      sudo systemctl stop ModemManager
      
      1. Flashed the latest UIFlow2 firmware using M5Burner
      • Used M5Burner to install the latest version of UIFlow2.
      • Issue persists even after flashing and rebooting.
      1. 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. 😊

      1 Reply Last reply Reply Quote 0
      • S
        schnauzer
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • Z
          Zverik
          last edited by

          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
          
          kurikoK 1 Reply Last reply Reply Quote 0
          • kurikoK
            kuriko @Zverik
            last edited by

            @Zverik
            have you flashed the correct firmware?

            Good morning, and welcome to the Black Mesa Transit System.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post