M5StickC/ATOM on MacOS Catalina can't upload/ ESP32: Timed out waiting for packet header solution (Solved)



  • @finnsen I didn't catch what you were trying to flash to your device, if you are trying to update uiflow firmware on the device with M5Burner and it fails, have you tried using esptool to flash firmware? if you were uploading an arduino program there are known issues with all esp32 devices on catalina not just m5stack https://github.com/arduino/Arduino/issues/9438 I did make a video a while back ( https://www.youtube.com/watch?v=MTCjKhVKOto) about using m5stack devices on catalina and I didn't seem to come across any of the issues you mentioned, perhaps the issues are with a later revision of catalina, I'll update and take a look when I get chance.



  • @finnsen I mean, If above these solutions still cannot be solved, even if change the computer system(use win10) , use the different flash tool, setup low upload speed(baud 115200), it cannot be solved, then there may be a product problem. Please contact the store for a replacement. and, we recommend that you use the official version of the operating system, not the preview/beta version. In some preview versions, the driver will not work properly



  • @lukasmaximus Thank you for your video. I did not know about setting the device in USB mode as you video explained. I am now getting things to work. Thanks. :)



  • @m5stack My issue where not knowing about setting the Atom Lite in USB mode. And I got confused about the USB firmware upgrade that you described in your initial post as I get the error message that the Update program is not able to set the device in DFU mode. Anyways, things seems to work. Thank you.



  • @m5stack: I finally fixed "my" problem being not able to "see" the Atom Matrix on a mac with 10.15.x!!! At first I suspected a Wacom tablet driver which interferes with my serial port, but at the end it was an old FTDI driver helper named D2xxHelper. I figured out the problem by issuing this command

    sudo ioreg -lirc IOUSBHostInterface

    It gives detailed information on the USB connections and its drivers. For the "M5 Serial Converter" it stated the the D2xxHelper as driver (helper). By removing this old driver and rebuilding the kernel cache I was finally able to "see" my Atom Matrix on Catalina. Enclosed my commands:

    sudo rm -rf /Library/Extensions/D2xxHelper.kext
    sudo kextcache -i /

    After this I've rebooted my mac.



  • @m5stack

    Hi, I have two M5Stick-Cs purchased in the same lot, one succeeded in updating this firmware, the other failed. The error display is as follows. Is there any countermeasure?

    % ./Updater_FW20200422

    ==================== M5 Serial Converter Firmware Updater ====================

    FW Version: ft232_OD_20200422
    :
    :
    

    ==========================================================================

    Press enter to continue . . .

    Detecting M5Stack products.
    Find M5Stack products.
    Kernel driver deteched.
    Apply magic success.
    Waiting for device in DFU mode...
    Find M5Stack device in DFU mode.
    Traceback (most recent call last):
    File "m5stick_firmware_upgrader_OD_20200422.py", line 97, in <module>
    File "site-packages/usb/core.py", line 869, in set_configuration
    File "site-packages/usb/core.py", line 102, in wrapper
    File "site-packages/usb/core.py", line 148, in managed_set_configuration
    File "site-packages/usb/backend/libusb1.py", line 794, in set_configuration
    File "site-packages/usb/backend/libusb1.py", line 595, in _check
    usb.core.USBError: [Errno None] Other error
    [6711] Failed to execute script m5stick_firmware_upgrader_OD_20200422
    %



  • @tokuhira when you received the product can't upload programs? the machine that failed to update, can the program be burned normally now?



  • I've got similar problems: Not being able to burn anything from VSCode/PlatformIO with the same error message.
    Running under macOS Big Sur. Trying to use the M5AtomLite

    I finally got it working under Arduino IDE, being able to burn code.
    The UIFlo software also works, partially. With the M5Burner I can erase and burn the UIFlow software, setting it to USB mode, and after that, it is able to burn a new program with UIFlow (using 1.7.2 beta). But after each burn, the connection gets lost and I need to go to M5Burner separately, erase the Atom and burn UIFlow again, and setting it to USB-mode.

    But my prime concern is using VSCode, which doesn't work
    Using Board definition pico32.



  • @DannyG86 can you please post your "platformio.ini" file? And also your #include and setup() code. I am on mac Big Sur v11.3 and can reliably program M5StickC, StickC Plus, Atom and Fire using PlatformIO.



  • I'm on Mac OS 12.2.1, and I'm running into the problem listed in this topic.

    Changing baud rate to 460800
    Changed.
    Configuring flash size...

    A fatal error occurred: Timed out waiting for packet header
    *** [upload] Error 2
    ============================================= [FAILED] Took 4.46 seconds =============================================
    The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.

    When using the supplied firmware update tool, I'm getting following error:

    Detecting M5Stack products.
    Find M5Stack products.
    Kernel driver deteched.
    Apply magic success.

    Fail to cast magic stage 2, please contact vendor.
    Waiting for device in DFU mode.....................
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.

    [Process completed]

    Any suggestions would be appreciated. Thank you!