๐Ÿค–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)

    Scheduled Pinned Locked Moved Bug Report
    6 Posts 4 Posters 4.0k Views
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            kuriko @Zverik
            last edited by

            @Zverik
            have you flashed the correct firmware?

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

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

              @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.

              kurikoK 1 Reply Last reply Reply Quote 0
              • kurikoK Offline
                kuriko @Zverik
                last edited by

                @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

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

                1 Reply Last reply Reply Quote 0

                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
                • First post
                  Last post