Skip to content

Instantly share code, notes, and snippets.

@DrSensor
Created November 18, 2018 22:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DrSensor/6e3519e510a8f8aa299a732b56f41502 to your computer and use it in GitHub Desktop.
Save DrSensor/6e3519e510a8f8aa299a732b56f41502 to your computer and use it in GitHub Desktop.
ESP Troubleshooting 101
$ esptool.py chip_id
esptool.py v2.5.1
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 84:f3:eb:0b:dd:53
Uploading stub...
Running stub...
Stub running...
Chip ID: 0x000bdd53
Hard resetting via RTS pin...

TroubleShooting

Permission denied
$ esptool.py chip_id
esptool.py v2.5.1
Found 1 serial ports
Serial port /dev/ttyUSB0
/dev/ttyUSB0 failed to connect: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'

A fatal error occurred: All of the 1 available serial ports could not connect to a Espressif device.

Solution (choose only one of this):

  • sudo chmod 666 /dev/ttyUSB0
  • set an UDEV rule to permanently allow the access
  • add $USER to dialout group
Device or resource busy
$ esptool.py chip_id
esptool.py v2.5.1
Found 1 serial ports
Serial port /dev/ttyUSB0
/dev/ttyUSB0 failed to connect: [Errno 16] could not open port /dev/ttyUSB0: [Errno 16] Device or resource busy: '/dev/ttyUSB0'

A fatal error occurred: All of the 1 available serial ports could not connect to a Espressif device.

Solution:

  1. Gather some infos which process/app use that Serial port. For example:
$ lsof /dev/ttyUSB0
COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
screen  21416 wildan    5u   CHR  188,0      0t0  499 /dev/ttyUSB0
  1. Kill that process/command: killall screen
@jaindinkar
Copy link

Great! Keep the resource updated. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment