Radio module firmware version 0.2.0 is now available

A new version of the firmware for the radio module on the UNO R4 WiFi board is now available.

This version adds some important capabilities to the board:

  • Support for use as an Arduino IoT Cloud Device
  • Support for BLE
  • Fixes and enhancements related to SSL certificates

Full changelog here:

https://github.com/arduino/uno-r4-wifi-usb-bridge/compare/0.1.0...0.2.0

Updating the Firmware on Your Board

I'll provide instructions you can follow to update the radio module firmware on your UNO R4 WiFi board. Please let me know if you have any questions or problems while following the instructions.

There are three available methods for updating the firmware. I'll provide instructions for all three below. You can pick whichever one of the three is most convenient to you:

Arduino IDE 2.x

Support for updating the UNO R4 WiFi was added in Arduino IDE 2.2.0.

  1. Connect the UNO R4 WiFi board to your computer with the USB cable.
  2. If you have the Arduino IDE Serial Monitor or Serial Plotter running, close them.
    You can close Serial Monitor by clicking the X icon that appears on its tab when selected:
    image
  3. Select Tools > Firmware Updater from the Arduino IDE menus.
    The "Firmware Updater" dialog will open.
  4. Select the UNO R4 WiFi from the "Select Board" menu in the "Firmware Updater" dialog.
  5. Click the "CHECK UPDATES" button.
    An "INSTALL" button will be added to the dialog.
  6. Click the "INSTALL" button.
    An "Installing firmware" process will start, as indicated by the message near the bottom of the dialog.
  7. Wait for the firmware update process to finish successfully, as indicated by the message in the dialog:

    Firmware successfully installed.

  8. Click the X icon in the dialog.
    The dialog will close.
  9. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
  10. Connect the UNO R4 WiFi board to your computer with the USB cable again.

Arduino Firmware Uploader

If you prefer to update the firmware via the command line, this can be done using the Arduino Firmware Uploader tool.

Installation and usage instructions are available here:

https://arduino.github.io/arduino-fwuploader/

Update Scripts

The original approach of updating the firmware via the provided scripts still works as well as ever, but is no longer recommended now that the more convenient method of update via Arduino IDE or Arduino Firmware Uploader is available.

Click here to see instructions

If You Are Using Linux

  1. Unplug any non-essential USB devices from your computer.
  2. Connect the UNO R4 WiFi board to your computer with the USB cable.
  3. Open the release page for the latest version of the firmware in your web browser:
    https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest
  4. Click the "unor4wifi-update-linux.zip" download link under the "Assets" section of the release page:
  5. Wait for the download to finish.
  6. Extract the downloaded ZIP file.
  7. Open a command line terminal in the extracted folder.
  8. Type the following command:
    ./update.sh
    
  9. Press the Enter key.
  10. The terminal window might now show a list of the serial ports present on your computer.
    For example:
    Start flashing firmware
    [2023-07-12T15:02:36Z INFO ] Detected 3 serial ports
    [2023-07-12T15:02:36Z INFO ] Ports which match a known common dev board are highlighted
    [2023-07-12T15:02:36Z INFO ] Please select a port
    ❯ /dev/ttyACM0 - 7 Series/C210 Series Chipset Family USB xHCI Host Controller
      /dev/ttyS4
      /dev/ttyS0
    
    If so, use the key on your keyboard to select the port of the UNO R4 WiFi board from the list, and then press the Enter key.
  11. The terminal window will now show the following prompt:
    ? Remember this serial port for future use? (y/n) ›
    
    Press the N key on your keyboard.
  12. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:
    [2023-07-12T15:04:46Z INFO ] Serial port: '/dev/ttyACM0'
    [2023-07-12T15:04:46Z INFO ] Connecting...
    [2023-07-12T15:04:46Z INFO ] Using flash stub
    Chip type:         esp32s3 (revision v0.1)
    Crystal frequency: 40MHz
    Flash size:        8MB
    Features:          WiFi, BLE
    MAC address:       dc:54:75:c4:c6:54
    [00:00:14] [========================================]     689/689     0x0 
    
  13. Close the terminal window.
  14. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
  15. Connect the UNO R4 WiFi board to your computer with the USB cable again.

