Skip to content

Getting espflash::connection_failed #678

Closed
@zvez-da

Description

@zvez-da

Hello. Im using Mac mini m2 with macOS Sonoma 14.5 and espflash 3.1.1. Unfortunately, I got stuck on that fact that whatever I trying to do I get the same error: espflash::connection_failed, for example

espflash board-info gives this output:

[2024-09-07T17:41:29Z INFO ] Detected 2 serial ports
[2024-09-07T17:41:29Z INFO ] Ports which match a known common dev board are highlighted
[2024-09-07T17:41:29Z INFO ] Please select a port
❯ /dev/cu.usbmodem01 - ESP32-S2
  /dev/tty.usbmodem01 - ESP32-S2
✔ Remember this serial port for future use? · no
[2024-09-07T17:41:37Z INFO ] Serial port: '/dev/cu.usbmodem01'
[2024-09-07T17:41:37Z INFO ] Connecting...
Error: espflash::connection_failed

  × Error while connecting to device
  ╰─▶ Failed to connect to the device
  help: Ensure that the device is connected and the reset and boot pins are
        not being held down

No matter what port I choose cu.usbmodem01 or tty.usbmodem01 the result will be the same

It seems like esptool.py works fine for me:

[zvezda@Mac-Mini-Zvezda] ~ % esptool.py flash_id
esptool.py v4.7.0
Found 2 serial ports
Serial port /dev/cu.usbmodem01
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Detecting chip type... ESP32-S2
Chip is ESP32-S2FNR2 (revision v0.0)
Features: WiFi, Embedded Flash 4MB, Embedded PSRAM 2MB, ADC and temperature sensor calibration in BLK2 of efuse V2
Crystal is 40MHz
MAC: c0:4e:30:55:bc:54
Uploading stub...
Running stub...
Stub running...
Manufacturer: 20
Device: 4016
Detected flash size: 4MB
Flash type set in eFuse: quad (4 data lines)
WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.

system_profiler SPUSBDataType gives this:

    USB 3.1 Bus:

      Host Controller Driver: AppleT8112USBXHCI

        ESP32-S2:

          Product ID: 0x0002
          Vendor ID: 0x303a
          Version: 7.23
          Serial Number: 0
          Speed: Up to 12 Mb/s
          Manufacturer: Espressif
          Location ID: 0x01100000 / 1
          Current Available (mA): 500
          Current Required (mA): 500
          Extra Operating Current (mA): 0

I have already tried different usb ports (usb-c, usb-a), different usb cables and different espflash versions (3.1.1 and 3.0.0).
Unfortunately I have no idea what to do next, so I would be glad to see your suggestions :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions