Overview
These instructions are aimed at users who’s mainboard does not contain an onboard WiFi Module and an extra module has had to be connected to the EXP1/EXP2 ports.
Initial Configuration
Manual Flashing
The image to flash to the ESP32 can be found here.
Make sure you download DuetWiFiServer-esp32-stm32f4.bin
It should be flashed using esptool.py. Use the code below as an example. Change the Com port to match the ESP32 device and make sure you give the .bin file its complete file location if its not in the same folder as esptools.
esptool.py --chip esp32 --port COM4 write_flash 0x00000 DuetWiFiServer-esp32-stm32f4.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 ESP32 UART pins (marked RX/TX on most modules).
Download the latest stable DuetWiFiServer-esp32-stm32f4.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
Updating Existing
There are two methods to update the boards if a new version of the ESP32 firmware is released
Manual Updating
This method follows the flashing instructions for preparation. To allow the ESP32 to be put in reset mode, its best to disconnect it from the 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 ESP32 UART pins (marked RX/TX on most modules).
Download the latest stable DuetWiFiServer-esp32-stm32f4.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.