If You Are Using macOS

  1. Unplug any non-essential USB devices from your computer.
  2. Connect the UNO R4 WiFi board to your computer with the USB cable.
  3. Open the release page for the latest version of the firmware in your web browser:
    https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest
  4. Click the "unor4wifi-update-macos.zip"download link under the "Assets" section of the release page:
  5. Wait for the download to finish.
  6. Unzip the downloaded file.
  7. Control-click on the unzipped unor4wifi-update-macos folder.
    A context menu will open.
  8. Select "New Terminal at Folder" from the context menu.
    A terminal window will open.
  9. Type the following command in the Terminal window:
    chmod a+x update.command && sudo xattr -d com.apple.quarantine bin/espflash && sudo xattr -d com.apple.quarantine bin/unor4wifi-reboot-macos && ./update.command
    
  10. Press the Enter key.
    A "Password" prompt will appear in the Terminal window.
  11. Type your macOS user password.
  12. Press the Enter key.
  13. The terminal window might now show a list of the serial ports present on your computer.
    For example:
    Start flashing firmware
    [2023-07-11T08:55:51Z INFO ] Detected 6 serial ports
    [2023-07-11T08:55:51Z INFO ] Ports which match a known common dev board are highlighted
    [2023-07-11T08:55:51Z INFO ] Please select a port
    ❯ /dev/cu.wlan-debug
      /dev/tty.wlan-debug
      /dev/cu.Bluetooth-Incoming-Port
      /dev/tty.Bluetooth-Incoming-Port
      /dev/cu.usbmodem2214101 - USB JTAG_serial debug unit
      /dev/tty.usbmodem2214101 - USB JTAG_serial debug unit
    
    If so, use the key on your keyboard to select the port of the UNO R4 WiFi board from the list and then press the Enter key.
  14. The terminal window will now show the following prompt:
    ? Remember this serial port for future use? (y/n) ›
    
    Press the N key on your keyboard.
  15. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:
    [2023-07-11T08:59:44Z INFO ] Serial port: '/dev/cu.usbmodem2214101'
    [2023-07-11T08:59:44Z INFO ] Connecting...
    [2023-07-11T08:59:45Z INFO ] Using flash stub
    Chip type:         esp32s3 (revision v0.1)
    Crystal frequency: 40MHz
    Flash size:        8MB
    Features:          WiFi, BLE
    MAC address:       dc:54:75:c4:c6:54
    [00:00:14] [========================================]     689/689     0x0
    
  16. Close the Terminal window.
  17. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
  18. Connect the UNO R4 WiFi board to your computer with the USB cable again.

If You Are Using Windows

  1. Unplug any non-essential USB devices from your computer.

  2. Connect the UNO R4 WiFi board to your computer with the USB cable.

  3. Open the release page for the latest version of the firmware in your web browser:
    https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/latest

  4. Click the "unor4wifi-update-windows.zip" download link under the "Assets" section of the release page:

  5. Wait for the download to finish.

  6. Unzip the downloaded file.

  7. Double click on the update.bat file that is in the unzipped folder.

  8. Depending on your Windows security settings, a "Windows protected your PC" dialog might now open:

    Microsoft Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.

    If so, click the "More info" link in the dialog and then click the "Run anyway" button.

  9. A terminal window will open. The terminal window might now show a list of the serial ports present on your computer.
    For example:

    Start flashing firmware
    [2023-07-11T06:39:09Z INFO ] Detected 2 serial ports
    [2023-07-11T06:39:09Z INFO ] Ports which match a known common dev board are highlighted
    [2023-07-11T06:39:09Z INFO ] Please select a port
    ❯ COM1
      COM43 - USB Serial Device (COM43)
    

    If so, use the key on your keyboard to select the port of the UNO R4 WiFi board from the list, and then press the Enter key.

  10. The terminal window will now show the following prompt:

    ? Remember this serial port for future use? (y/n) ›
    

    Press the N key on your keyboard.

  11. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:

    Chip type:         esp32s3 (revision v0.1)
    Crystal frequency: 40MHz
    Flash size:        8MB
    Features:          WiFi, BLE
    MAC address:       dc:54:75:c4:c6:54
    [00:00:15] [========================================]     689/689     0x0
    Press any key to continue . . .
    
  12. Press any key on your keyboard.
    The terminal window will now close.

  13. Disconnect the USB cable of the UNO R4 WiFi board from your computer.

  14. Connect the UNO R4 WiFi board to your computer with the USB cable again.

ArduinoBLE Library

In addition to the changes made to the radio module firmware to support BLE, work is in progress on the "ArduinoBLE" library to make it compatible with the UNO R4 WiFi board. Testing and feedback of the ArduinoBLE library on the UNO R4 WiFi board is very welcome.

I'll provide instructions you can follow to install the beta tester version of the ArduinoBLE library that has support for the UNO R4 WiFi. Please let me know if you have any questions or problems while following the instructions.


These instructions are written for Arduino IDE 2.x. The procedure is similar if you are using Arduino IDE 1.x.


UPDATE: Support for the UNO R4 WiFi board is now available in the release version of the ArduinoBLE library, so it is no longer necessary to install the beta tester version of the library. Instead, just install the latest version of the library via the Arduino IDE Library Manager as usual.

