ESP Device Flashing Issues
If you are having difficulties flashing your ESP based device following any of the many online tutorials, try these common solutions.
ESP Device Not Entering Flash Mode
First, don't expect any lights to come on when your device enters flash mode. So no lights may be a good thing.
Verify the device has power by powering it from your USB Serial device without holding down power first. It should light up if it gets power.
When booting into flash mode:
- Do not have your ESP device plugged into the wall!
- Start with the USB serial device unplugged
- Ensure all connections are correct and you're using 3 or 3.3 V power (not 5V)
- Press and hold the ESP device power button
- Plug in the USB still holding the ESP device power button
- Hold for up to 12 seconds (but usually 3 seconds is enough)
- Attempt to connect and flash your device
USB Device Not Showing Up - Linux
In linux the USB to serial driver should be installed by default, no install needed. However if your kernel has been updated without a reboot it can cause this driver to not work.
You might see error messages like this: failed to validate module [usbserial] BTF: -22
The solution to this one is simple, just reboot.
Failed to open serial port - Linux
If you receive this error message while flashing: Failed to execute 'open' on 'SerialPort': Failed to open serial port.
The brltty
config may be stealing the USB connection. BRLTTY is for supporting braille displays for the blind. If you do not use brial displays you can safely disable this config permanently. To do so, we link the config file to /dev/null like so:
sudo ln -sf /dev/null /etc/udev/rules.d/85-brltty.rules
You then need to restart.
Switch TX and RX
Your USB serial and ESP device should generally have TX and RX crossed. For example the USB serial devices Transmits and the ESP device receives. Some ESP devices have their TX and RX reversed, so try matching TX to TX and RX to RX to see if that solves your problem