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

    A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x1B) - Arduino

    Cores
    3
    6
    15.8k
    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.
    • Y
      y7thangeru
      last edited by

      I'm very sorry if this topic already posted before. But i can't seems to find any link for this error message related to m5Stack anywhere using Google Search.
      I'm new to M5stack but had using Arduino before.
      I have tried the Flow and it's working, I even had burn the Flow image into my m5Stick and m5Fire.

      Today i decide to test the Arduino IDE for both m5Stack.
      I have followed the steps https://docs.m5stack.com/#/en/quick_start/m5core/m5stack_core_get_started_Arduino_Windows
      But everytime i try to upload the code to the m5stack from Arduino, an error message is shown. I have tried using both m5stack (stick and fire) , and also on different usb com port

      ****Arduino: 1.8.8 (Windows 7), Board: "M5Stack-Core-ESP32, QIO, 80MHz, Default, 921600, None"

      Sketch uses 213644 bytes (16%) of program storage space. Maximum is 1310720 bytes.
      Global variables use 13840 bytes (4%) of dynamic memory, leaving 313840 bytes for local variables. Maximum is 327680 bytes.
      esptool.py v2.6-beta1
      Serial port COM3
      Connecting......................................____An error occurred while uploading the sketch
      _

      A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x1B)

      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.****

      ![alt text](0_1548660517621_Capture.PNG image url)

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        Arduino failed to connect to the M5Stack.
        Have you installed the serial driver?
        If yes, do you have a com or serial port shown up in Arduino?
        Have you tried another usb data lead?

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • Y
          y7thangeru
          last edited by

          I have already installed the Serial Driver from m5stack

          This is the screen capture of my Device Manager and my Arduino
          0_1548666068019_Capture.PNG

          on the bottom right of arduino, it says none, is this normal?

          1 Reply Last reply Reply Quote 0
          • lukasmaximusL
            lukasmaximus
            last edited by

            It seems you have done everything correctly. The only thing I can suggest is that you try an older version of the arduino IDE. I'm using 1.8.5 I have heard reports that there were no issues in 1.8.7 either.

            1 Reply Last reply Reply Quote 0
            • Y
              y7thangeru
              last edited by

              I have uninstall the Arduino and install the previous one (1.8.5)
              The problem still persist.
              By the way, when the Arduino is on the part "Connecting ..___...", the m5stack reset itself, is this normal or not?

              0_1548736347708_Capture.PNG

              1 Reply Last reply Reply Quote 0
              • lukasmaximusL
                lukasmaximus
                last edited by

                I just thought, you were using the ui flow firmware previously right. I think there is an issue if you have flashed one of the micropython firmwares and try to use arduino afterwards without completely wiping the memory. Please try to use the erase tool in the M5 burner tool and then try and flash an arduino sketch again

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