Arduino Create Agent - Uno R4 WiFi unable to update firmware

I am making great progress. I have the Arduino Cloud Editor recognizing my Uno R4 WiFi, I can upload sketches from cloud editor, the Uno R4 WiFi shows up in the port selection window, sketches work great. Then I close the Editor and go to Arduino Create Agent, add new device, I select Arduino, the Agent says it found my Uno R4 Wifi. I go to select Uno R4 WiFi, and Agent begins to "Setup Device" but fails with message below.
Any advice? I tried the suggestions shown many times.... I also went to IDE 2.x and tried to update firmware and failed there also. (Tried selection 0.4.1 all the way down to 0.2.0) (btw - 1.8.19 states that it can not update a Uno R4, and that a 2.x IDE must be used to update a Uno R4 WiFi.)

Setup Device

We were not able to update the firmware

Something went wrong!

Please try to:

  • Restart the Create Agent on the computer.
  • Reconnect the device to the computer and make sure the power LED lights up.

Well, after some more tries, the Arduino Create Agent finally software bricked my Arduino Uno R4 WiFi device. I am disappointed that by just using the software provided by Arduino I could lose my device that was working perfectly well before I thought to try the Arduino Cloud IOT. And then when I researched the matter, I find that it has happened to others. I am trying to recover the Uno R4 following steps in the below link, but I have failed so far.

I am disappointed.

forum link to --- Arduino Firmware Update bricks Uno R4 WiFi


You should have used esp32 or esp8266 because they are cheap and are way more faster than uno r4.

kunalya,
I'm sore from kicking myself..... You are so right!

I have experience with ESP32 and ESP8266 but dont have experience with UNO R4 , so i recommand you to watch this , it might help you - https://www.youtube.com/watch?v=hl4uP2mEPn0

Thanks,

But, the video relies on the Uno being able to accept sketches, and my Uno R4 WiFi will no longer accept sketches. IDE 2.x also fails to be able to update my Uno R4 Wifi. I do find that the IDE 2.x id's my device as a WiFiduino32S3. Curious.......
But, even using that board selection, sketches do not load.

In summary, Arduino IDE told me to check for updates and therefore got me into this pickle.

Hi @shorenicehere

When you update the firmware on the UNO R4 WiFi board, it is put into a special mode. While it is in that mode it will be identified as a random ESP32-based board. The board remains in this mode after the firmware update process finishes or fails.

You should be able to put the board into the normal mode where it is once more detected as an UNO R4 WiFi by power cycling the board.

Please try this:

  1. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
  2. Connect the UNO R4 WiFi to your computer with the USB cable.

After doing that, the board should be identified as an UNO R4 WiFi once more. If it doesn't, add a reply here on this forum thread to let us know and we'll provide further assistance in recovering the board.

Thank you.

I unplugged the Arduino Uno R4 WiFi, then plugged it back in.

I tried to upload a blink sketch.

It failed.

My two screenshots show of what I saw:
20240309_11h02m32s_grim.png20240309_10h58m56s_grim.png

This indicates the standard firmware on the "bridge" module of the UNO R4 WiFi board has been replaced or corrupted. That could happen if you accidentally uploaded a sketch while the bridge module was in the boot mode (as happens when you do a firmware update), or perhaps when the firmware update procedure failed.

The board can be recovered by flashing the standard firmware to the bridge module. The tools we normally use for updating the firmware can't be used when the board is in this state, so it is necessary to use a command line procedure.

I'll provide 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-linux.zip" download link under the "Assets" section of the release page:
  6. Wait for the download to finish.
  7. Extract the downloaded file.
  8. Open a command line terminal in the unor4wifi-update-linux folder that was created when you extracted the downloaded unor4wifi-update-linux.zip file at the previous step in the instructions.
  9. Type the following command prompt:
    bin/espflash write-bin -b 115200 0x0 ./firmware/UNOR4-WIFI-S3-*.bin
    
  10. Press the Enter key.
  11. 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
    โฏ /dev/ttyACM0 - 7 Series/C210 Series Chipset Family USB xHCI Host Controller
      /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.
  12. 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.
  13. 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
    
  14. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
    :exclamation: It is essential to perform this step.
  15. Disconnect the jumper wire you added at step (2) of the instructions.
  16. 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.

ptillisch,

Success!!!!!!!!!!!!!!! I got back my Arduino Uno R4 WiFi device from never land..

Please forget my "disappointed" comment above. I am not disappointed any longer!

You have confirmed my faith in Arduino and the human race!!!!!!!!! I am beyond grateful. I have used Arduino products for 6 years, taught my grandson on their use and programming, and always appreciated them. Now, you have been the first interaction I have ever needed, and wow, I am impressed!

