Mktwo Badge

From All Hands Active Wiki
Revision as of 20:41, 1 May 2016 by Demure (talk | contribs) (Added git link, and formatting)
Jump to navigation Jump to search


Code may be found in our git repo,

OTA (Over The Air, A.K.A. via HTTP) firmware loading!



We will flash this code as we would normally using the FTDI cable -- no sweat! This will allow us to update OTA with HTTP going forward (unless something really goes wrong).

OK, now that we've done it the old way, let's try an OTA flash.

You might wish to save yourself some grief: if you have a running firewall, make sure you can receive Avahi/mDNS/Bonjour requests by allowing port 5353/UDP from (or IPv6 FF02::FB).

Reboot the board, and hold down the programming button (the top button). If you do this in time, all the LEDs will flash blue, letting you know it's ready to receive a binary. If you have the serial monitor running, you will catch it telling you about it going into programming mode, and if everything is configured correctly, should eventually give you a web address like "http://esp8266-<ESP ID>-webupdater.local/update". You can also use "avahi-browse -art" in the commandline to get a listing that should include this board's hostname. It is possible to get these confused very easily if there are multiple boards running on OTA programming mode, since there's no easy way to determine ESP ID by looking at the chip (that I'm aware of anyhow).

NOTE: If the board gets stuck trying to associate with the network, the LEDs will flash red, and after a few tries will simply reboot. Check your SSID/network password strings if this keeps happening.

Go to the webupdater URL on your computer's browser. You will see a very simple form with "Browse..." and "Upload" buttons. Click the Browse button and choose the binary image you wish to flash. Make sure it's built by using Ctrl+R, or "verify" the project in the Arduino IDE, and it should be compiled to a location like "/tmp/build<hex string>.tmp/<sketchname>.ino.bin". In the file chooser, select that file, then hit upload on the webpage. If the OTA programming succeeds, the website will reply with "OK", and the board will then reboot.


  • If things ever go sideways, you can always re-flash with the FTDI cable again.