Skip to content

Commit 5d9f9f8

Browse files
committed
Split espflash instructions to new article: "Restore the connectivity firmware on UNO R4 WiFi with espflash"
1 parent d731643 commit 5d9f9f8

File tree

2 files changed

+76
-80
lines changed

2 files changed

+76
-80
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: "Restore the connectivity firmware on UNO R4 WiFi with espflash"
3+
id: 16379769332892
4+
---
5+
6+
The UNO R4 WiFi has a ESP32-S3 chip, which handles the USB-to-serial communication. The firmware for this chip can normally be upgraded [using Arduino IDE or Arduino Cloud](https://support.arduino.cc/hc/en-us/articles/9670986058780-Update-the-connectivity-module-firmware-on-UNO-R4-WiFi#iot), but if this is not possible the firmware can be restored using **espflash**.
7+
8+
You may want to use this procedure if:
9+
10+
* Your UNO R4 WiFi is detected as a generic ESP32 board by Arduino IDE or Arduino Cloud.
11+
* Your UNO R4 WiFi isn't detected as any board by Arduino IDE or Arduino Cloud, despite being connected to your computer with a working data USB cable.
12+
13+
---
14+
15+
Follow these steps:
16+
17+
1. Unplug any non-essential USB devices from your computer.
18+
1. Short the pins highlighted in the image using a jumper wire:
19+
20+
![The GND and Download ESP32 pins.](img/esp32-data-pins.png)
21+
1. Maintain the short between these pins as you connect the UNO R4 WiFi board to your computer with a USB cable.
22+
1. Download and extract the .ZIP file for your system:
23+
* [unor4wifi-update-windows.zip](https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest/download/unor4wifi-update-windows.zip){.link-download}
24+
* [unor4wifi-update-macos.zip](https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest/download/unor4wifi-update-macos.zip){.link-download}
25+
* [unor4wifi-update-linux.zip](https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest/download/unor4wifi-update-linux.zip){.link-download}
26+
1. Open your system's command line application inside the extracted folder.
27+
* **Windows:** Hold <kbd>⇧Shift</kbd> and right-click any blank space inside the extracted folder. In the context menu, select **Open command window here / Open PowerShell window here**.
28+
* **macOS:** Control-click on the unzipped `unor4wifi-update-macos` folder and select "**New Terminal at Folder**" from the context menu. A terminal window will open.
29+
* **Linux:** Open [a command line terminal](https://ubuntu.com/tutorials/command-line-for-beginners) in the extracted folder.
30+
1. Run the command:
31+
* **Windows:** `bin\espflash write-bin -b 115200 0x0 (Get-Item .\firmware\UNOR4-WIFI-S3-*.bin).FullName`
32+
* **macOS/Linux:** `./bin/espflash write-bin -b 115200 0x0 firmware/UNOR4-WIFI-S3-*.bin`
33+
1. The terminal window might now show a list of the serial ports present on your computer. Use the arrow keys on your keyboard to select the port for the board and then press the <kbd>**Enter**</kbd> key.
34+
* **Windows:** The board will have a name like "USB Serial device". <!-- TODO: Confirm name -->
35+
* **macOS:** The board will be named "USB JTAG_serial debug unit". Two ports with this name will be available, select the port that starts with `/dev/cu.usbmodem*`. <!-- TODO: Same for Linux, probably. Confirm this. -->
36+
* If you can't find it, try following steps 1–3 again.
37+
38+
1. The terminal window will now show the following prompt:
39+
40+
```text
41+
? Remember this serial port for future use? (y/n) ›
42+
```
43+
44+
Press the <kbd>**N**</kbd> key on your keyboard.
45+
1. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:
46+
47+
```text
48+
[2023-07-11T08:59:44Z INFO ] Connecting...
49+
[2023-07-11T08:59:45Z INFO ] Using flash stub
50+
Chip type: esp32s3 (revision v0.1)
51+
Crystal frequency: 40MHz
52+
Flash size: 8MB
53+
Features: WiFi, BLE
54+
MAC address: dc:54:75:c4:c6:54
55+
[00:00:14] [========================================] 689/689 0x0
56+
```
57+
58+
1. Close the terminal window.
59+
1. Disconnect the USB cable of the **UNO R4 WiFi** board from your computer.
60+
1. Connect the **UNO R4 WiFi** board to your computer with the USB cable again.
61+
62+
<!-- `/dev/cu.usbmodem13301 - USB JTAG_serial debug unit` -->

content/Hardware Support/UNO/Update-the-connectivity-module-firmware-on-UNO-R4-WiFi.md

Lines changed: 14 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@ title: Update the connectivity module firmware on UNO R4 WiFi
33
id: 9670986058780
44
---
55

6-
Learn how to update the firmware of the ESP32-S3 connectivity module on the UNO R4 WiFi.
7-
8-
Updating the firmware is required to use UNO R4 WiFi with Arduino Cloud, and can resolve issues with UNO R4 WiFi not being detected by Arduino IDE and other development tools.
6+
Learn how to update the firmware of the ESP32-S3 connectivity module on the UNO R4 WiFi. This firmware is required to use your board with Arduino Cloud and for the board to be correctly detected on a USB port by Arduino development tools.
97

108
In this article:
119

1210
* [Use the Firmware Updater in Arduino IDE](#ide)
13-
* [Use Arduino Cloud to update the firmware](#iot)
14-
* [Use the updater script](#unor4wifi-updater)
15-
* [Run espflash directly](#espflash)
11+
* [Use Arduino Cloud to update the firmware](#cloud)
12+
* [Use the "updater" script](#unor4wifi-updater)
13+
* [If you can't update the firmware](#if-you-cant-update-the-firmware)
1614

1715
---
1816

19-
<a id="ide"></a>
20-
21-
## Use the Firmware Updater in Arduino IDE
17+
## Use the Firmware Updater in Arduino IDE {#ide}
2218

2319
Updating the connectivity firmware is easy when using the Firmware Updater in Arduino IDE 2.2.1 or later.
2420

@@ -36,9 +32,9 @@ Follow these steps:
3632

3733
![Firmware Updater window displaying the board selection menu and the "check updates" button](img/firmware-updater-arduino-ide-2-check-updates.png)
3834

39-
> If your UNO R4 WiFi doesn't appear in the list, make sure it's securely connected with a working data USB cable, and try pressing the RST button on the board. If it still doesn't appear, it may be missing the USB bridge firmware. Follow the steps in [Run espflash directly](#espflash) to resolve the issue.
35+
> If your UNO R4 WiFi doesn't appear in the list, make sure it's securely connected with a working data USB cable, and try pressing the RST button on the board. If it still doesn't appear, it may be missing the USB bridge firmware. Follow [these instructions](https://support.arduino.cc/hc/en-us/articles/16379769332892) to resolve the issue.
4036
41-
5. Select the latest firmware version on the drop-down menu and click **Install**
37+
5. Select the latest firmware version on the drop-down menu and click **Install**.
4238

4339
> [!NOTE]
4440
> Installation will overwrite any existing sketch on your board.
@@ -59,19 +55,15 @@ Follow these steps:
5955

6056
---
6157

62-
<a id="iot"></a>
63-
64-
## Use Arduino Cloud to update the firmware
58+
## Use Arduino Cloud to update the firmware {#cloud}
6559

6660
When you add a new device to Arduino Cloud, the connectivity module firmware is automatically updated.
6761

68-
<a class="link-chevron-right" href="https://support.arduino.cc/hc/en-us/articles/10501616961564-Update-connectivity-module-firmware-with-IoT-Cloud">Learn more</a>
62+
[Update connectivity module firmware with Arduino Cloud](https://support.arduino.cc/hc/en-us/articles/10501616961564-Update-connectivity-module-firmware-with-IoT-Cloud){.link-chevron-right}
6963

7064
---
7165

72-
<a id="unor4wifi-updater"></a>
73-
74-
## Use the updater script <!-- TODO -->
66+
## Use the "updater" script {#unor4wifi-updater}
7567

7668
The code repository for the firmware provides an [updater script](https://github.com/arduino/uno-r4-wifi-usb-bridge/tree/main/unor4wifi-updater) that can be used as an alternative to the above options.
7769

@@ -260,68 +252,10 @@ If you get a `VCRUNTIME140.dII was not found` error, download and install the <a
260252

261253
---
262254

263-
<a id="espflash"></a>
264-
265-
## Run espflash directly
266-
267-
The above methods will not work if the board cannot be identified as a UNO R4 WiFi. This can happen if the custom firmware for the ESP32-S3 connectivity module is missing completely, or is not functioning correctly. However, the board can still be restored by [running espflash directly](https://github.com/arduino/uno-r4-wifi-usb-bridge/tree/main/unor4wifi-updater#option-2).
268-
269-
Follow these steps:
270-
271-
1. Unplug any non-essential USB devices from your computer.
272-
1. Short the pins highlighted in the image using a jumper wire:
273-
274-
![The GND and Download ESP32 pins.](img/esp32-data-pins.png)
275-
1. Connect the UNO R4 WiFi board to your computer with the USB cable.
276-
1. Download and extract the .ZIP file for your system:
277-
* <a class="link-download" href="https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest/download/unor4wifi-update-windows.zip">unor4wifi-update-windows.zip</a>
278-
* <a class="link-download" href="https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest/download/unor4wifi-update-macos.zip">unor4wifi-update-macos.zip</a>
279-
* <a class="link-download" href="https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest/download/unor4wifi-update-linux.zip">unor4wifi-update-linux.zip</a>
280-
1. Open your system's command line application inside the extracted folder.
281-
* **Windows:** Hold <kbd>⇧Shift</kbd> and right-click any blank space inside the extracted folder. In the context menu, select **Open command window here / Open PowerShell window here**.
282-
* **macOS:** Control-click on the unzipped `unor4wifi-update-macos` folder and select "**New Terminal at Folder**" from the context menu. A terminal window will open.
283-
* **Linux:** Open [a command line terminal](https://ubuntu.com/tutorials/command-line-for-beginners) in the extracted folder.
284-
1. Run the command:
285-
* **Windows:** `bin\espflash write-bin -b 115200 0x0 (Get-Item .\firmware\UNOR4-WIFI-S3-*.bin).FullName`
286-
* **macOS/Linux:** `./bin/espflash write-bin -b 115200 0x0 firmware/UNOR4-WIFI-S3-*.bin`
287-
288-
<!-- Instructions per OS
289-
290-
### Windows
291-
292-
1. Unplug any non-essential USB devices from your computer.
293-
1. Connect the UNO R4 WiFi board to your computer with the USB cable.
294-
1. Download <a class="link-download" href="https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest/download/unor4wifi-update-windows.zip">unor4wifi-update-windows.zip</a>
295-
1. [Unzip](https://support.microsoft.com/windows/f6dde0a7-0fec-8294-e1d3-703ed85e7ebc) the downloaded file.
296-
1. Open the extracted `unor4wifi-update-windows` folder in Command Prompt.
297-
1. Run the following command: `bin\espflash write-bin -b 115200 0x0 (Get-Item .\firmware\UNOR4-WIFI-S3-*.bin).FullName`
298-
299-
### macOS
300-
301-
1. Open the `unor4wifi-update-macos` in Terminal.
302-
303-
2. Run the following command: `./bin/espflash write-bin -b 115200 0x0 firmware/UNOR4-WIFI-S3-*.bin`
304-
305-
Example output:
306-
307-
```
308-
sebastianwikstrom@mba unor4wifi-update-macos 4 % ./bin/espflash write-bin -b 115200 0x0 firmware/UNOR4-WIFI-S3-*.bin
309-
310-
[2023-10-12T12:34:07Z INFO ] Detected 6 serial ports
311-
[2023-10-12T12:34:07Z INFO ] Ports which match a known common dev board are highlighted
312-
[2023-10-12T12:34:07Z INFO ] Please select a port
313-
❯ /dev/cu.wlan-debug
314-
/dev/tty.wlan-debug
315-
/dev/cu.MOMENTUMTW2
316-
/dev/tty.MOMENTUMTW2
317-
/dev/cu.Bluetooth-Incoming-Port
318-
/dev/tty.Bluetooth-Incoming-Port
319-
```
320-
321-
### Linux
255+
<a id="espflash"></a> <!-- This section previously contained the full procedure, keep this for old URLs -->
322256

323-
1. Open the `unor4wifi-update-linux` in Terminal.
257+
## If you can't update the firmware {#if-you-cant-update-the-firmware}
324258

325-
2. Run the following command: `./bin/espflash write-bin -b 115200 0x0 firmware/UNOR4-WIFI-S3-*.bin`
259+
The above methods will not work if the board cannot be identified as a UNO R4 WiFi. This can happen if the custom firmware for the ESP32-S3 connectivity module is missing completely, or is not functioning correctly. However, the board can still be restored using the espflash utility:
326260

327-
-->
261+
[Restore the connectivity firmware on UNO R4 WiFi with espflash](https://support.arduino.cc/hc/en-us/articles/16379769332892){.link-chevron-right}

0 commit comments

Comments
 (0)