I took so long today to get back to you because I didn't have espflash on my machine and I had to figure that installation out first.

All my sketches have been tested and now all is GREAT!

Thank you.

One question: Do you think I should avoid using Arduino Create Agent on the Arduino Uno R4 WiFi for a few months? I mean, the first thing it does is check for firmware update. I have great fear thatThe Uno R4 issue would happen again. Instead, I will immediately use the advice of kunalya above and try a ESP32 device instead. Thanks.

Isaac

ps- a word of advice for anyone reading this that is sometimes dumb like me.....
On this line of instruction,

18. Type the following command prompt:
   bin/espflash write-bin -b 115200 0x0 ./firmware/UNOR4-WIFI-S3-*.bin

I did not notice the * until 30 minutes of failure.... Therefore in my case the instruction should be written as such, removing the * and replacing it with 0.4.1

$ espflash write-bin -b 115200 0x0 ./firmware/UNOR4-WIFI-S3-0.4.1.bin

Note: I did not need the bin/ at the beginning in my case. Your case may differ.

xxxxxxxxxxxxxxxxxxxxxxxxxxx
:~/Downloads/unor4wifi-update-linux $ espflash write-bin -b 115200 0x0 ./firmware/UNOR4-WIFI-S3-0.4.1.bin
[2024-03-09T18:36:56Z INFO ] :rocket: A new version of espflash is available: v3.0.0-rc.2
[2024-03-09T18:36:56Z INFO ] Detected 2 serial ports
[2024-03-09T18:36:56Z INFO ] Ports which match a known common dev board are highlighted
[2024-03-09T18:36:56Z INFO ] Please select a port
:heavy_check_mark: Remember this serial port for future use? ยท no
[2024-03-09T18:39:13Z INFO ] Serial port: '/dev/ttyACM0'
[2024-03-09T18:39:13Z INFO ] Connecting...
[2024-03-09T18:39:14Z INFO ] Using flash stub
Chip type: esp32s3 (revision v0.1)
Crystal frequency: 40MHz
Flash size: 8MB
Features: WiFi, BLE
MAC address: dc:54:75:ca:1c:cc
[00:00:26] [========================================] 881/881 0x0

1 Like

Nice to hear that . Sorry i was not able to help as i had limited knowledge with these boards . :+1:

Great news! I'm glad it is working again.

This is unexpected. espflash is included in the unor4wifi-update-linux.zip file you download at step (5) of the instructions. So it should be possible to follow the instructions without needing to install any additional dependencies. Anyway, it is not so important for the purposes of this discussion since you found a way to flash the firmware despite the challenges, but I am interested in understanding the problem so that I might find a way to make the procedure easier to follow when supporting others with similar problems in the future. I just double checked on my Linux machine and performing the instructions myself works as expected, using the espflash that is included in the ZIP file.

I don't think so. The important thing is that you must remember to always unplug and then replug the UNO R4 WiFi after the firmware update. It should show you a dialog to remind you of this:

I don't think there is anything to be afraid of. Even if it does happen again, now that you know the recovery procedure it shouldn't be a serious problem.

Another unexpected result. I intentionally used the * so that these instructions would work for others with a similar problem who might find this discussion during their researches in the future. Unfortunately, the version number is included in the filename of the firmware binary, which causes any instructions that specify an exact filename to become obsolete after each new release of the firmware. The use of the * wildcard in the command avoids this.

The command with the ./firmware/UNOR4-WIFI-S3-*.bin glob pattern works fine on my Ubuntu machine. I guess it is possible that it would not work on certain distros or machines with different shell globbing configuration.

This explains why you had to install espflash. The bin/ is essential in order to use the espflash that is included in the unor4wifi-update-linux.zip file you download at step (5) of the instructions. This is the structure of the extracted folder, from which the command is invoked:

unor4wifi-update-linux/
โ”œโ”€โ”€ bin/
โ”‚   โ”œโ”€โ”€ espflash
โ”‚   โ””โ”€โ”€ unor4wifi-reboot-linux64
โ”œโ”€โ”€ firmware/
โ”‚   โ””โ”€โ”€ UNOR4-WIFI-S3-0.4.1.bin
โ””โ”€โ”€ update.sh

So the bin/espflash causes the espflash executable you see under the bin subfolder to be used. It is true that if you have a global installation of espflash that is in your system path then you can remove the bin/ from the command to use the global installation, and that will likely work perfectly fine (as @shorenicehere found), but I would recommend using the espflash that is bundled with the firmware package because we can be certain the bundled one will work as expected in this context.

Ptillisch,

You have been so kind, thanks again. You are certainly dedicated.

I believe the details you have given above will help others. I would re-try all the steps as research for you but my wife says her gardening hobby comes first for a while and I am her shovel and spade guy.
Cheers

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.