Configuring an ESP8266 for LPC Boards

The image for to flash to the ESP can be found here.

It should be flashed using esptool.py. Use the code below as an example. Change the Com port to match the ESP device and make sure you give the .bin file its complete file location if its not in the same folder as esptools.

esptool.py --port COM4 write_flash 0x00000 DuetWifiServer-lpc.bin

You can also follow PCR’s instructions if you don’t get on with esptool.

If flashing a board with 16MB flash size, such as the Wemos Mini Pro, the following code should be used.
esptool.py --port COM4 write_flash --flash_size 4MB 0x00000 DuetWiFiServer-lpc.bin

On a side note, I have a very handy little tool installed on my main laptop thats monitoring for any serial devices as they are plugged in and you get a popup with the Com port number. If you’re interested, it can be found here.

RRF based flashing

The WiFi UART interface will require changes to your board.txt file. You need to define the pins used by the UART (the builds provided have support for UART0 and UART3 defined, this takes the form: 8266wifi.serialRxTxPins = {RXPin, TXPin} This information has been added to the connecting via WiFi page for each board.

You will also need to hook up the ESP8266 UART pins (marked RX/TX on most modules).

Download the latest stable DuetWiFiServer-lpc-el.bin (or the latest unstable release if using unstable releases) from here, rename it to DuetWiFiServer.bin and put it in the sys folder on the SD card.

Then send the following commands

M552 S0
M997 S1
M552 S0

There are two methods to update the boards if a new version of the ESP firmware is released

Manual Updating

This method follows the flashing instructions for preparation. To allow the ESP to be put in reset mode, its best to disconnect it from the LPC based board.

DWC based Updating

The WiFi UART interface will require changes to your board.txt file. You need to define the pins used by the UART (the builds provided have support for UART0 and UART3 defined, this takes the form: 8266wifi.serialRxTxPins = {RXPin, TXPin} This information has been added to the connecting via WiFi page for each board.

You will also need to hook up the ESP8266 UART pins (marked RX/TX on most modules).

Download the latest stable DuetWiFiServer-lpc-el.bin (or the latest unstable release if using unstable releases) from here and upload it to the system folder using DWC. DWC should ask you if you want to install the update. If it doesn’t, issue the command M997 S1.