Arduino UNO R4 uploading firmware

So, I just got the Arduino UNO R4 wifi and was trying to test connecting to my Wi-Fi with the example code given in the wifiS3 examples, but it said I needed to upgrade my firmware. I'm pretty new to all this so I just looked up how to do that and it brought me to this UNO R4 WiFi Custom Firmware Upload to ESP32 (Advanced) | Arduino Documentation I realized later that this actually was for flashing custom firmware and that you can just upgrade the firmware with the firmware tool in Arduino IDE :confused: . Anyways I was following the steps and got all the way to the part where it says erase flash memory and managed to do that but now my Arudino IDE recognizes my uno R4 as the ESP32 and I can't actually upload anything anymore ad the RX stays on :frowning: . Im pretty sure I just need to upload the correct firmware the same way I erased the firmware but Im not exactly sure how to do that I would not like to mess my board up more than I already have :cry: . If anyone could help save my board it will be much appreciated. I can also provide more details from what I have tried and how the board ended up this way.

Welcome to the forum

You started a topic in the Uncategorised category of the forum

Your topic has been moved to a relevant category

Also, I've been trying to follow this [Update the connectivity module firmware on UNO R4 Wi-Fi – Arduino Help Center] (https://support.arduino.cc/hc/en-us/articles/9670986058780-Update-the-connectivity-module-firmware-on-UNO-R4-WiFi#espflash) and this:

Short the upload pins for the esp32s3 then connect it to the USB port, install python then:

pip3 install esptool

esptool --chip esp32s3 --port <com port> erase_flash

esptool --chip esp32s3 --port <com port> write_flash -z 0 <firmware.bin>

Use the .bin file you find inside the zip here:

https://github.com/arduino/uno-r4-wifi-usb-bridge/releases/download/0.2.0/unor4wifi-update-windows.zip

I used the bin file and shorted the download pin (I'm not sure if that's the same as the upload pin but I didn't see an upload pin on the pinout, so I assume they're the same) but then I get an access denied message and something that says this app can't run on your PC. I don't see what the issue would be though because I'm operating on windows 11.

how to write this code i am getting error message like this. could you help me.

C:\>C:\Users\Dava\AppData\Local\Programs\Python\Python312\python -m esptool --chip esp32s3 --port COM8 write_flash -z 0 UNOR4-WIFI-S3-0.3.0-rc1.bin

usage: esptool write_flash [-h] [--erase-all] [--flash_freq {keep,80m,60m,48m,40m,30m,26m,24m,20m,16m,15m,12m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size {detect,keep,256KB,512KB,1MB,2MB,2MB-c1,4MB,4MB-c1,8MB,16MB,32MB,64MB,128MB}]
                           [--spi-connection SPI_CONNECTION] [--no-progress] [--verify] [--encrypt]
                           [--encrypt-files <address> <filename> [<address> <filename> ...]]
                           [--ignore-flash-encryption-efuse-setting] [--force] [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: 'UNOR4-WIFI-S3-0.3.0-rc1.bin'

am i wrong write the directory of bin file?

If you copy were UNOR4-WIFI-S3-0.3.0-rcl.bin is as a path and then paste it should work so it should look like this: C:\Users\moren>esptool --chip esp32s3 --port COM6 write_flash -z 0 "C:\Users\moren\OneDrive\Desktop\firmware1\unor4wifi-update-windows\firmware\UNOR4-WIFI-S3-0.2.0-rc1.bin"

So Ive been following this again: Update the connectivity module firmware on UNO R4 WiFi – Arduino Help Center but as soon as i run the command i get this error:

PS C:\Users\moren\Downloads\unor4wifi-update-windows (4)\unor4wifi-update-windows\firmware> bin\espflash write-bin -b 115200 0x0 firmware\UNOR4-WIFI-S3-0.3.0-rc1.bin
bin\espflash : The module 'bin' could not be loaded. For more information, run 'Import-Module bin'.
At line:1 char:1

  • bin\espflash write-bin -b 115200 0x0 firmware\UNOR4-WIFI-S3-0.3.0-rc1 ...
  •   + CategoryInfo          : ObjectNotFound: (bin\espflash:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CouldNotAutoLoadModule
    
    
    

Why doesnt this work?

Hi @caiden701. The reason it doesn't work is because you opened PowerShell in the firmware subfolder of the extracted folder instead of in the root of the extracted folder.

If you still have the PowerShell window open, type this command:

cd ..

Then press the Enter key.

This will change the directory up one level. If you now run the bin\espflash write-bin -b 115200 0x0 firmware\UNOR4-WIFI-S3-0.3.0-rc1.bin, it should work as expected this time.

OOOOOOOO Thank you so much!

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

I am getting an error about not finding the file specified.


Ive tried redownloading the file and making sure I am in the root folder but cannot get it to work.

Any help would be great

Hi @kwintenhale. Since I'm not sure of exactly which procedure you followed before you encountered that problem, I think it will be best for you to start fresh. I'll provide complete instructions you can follow to do that:

  1. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
  2. Use a jumper wire to connect these two pins ("DOWNLOAD" and "GND") on the 2x3 male header that is near the USB socket on the UNO R4 WiFi board:
    📷

    Arduino - CC BY-SA 4.0 (cropped)

  3. Connect the UNO R4 WiFi board to your computer with a USB cable.
  4. 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
  5. Click the "unor4wifi-update-windows.zip" download link under the "Assets" section of the release page:
  6. Wait for the download to finish.
  7. Extract the downloaded file.
  8. Start Windows "File Explorer".
  9. Open the unor4wifi-update-windows folder that was created when you extracted the downloaded unor4wifi-update-windows.zip file at the previous step in the instructions.
  10. In the folder listing of the unor4wifi-update-windows folder, hold the Shift key while clicking the right hand button on the mouse.
  11. From the context menu, click "Open PowerShell window here".
    Windows PowerShell will now open.
  12. Type the following command at the Windows PowerShell window command prompt:
    bin\espflash write-bin -b 115200 0x0 (Get-Item .\firmware\UNOR4-WIFI-S3-*.bin).FullName
    
  13. Press the Enter key.
  14. 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
      COM42- USB Serial Device (COM42)
    
    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.
  15. 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.
  16. 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] [========================================]      826/826     0x0
    
  17. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
    :exclamation: It is essential to perform this step.
  18. Disconnect the jumper wire you added at step (2) of the instructions.
  19. 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.


Please let me know if you have any questions or problems while following those instructions.

1 Like