Click here to see the obsolete beta tester version installation instructions

A. Setup

  1. Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. In the "Filter your search" field, type arduino uno r4 boards
  3. Check the version number that is shown in the "Arduino UNO R4 Boards" entry in the search results. If you have a version older than 1.0.2 installed, click the "UPDATE" button in the "Arduino UNO R4 Boards" entry.
  4. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
  5. In the "Filter your search" field, type arduinoble
  6. Scroll down through the list of libraries until you see the "ArduinoBLE by Arduino" entry.
  7. Check to see whether the ArduinoBLE library is installed (which will be indicated by a label that says something like "1.3.4 installed" on the entry). If the library is not installed skip the rest of the instructions here in "Setup" section and proceed directly to the instructions in the "Install Beta Tester Version of ArduinoBLE Library" section below.
  8. Hover the mouse pointer over the "ArduinoBLE by Arduino" entry.
  9. You will see a ●●● icon appear near the top right corner of the library entry. Click on that icon.
    A context menu will open.
  10. Select "Remove" from the context menu.
    An "Uninstall" dialog will open.
  11. Click the "YES" button in the "Uninstall" dialog to confirm that you want to uninstall the library.
  12. Wait for the uninstall process to finish.

B. Install Beta Tester Version of ArduinoBLE Library

  1. Click the following link to download the ZIP file that contains the beta tester version of the ArduinoBLE library:
    https://github.com/facchinm/ArduinoBLE/archive/refs/heads/uno_r4_wifi.zip
  2. Wait for the download to finish.
  3. Select Sketch > Include library > Add .ZIP Library from the Arduino IDE menus.
  4. Select the downloaded file.
  5. Click the Open button.
  6. If you already had the ArduinoBLE library installed, a "Do you want to overwrite the existing library?" dialog will appear. If you approve of overwriting the previous installation of the library, click the "YES" button.
    After you are finished testing the beta version of the ArduinoBLE library, you can use Library Manager to reinstall the production version of the library again as usual.
  7. Wait for Arduino IDE to show a "Successfully installed library ... notification.

---

Please let us know if you experience any problems while using the beta tester version of the ArduinoBLE library with your UNO R4 WiFi board. You can submit formal reports or reviews on GitHub in the pull request:

https://github.com/arduino-libraries/ArduinoBLE/pull/305

Reports and discussion is also welcome here on Arduino Forum.

4 Likes

HELP Windows defender and Norton is stopping me from installing this new firmware - please advise

err is this really the same as installing new firmware on the R4 WIFI board???

Do we have to do any previous step or we can follow the initial instructions? And ignore this wip: add support for UNO R4 WiFi by facchinm · Pull Request #305 · arduino-libraries/ArduinoBLE · GitHub

The instructions I provided above are comprehensive. After following those instructions you should be able to use the "ArduinoBLE" library with your UNO R4 WiFi board, including the example sketches that come with the library.

From your deleted posts, I see that you were having some difficulty with installing the beta tester version of the ArduinoBLE library. If you are still having that problem, I can provide instructions you can follow to install it.

Radio module updated successfully via Windows platform instructions.

I installed the Beta BLE library but it seems to be the same as 1.3.5 that was already installed.

I have only run the Central > Scan example sketch and it was finding targets.

The only issue so far is I have to unplug and plug back in the R4 WiFi after each upload in order to upload a new sketch.
If I try to upload a new sketch without re-plugging it back in I get the following error message every time...

Sketch uses 37164 bytes (14%) of program storage space. Maximum is 262144 bytes.
Global variables use 2584 bytes (7%) of dynamic memory, leaving 30184 bytes for local variables. Maximum is 32768 bytes.
No device found on COM12
Failed uploading: uploading error: exit status 1

Hitting reset doesn't work.
The R4 WiFi will only accept a new sketch if it is detached and reattached.

It is not the same. The sketch won't even compile for the Arduino UNO R4 WiFi board when you have the 1.3.5 release of the library installed.

You can see the difference between the beta tester version of the library and the 1.3.5 release of the library here:

Hi @ptillisch - I uninstalled 1.3.5 and then followed your instructions to install the beta library via download zip file and sketches compile and run fine.

The Library Manager shows the version as 1.3.5 again, that’s why it was confusing versus your instructions which referenced 1.3.4 when 1.3.5 was already available.

I'm sorry to hear that. The developers of the tool provided advice about the problem with Windows Defender here

https://github.com/arduino/uno-r4-wifi-usb-bridge/tree/main/unor4wifi-updater#:~:text=If%20Windows%20is%20overprotective

If Windows is overprotective click on More info and then Run anyway
image

I installed Norton Antivirus on a virtual machine and was able to reproduce the problem:

image

