Bootstrapping Arduino ESP8266 with OTA

Ross Beazley
1 min readJan 14, 2018

--

These days the first thing I upload to my esp8266 is an Arduino OTA implementation (I have it wrapped up in one class that responds to a loop message), this means no more serial port required and I can leave the board plugged in out of the way. Especially useful for Sonoffs, means I can get them deployed early.

I use this command on linux to find the arduino to update

avahi-browse -t -r “_arduino._tcp”

with output similar to

+ wlp1s0 IPv4 corner _arduino._tcp local
= wlp1s0 IPv4 corner _arduino._tcp local
hostname = [corner.local]
address = [192.168.10.127]
port = [8266]
txt = [“auth_upload=no” “board=generic” “ssh_upload=no” “tcp_check=no”]

this gives me the hostname so then I can use this platform io command to flash the board

platformio run — target upload — upload-port corner.local

or i can use the IP instead of the hostname

platformio run — target upload — upload-port 192.168.10.127

job done!

--

--