Skip to content

Commit e123f11

Browse files
committed
Replace updater script with Arduino Firmware Uploader
1 parent d8908dd commit e123f11

File tree

1 file changed

+8
-188
lines changed

1 file changed

+8
-188
lines changed

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

Lines changed: 8 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In this article:
99

1010
* [Use the Firmware Updater in Arduino IDE](#ide)
1111
* [Use Arduino Cloud to update the firmware](#cloud)
12-
* [Use the "updater" script](#unor4wifi-updater)
12+
* [Use the Arduino Firmware Uploader CLI utility](#cli)
1313
* [If you can't update the firmware](#if-you-cant-update-the-firmware)
1414

1515
---
@@ -63,199 +63,19 @@ When you add a new device to Arduino Cloud, the connectivity module firmware is
6363

6464
---
6565

66-
## Use the "updater" script {#unor4wifi-updater}
66+
## Use the Arduino Firmware Uploader CLI utility {#unor4wifi-updater}
6767

68-
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.
69-
70-
<a id="windows"></a>
71-
72-
### Windows
73-
74-
1. Unplug any non-essential USB devices from your computer.
75-
1. Connect the UNO R4 WiFi board to your computer with the USB cable.
76-
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>
77-
1. [Unzip](https://support.microsoft.com/windows/f6dde0a7-0fec-8294-e1d3-703ed85e7ebc) the downloaded file.
78-
1. Double-click on the `update.bat` file that is in the unzipped folder.
79-
> [!NOTE]
80-
> Depending on your Windows security settings, a **Windows protected your PC** dialog may open with this message:
81-
>
82-
> _Microsoft Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk._
83-
>
84-
> Click the **More info** link in the dialog and then click the **Run anyway** button to continue.
85-
1. A terminal window will open. The terminal window might now show a list of the serial ports present on your computer.
86-
87-
For example:
88-
89-
```text
90-
Start flashing firmware
91-
[2023-07-11T06:39:09Z INFO ] Detected 2 serial ports
92-
[2023-07-11T06:39:09Z INFO ] Ports which match a known common dev board are highlighted
93-
[2023-07-11T06:39:09Z INFO ] Please select a port
94-
❯ COM1
95-
COM43 - USB Serial Device (COM43)
96-
```
97-
98-
If so, use the <kbd>****</kbd> key on your keyboard to select the port of the **UNO R4 WiFi** board from the list, and then press the <kbd>**Enter**</kbd> key.
99-
1. The terminal window will now show the following prompt:
100-
101-
```text
102-
? Remember this serial port for future use? (y/n) ›
103-
```
104-
105-
Press the <kbd>**N**</kbd> key on your keyboard.
106-
1. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:
107-
108-
```text
109-
Chip type: esp32s3 (revision v0.1)
110-
Crystal frequency: 40MHz
111-
Flash size: 8MB
112-
Features: WiFi, BLE
113-
MAC address: dc:54:75:c4:c6:54
114-
[00:00:15] [========================================] 689/689 0x0
115-
Press any key to continue . . .
116-
```
117-
118-
1. Press any key on your keyboard to close the terminal window.
119-
1. Disconnect the USB cable of the **UNO R4 WiFi** board from your computer.
120-
1. Connect the **UNO R4 WiFi** board to your computer with the USB cable again.
121-
122-
**Troubleshooting for Windows:**
123-
124-
If you get a `VCRUNTIME140.dII was not found` error, download and install the <a class="link-top-right" href="https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022">Microsoft Visual C++ Redistributable package</a> from Microsoft.
125-
126-
### macOS
127-
128-
1. Unplug any non-essential USB devices from your computer.
129-
1. Connect the UNO R4 WiFi board to your computer with the USB cable.
130-
1. Download <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>
131-
1. [Unzip](https://support.apple.com/en-ca/guide/mac-help/mchlp2528/mac) the downloaded file.
132-
1. Control-click on the unzipped `unor4wifi-update-macos` folder and select "**New Terminal at Folder**" from the context menu. A terminal window will open.
133-
1. Type the following command in the **Terminal** window:
134-
135-
```text
136-
chmod a+x update.command && sudo xattr -d com.apple.quarantine bin/espflash && sudo xattr -d com.apple.quarantine bin/unor4wifi-reboot-macos
137-
```
138-
139-
1. Press the <kbd>**Enter**</kbd> key.
140-
1. Type your macOS user password in the "Password" prompt and press the <kbd>**Enter**</kbd> key again.
141-
1. Type the following command in the **Terminal** window:
142-
143-
```text
144-
./update.command
145-
```
146-
147-
1. Press the <kbd>**Enter**</kbd> key.
148-
1. The terminal window might now show a list of the serial ports present on your computer.
149-
150-
For example:
151-
152-
```text
153-
Start flashing firmware
154-
[2023-07-11T08:55:51Z INFO ] Detected 6 serial ports
155-
[2023-07-11T08:55:51Z INFO ] Ports which match a known common dev board are highlighted
156-
[2023-07-11T08:55:51Z INFO ] Please select a port
157-
❯ /dev/cu.wlan-debug
158-
/dev/tty.wlan-debug
159-
/dev/cu.Bluetooth-Incoming-Port
160-
/dev/tty.Bluetooth-Incoming-Port
161-
/dev/cu.usbmodem2214101 - USB JTAG_serial debug unit
162-
/dev/tty.usbmodem2214101 - USB JTAG_serial debug unit
163-
```
164-
165-
If so, use the <kbd>****</kbd> key on your keyboard to select the `dev/cu.usbmodem*` port for **USB JTAG_serial debug unit** and then press the <kbd>**Enter**</kbd> key.
166-
167-
1. The terminal window will now show the following prompt:
168-
169-
```text
170-
? Remember this serial port for future use? (y/n) ›
171-
```
172-
173-
Press the <kbd>**N**</kbd> key on your keyboard.
174-
1. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:
175-
176-
```text
177-
[2023-07-11T08:59:44Z INFO ] Serial port: '/dev/cu.usbmodem2214101'
178-
[2023-07-11T08:59:44Z INFO ] Connecting...
179-
[2023-07-11T08:59:45Z INFO ] Using flash stub
180-
Chip type: esp32s3 (revision v0.1)
181-
Crystal frequency: 40MHz
182-
Flash size: 8MB
183-
Features: WiFi, BLE
184-
MAC address: dc:54:75:c4:c6:54
185-
[00:00:14] [========================================] 689/689 0x0
186-
```
187-
188-
1. Close the **Terminal** window.
189-
1. Disconnect the USB cable of the **UNO R4 WiFi** board from your computer.
190-
1. Connect the **UNO R4 WiFi** board to your computer with the USB cable again.
191-
192-
**Troubleshooting for macOS:**
193-
194-
* If you get a `Cannot put the board in ESP mode. (via 'unor4wifi-reboot')` error: disconnect and reconnect the board, then run the command again.
195-
* If you get an `xattr: bin/espflash: No such xattr: com.apple.quarantine` or `xattr: bin/espflash: No such xattr: com.apple.quarantine` error, it means that the command has already been run, or is otherwise not needed. Proceed with the next step.
196-
197-
<a id="linux"></a>
198-
199-
## Linux
200-
201-
1. Unplug any non-essential USB devices from your computer.
202-
1. Connect the UNO R4 WiFi board to your computer with the USB cable.
203-
1. Download <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>
204-
1. Extract the downloaded ZIP file.
205-
1. Open [a command line terminal](https://ubuntu.com/tutorials/command-line-for-beginners) in the extracted folder.
206-
1. Type the following command:
207-
208-
```text
209-
./update.sh
210-
```
211-
212-
1. Press the <kbd>**Enter**</kbd> key.
213-
1. The terminal window might now show a list of the serial ports present on your computer.
214-
215-
For example:
216-
217-
```text
218-
Start flashing firmware
219-
[2023-07-12T15:02:36Z INFO ] Detected 3 serial ports
220-
[2023-07-12T15:02:36Z INFO ] Ports which match a known common dev board are highlighted
221-
[2023-07-12T15:02:36Z INFO ] Please select a port
222-
❯ /dev/ttyACM0 - 7 Series/C210 Series Chipset Family USB xHCI Host Controller
223-
/dev/ttyS4
224-
/dev/ttyS0
225-
```
226-
227-
If so, use the <kbd>****</kbd> key on your keyboard to select the port of the **UNO R4 WiFi** board from the list, and then press the <kbd>**Enter**</kbd> key.
228-
1. The terminal window will now show the following prompt:
229-
230-
```text
231-
? Remember this serial port for future use? (y/n) ›
232-
```
233-
234-
Press the <kbd>**N**</kbd> key on your keyboard.
235-
1. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:
236-
237-
```text
238-
[2023-07-12T15:04:46Z INFO ] Serial port: '/dev/ttyACM0'
239-
[2023-07-12T15:04:46Z INFO ] Connecting...
240-
[2023-07-12T15:04:46Z INFO ] Using flash stub
241-
Chip type: esp32s3 (revision v0.1)
242-
Crystal frequency: 40MHz
243-
Flash size: 8MB
244-
Features: WiFi, BLE
245-
MAC address: dc:54:75:c4:c6:54
246-
[00:00:14] [========================================] 689/689 0x0
247-
```
248-
249-
1. Close the terminal window.
250-
1. Disconnect the USB cable of the **UNO R4 WiFi** board from your computer.
251-
1. Connect the **UNO R4 WiFi** board to your computer with the USB cable again.
68+
Arduino IDE and Arduino Cloud both employ the **Arduino Firmware Uploader** tool. If you prefer, you can use it directly as a command-line application. You can find the [user documenation here](https://arduino.github.io/arduino-fwuploader/2.4/).
25269

25370
---
25471

25572
<a id="espflash"></a> <!-- This section previously contained the full procedure, keep this for old URLs -->
25673

25774
## If you can't update the firmware {#if-you-cant-update-the-firmware}
25875

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:
76+
> [!NOTE]
77+
> This section was previously titled **Run espflash directly**.
78+
79+
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:
26080

261-
[Restore the connectivity firmware on UNO R4 WiFi with espflash](https://support.arduino.cc/hc/en-us/articles/16379769332892){.link-chevron-right}
81+
[Restore the USB 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)