ESPEasy

From Lolly's Wiki
Jump to navigationJump to search

Flash the firmware

$ sudo apt install --yes esptool
$ wget https://github.com/letscontrolit/ESPEasy/releases/download/mega-20200515/ESPEasy_mega-20200515.zip
$ esptool --port /dev/ttyUSB0 --baud 115200 write_flash 0 ESP_Easy_mega_20200516_test_beta_ESP8266_4M1M.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 3c:71:bf:2a:a6:0b
Enabling default SPI flash mode...
Configuring flash size...
Auto-detected Flash size: 4MB
Erasing flash...
Took 2.33s to erase flash block
Writing at 0x000dbc00... (87 %)

Connect via Serial

$ minicom -D /dev/ttyUSB0 --baudrate 115200
Welcome to minicom 2.8

OPTIONS: I18n 
Port /dev/ttyUSB0, 10:28:08

Press CTRL-A Z for help on special keys

Posssible commands via serial connection

You do not see what you type until you hit enter, then you will see the command you have entered and the result, like:

>Save

OK

You can find all commands here: ESPEasy/docs/source/Plugin/P000_commands.repl.
This is just a subset:

Get the Allowed IP range

  • AccessInfo

Get the build number

  • Build

Clear allowed IP range for the web interface for the current session

  • ClearAccessBlock

Clear the password of the unit

  • ClearPassword

Set the password of the unit

  • Password <mypassword>

Configure your local wifi credentials

  • WifiSSID <myssid>
  • WifiKey <mypassword>
  • WifiConnect
  • Save

Reboot

  • Reboot

Delete the whole configuration

Be careful! Do you want this? This deletes the whole configuration but not the Firmware.

  • Reset

Problems

interface 0 claimed by ch341 while 'brltty' sets config #1

Oct  9 14:40:06 lollybook kernel: [372389.769039] usb 3-1.4.3: ch341-uart converter now attached to ttyUSB0
Oct  9 14:40:07 lollybook kernel: [372390.769995] usb 3-1.4.3: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
Oct  9 14:40:07 lollybook kernel: [372390.771187] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
Oct  9 14:40:07 lollybook kernel: [372390.771258] ch341 3-1.4.3:1.0: device disconnected

I found this:

for f in /usr/lib/udev/rules.d/*brltty*.rules; do
    sudo ln -s /dev/null "/etc/udev/rules.d/$(basename "$f")"
done
sudo udevadm control --reload-rules

But I also had to disable the brltty-udev.service

$ sudo systemctl stop brltty-udev.service
$ sudo systemctl mask brltty-udev.service
Created symlink /etc/systemd/system/brltty-udev.service → /dev/null.

After disabling brltty I finally got:

Oct  9 14:41:30 lollybook kernel: [372473.985072] ch341 3-1.4.3:1.0: ch341-uart converter detected
Oct  9 14:41:30 lollybook kernel: [372473.987063] usb 3-1.4.3: ch341-uart converter now attached to ttyUSB0