gcormier / megadesk

Open-source IKEA Bekant controller board

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR Running command failed: Could not open /dev/ttyACM0, the port doesn't exist

mimre25 opened this issue · comments

Hi - I'm trying to flash the companion, but my computer won't detect it.

I'm holding the button why plugging it in but to no avail.

Any suggestion on how to debug this? I've tried multiple different USB slots and cable :/

This is the best I can get:

(esphome) ➜  esphome git:(master) esptool.py chip_id                    
esptool.py v4.6.2
Found 1 serial ports
Serial port /dev/ttyACM0
/dev/ttyACM0 failed to connect: Could not open /dev/ttyACM0, the port doesn't exist

A fatal error occurred: Could not connect to an Espressif device on any of the 1 available serial ports.
(esphome) ➜  esphome git:(master) esphome upload megadesk-companion.yaml
INFO ESPHome 2023.12.9
INFO Reading configuration megadesk-companion.yaml...
Found multiple options for uploading, please choose one:
  [1] /dev/ttyACM0 (USB JTAG/serial debug unit)
  [2] Over The Air (megadesk.local)
(number): 1
esptool.py v4.6.2
Serial port /dev/ttyACM0
ERROR Running command failed: Could not open /dev/ttyACM0, the port doesn't exist
ERROR Please try running esptool.py --before default_reset --after hard_reset --baud 460800 --port /dev/ttyACM0 --chip esp32c3 write_flash -z --flash_size detect 0x10000 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/firmware.bin 0x0 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/bootloader.bin 0x8000 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/partitions.bin 0x9000 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/ota_data_initial.bin locally.
INFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.
esptool.py v4.6.2
Serial port /dev/ttyACM0
ERROR Running command failed: Could not open /dev/ttyACM0, the port doesn't exist
ERROR Please try running esptool.py --before default_reset --after hard_reset --baud 115200 --port /dev/ttyACM0 --chip esp32c3 write_flash -z --flash_size detect 0x10000 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/firmware.bin 0x0 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/bootloader.bin 0x8000 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/partitions.bin 0x9000 /home/martin/Tools/megadesk/esphome/.esphome/build/megadesk/.pioenvs/megadesk/ota_data_initial.bin locally.

I tried one more time and have some dmesg output here:

[ 2489.368029] usb 1-2: new full-speed USB device number 6 using xhci_hcd
[ 2489.521922] usb 1-2: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[ 2489.521939] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2489.521947] usb 1-2: Product: USB JTAG/serial debug unit
[ 2489.521952] usb 1-2: Manufacturer: Espressif
[ 2489.521958] usb 1-2: SerialNumber: D4:F9:8D:07:4F:2C
[ 2489.526663] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
[ 2492.420591] xhci_hcd 0000:3a:00.0: xHC error in resume, USBSTS 0x401, Reinit
[ 2492.420610] usb usb3: root hub lost power or was reset
[ 2492.420619] usb usb4: root hub lost power or was reset
[ 2502.516555] usb 1-2: USB disconnect, device number 6

The error in dmesg is odd.

What OS is this? Is it a Mac?

It's Ubuntu 20.04.

Anyhow, I got it to work with another laptop - feel free to close this 🙂