DFU Error - Cannot Upload Sketch to R4 Minima

IDE 2.1.1 now allows me to upload sketches to an Uno R4 WiFi, but I still cannot upload sketches to a Minima.

For a simple sketch that uploads fine to an R4 WiFi I get the following error message on the Minima:

Sketch uses 33716 bytes (12%) of program storage space. Maximum is 262144 bytes.
Global variables use 2524 bytes (7%) of dynamic memory, leaving 30244 bytes for local variables. Maximum is 32768 bytes.
dfu-util 0.11-arduino4

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util / Tickets

Cannot open DFU device 2341:0069 found on devnum 7 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available
Failed uploading: uploading error: exit status 74

Is there anything I can do to fix this?

1 Like

@flynace
I'm not aware of this, but I'll keep an eye on the issue

Are you running native windows or in a VM?
do you have some system restrictions that would not allow access to raw USB peripherals?

I've had troubles on some particular VMs, but natively the tool should just see the resource and move on with firmware upload.

In particular in DFU mode with dfu-util there's no proper bootloader on the board which might cause some re-enumeration issues.

can you double-tap the reset button on the Minima and retry the upload?
don't worry about the serial port to select, it should just push through at low level

Hi @ubidefeo - I am using a standard Dell Precision 5540 laptop with Windows 10 and no restrictions that I am aware of.

When I double tapped the reset button the Minima status changed to disconnected and a Windows Notification popped up saying 'Setting up a Santiago'.

Trying to upload a sketch produced the same error message and it takes a while before the Minima shows reconnected to the COM port.

I am having similar issues with a Giga R1, so I assume it is my Windows installation, but I don't know what I can do to fix it.

At least the R4 WiFi is now working, so thank you very much for that!

1 Like

I had this issue but when i ran

C:....\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.0.1\drivers\dpinst-amd64.exe as an administrator I was able to upload sketches.

Hope this helps and thanks @ubidefeo and extended arduino team for this cool microcontroller.

3 Likes

@flynace , try manually running dpinst-amd64.exe as suggested by @the2ndtierney

Were you part of the preview users group?

Hi all, I have followed instructions of @the2ndtierney but without success.
I have reinstalled Arduino last version 2.1.1 CLI 0.32.3 but a COM port associated to Arduino R4 MINIMA doesn't appear.

My issue also appears to be a permissions problem - thank you @the2ndtierney !

My user account did not have the authority to install the DFU USB drivers.
So even though the installation of R4 core appeared to succeed after I entered my password to modify system files, the actual installation failed.

This is what my device manager listing looked like:
DFU

I just never used a board before Minima which required an admin account to work.

Thank you for the help!

1 Like

A post was split to a new topic: "avr/io.h: No such file or directory" error when compiling for UNO R4 Minima

I know this isn't a Windows fix, but I had the same issue under Linux (Fedora) and finally fixed this with the following code:

# UDEV Rules for Arduino UNO R4 boards
#
# This will allow reflashing with DFU-util without using sudo
#
# This file must be placed in:
#
#       /etc/udev/rules.d
#
# After this file is installed, physically unplug and reconnect the device.
#
#       Arduino UNO R4
#       --------------
#
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0069", GROUP="plugdev", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0369", GROUP="plugdev", MODE="0666"
#
# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups.
#

placed in the file "/etc/udev/rules.d/99-arduino-uno-r4.rules".

This is far from only my work, credit should go to Julien Vanier and a a whole bunch of people who solved this same problem for 'Particle' boards some time ago.

Jeff.

7 Likes

Thank you @GreyLimit

@GreyLimit
Thank you.
This solution worked on my Ubuntu workstations :slight_smile:

6 posts were split to a new topic: Upload to UNO R4 Minima fails: "LIBUSB_ERROR_ACCESS"

Apparently like many others, code won't upload to my R4 MINIMA from my WIndows 10 desktop. In Device Manager "Other Devices" I see DFU-RT Port and in Ports I see USB Serial Device (COM13), which is the port that shows up under the IDE "Tools--> Port tab
When I try to upload it says no DFU capable device available. I tried running DPinst_x64.exe but Windows says it can't do that on my computer.
What is the problem here and how can I fix it?? I'm currently using IDE 1.18.15. On another computer I have IDE 2, but the R4 MINIMA won't upload sketches there either.

@brooksdr
if on Win 10 you're having trouble running the driver installer it might be a permission issue.
Can you try right-click the installer and choose "Run as Administrator"?
It will request for your system's password.
These system changing programs have to be installed by a system admin

Well, I tried that and this is what I get (a message no different than when I tried to run it not as an administrator):

@ptillisch any Idea why @brooksdr can't install the drivers on Win10?

Hi @brooksdr

Please do this:

  1. Click the Windows "Start" button.

  2. Type powershell in the search field.

  3. Select "Windows PowerShell ISE" from the search results.
    A "Windows PowerShell ISE" window will open.

  4. Click on the terminal panel of the "Windows PowerShell ISE" window.
    The terminal panel is the part that has the command prompt like PS C:\Users\per>

  5. Type the following command:

    cd "${Env:LOCALAPPDATA}\Arduino15\packages\arduino\hardware\renesas_uno\1.0.1"; & ".\post_install.bat"
    
  6. Replace <username> in the command with your name or any nickname you want to attribute your Git commits to.

  7. Press the Enter key.

  8. A "User Account Control" dialog should now appear with the message:

    Do you want to allow this app from an unknown publisher to make changes to your device?

    dpinst-amd64.exe

    If so, click the "Yes" button in the dialog.

The driver installation should complete successfully and after the "DFU-RT Port" device should be shown under the "Universal Serial Bus devices" section of the Windows Device Manager tree instead of under the "Other devices" section, and without a :warning: icon overlay. If so, please try uploading to your UNO R4 Minima board again. It should finish successfully this time.

If the procedure above did not work as I described, post a reply here on the forum with a detailed description of exactly what happened. Make sure to include the full and exact text of any warning or error messages you encountered while following the instrucions.

OK. The DFU-RT Port now shows up where you said it should:

But the IDE still won't compile a simple sketch. And yes, I've selected R4 MINIMA and it knows about port 13 being for the R4 MINIMA.

Aha... I restarted my computer and my simple blink sketch compiled and ran. Perhaps now I won't have more problems. Thanks very much for your patient help! It would be nice to have a more "up front" fix for this problem, perhaps when adding support for the board to your IDE, as I assume I'm not the only one (Windows user?) who has had it...

Q7L03k0OZy9PGKSI.png

I'm glad everything is working now. Thanks for taking the time to post an update.

The Arduino IDE automatically runs that post_install.bat batch file that installs the drivers when you install the "Arduino UNO R4 Boards" platform via the Arduino IDE Boards Manager. The uploading problem you experienced should only occur if the user denied permissions for the driver update in that "User Account Control" dialog.

As for the compilation errors you encountered, those are definitely unexpected. I have seen this occur a few times over the years. I think the problem is caused by a corrupted compilation cache. Arduino IDE caches the objects generated by the compilation and reuses them on subsequent compilations. If that cache was somehow corrupted then it might cause mysterious compilation errors like this. Arduino IDE 1.x clears the compilation cache when you exit the IDE so the workaround for this rare problem is to simply exit the IDE and then start it up again. This is likely why the problem no longer occurred after you restarted your computer. The reports of this problem are quite rare and nobody has found a way to reproduce it so I'm not sure whether it is caused by a bug in Arduino IDE or if the cached files are being corrupted by an external cause.