I don't have the qualifications to advise you on whether or not you should choose to allow the tool to run.

There is work in progress to allow firmware updates to be installed easily via Arduino IDE and Arduino Cloud just the same as you would do with the "NINA" module on the MKR WiFi 1010 and Nano 33 IoT boards:

so if you don't need to use your UNO R4 WiFi board with Arduino IoT Cloud, ArduinoBLE library, or with SSL certificates then you can continue to use the version of the firmware the board came with until the more user friendly firmware update system is finished.

Thanks for this response - I guess that I will have to wait

This happened to me , I clicked more info , then run anyway popped up to the left side of don't run. Click run anyway. @michaelbusfield

I ran into a slightly different issue when trying to install the new firmware. I received the following error:

Cannot put the board in ESP mode. (via 'unor4wifi-reboot')

So I followed the instructions for windows on this page:
uno-r4-wifi-usb-bridge/unor4wifi-updater/README.md at b1ddb36decd16f348e4e5796b2040c4b94b7e821 · arduino/uno-r4-wifi-usb-bridge (github.com)

and it installed. I did have to go to the command prompt though.

In regards to the library since I already had an older version of library installed I got the following error message from 2.1.1 ide:
Screenshot 2023-07-15 152948

Solution: just deleted the old version and reinstalled the new version

The following BLE HID joystick works on Uno R4 WiFi. Two BLE mice failed to work. Looks good so far. https://www.amazon.com/gp/product/B09QJLV6JJ/

Sample output:
Characteristic 2a4d valueUpdated 51 AF 80 80 00 00 09 00 00 x: 81 y: 175 buttons: 0x0

1 Like

I made some mistakes when following the instructions for Windows: at step 14, I pressed "Y".

I let the program (the firmware updater) run, then I re-extracted it and ran it again. Now the Arduino seems to be stuck in ESP mode: the firmware updater doesn't recognize it, and it shows up on the IDE as "ESP32-S3-USB-OTG". How do I undo this?

Unplug the USB cable of the UNO R4 WiFi board from your computer and then plug the cable back into your computer.

I already tried that.

OK, please try this:

  1. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
  2. Use a jumper wire to connect these two pins on the 2x3 male header that is near the USB socket on the UNO R4 WiFi board:
  3. Connect the UNO R4 WiFi board to your computer with a USB cable.
  4. Start Windows "File Explorer".
  5. Open the unor4wifi-update-windows folder that was created when you unzipped the downloaded unor4wifi-update-windows.zip at step (6) of my previous instructions.
  6. In the folder listing of the unor4wifi-update-windows folder, hold the Shift key while clicking the right hand button on the mouse.
  7. From the context menu, click "Open PowerShell window here".
    Windows PowerShell will now open.
  8. Type the following command at the Windows PowerShell window command prompt:
    bin\espflash write-bin -b 115200 0x0 firmware\UNOR4-WIFI-S3-0.2.0-rc1.bin
    
  9. Press the Enter key.
  10. The PowerShell window might now show a list of the serial ports present on your computer.
    For example:
    Start flashing firmware
    [2023-07-11T06:39:09Z INFO ] Detected 2 serial ports
    [2023-07-11T06:39:09Z INFO ] Ports which match a known common dev board are highlighted
    [2023-07-11T06:39:09Z INFO ] Please select a port
    ❯ COM1
      COM43 - USB Serial Device (COM43)
    
    If so, use the key on your keyboard to select the port of the UNO R4 WiFi board from the list, and then press the Enter key.
  11. The terminal window will now show the following prompt:
    ? Remember this serial port for future use? (y/n) ›
    
    Press the N key on your keyboard.
  12. The flashing process should now start. Wait for it to finish, as indicated by output that looks something like this:
    Chip type:         esp32s3 (revision v0.1)
    Crystal frequency: 40MHz
    Flash size:        8MB
    Features:          WiFi, BLE
    MAC address:       dc:54:75:c4:c6:54
    [00:00:15] [========================================]     689/689     0x0
    
  13. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
  14. Disconnect the jumper wire you added at step (2) of the instructions.
  15. Connect the UNO R4 WiFi board to your computer with the USB cable again.

The board should now be recognized correctly in Arduino IDE once again.

2 Likes

Successfully uploaded the firmware as shown above but the option of OTA is still not offered on the IoT Cloud even though the board is shown as online and the dashboard works via WiFi with the board powered from a non-usb source.

Hi @steveinaustria

This is expected. The firmware adds support for using your UNO R4 WiFi board as an Arduino IoT Device, but Arduino Cloud does not support OTA uploads to this board.

As I already explained to you in your previous topic about this:

A post was merged into an existing topic: Uno R4 WiFi board is online but no OTA option for upload