Flashing Esp from Command Line

To put an  esp8266 into programming mode, hold the button for 3 seconds while plugging in.

Check to see if it is recognized with ls -la /dev/ttyUSB0

Connect to the chip with cu -l /dev/ttyUSB0 -s 115200  A chip that has been blanked will have no output.   You will see much output from a chip that has been flashed and is working properly.

It is a good idea to blank the chip if having any issues

esptool --port /dev/ttyUSB0 --baud 115200 write_flash -fm dio -fs 4MB 0x00000 blank_4MB.bin

After blanking flash with 

esptool --port /dev/ttyUSB0 --baud 115200 write_flash -fm dio -fs 4MB 0x00000 ESP_Easy_mega_20230822_normal_ESP8266_4M1M.bin

After flashing, unplug and plug in the chip and it should create an access point.   The usual address is 192.168.4.1   

With some versions, if you put in the wrong wifi password, it will never connect and never generate an access point.  You will see it constantly trying to reconnect but failing.  If this happens you only alternative is to blank it and flash it again.   Make sure you use the correct wifi password.

Not all USB cables are created the same.  Use an acutal data cable and keep it as short as possible.  If things don't work properly, blame the cable.

You may need to run your flash program as root or chmod 666 /dev/ttyUSB0

Always check to see that /dev/ttyUSB0 exists before trying to flash.   ESP's can be a bit squirly and it is best to check at each step.

-------------------------------------

ESPEasy MQTT relay operation

Set topic to esp_name/gpio/5, set payload to 1 or 0.   GPIO 5 is the GPIO# for the Wemos relay shield.

ESPEasy PWM url

http://192.168.10.140/control?cmd=PWM,5,1024

ESP Switch

http://192.168.10.161/control?cmd=gpio,14,1

 

Copyright © 2024 IoTLink.org
Edit       FileManager     Duplicate /themes.../layouts/partials/footer.html