BUG report: No DFU capable USB device available

Hi,

New fresh out of the package UNO R4 Minima

Arduino 2.3.2 with "Arduino UNO R4 Boards" version 1.2.0 freshly installed.
Version: 2.3.2
Date: 2024-02-20T09:54:08.669Z
CLI Version: 0.35.3
Copyright © 2024 Arduino SA

Host computer is Fedora 40, Cinnamon Desktop

The problem:

Attempt to compile and upload a simple blink sketch.

The sketch compiles without error or warnings but fails to upload.
The following messages are output:

Sketch uses 38780 bytes (14%) of program storage space. Maximum is 262144 bytes.
Global variables use 3940 bytes (12%) of dynamic memory, leaving 28828 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

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

I have swapped cables, changed to a different USB board, rebooted the host computer, pushed the reset twice

Aside to the above, holding down the reset button twice for a few seconds, renders the host computer unresponsive to keyboard or mouse inputs.

Further to the above, the dfu-util people told me that Arduino has their own customized version of dfu-util and that dfu-util only accepts bug reports against their own non-modified version.

So, any help here?

Hi @DrN.

In order for the Arduino development software to upload to the Arduino board, your Linux user account must have write permission for that device.

Standard user accounts don't have this permission by default. This error can occur when you attempt an upload without the necessary permissions. So it is necessary to configure your system to allow the upload. This is done by creating a special file.

I'll provide instructions you can follow to create that udev rules file:

  1. Open a command line terminal.
  2. Type the following command:
    echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"' | sudo tee --append /etc/udev/rules.d/60-arduino.rules && sudo udevadm trigger && sudo udevadm control --reload-rules
    
  3. Press the Enter key.
  4. If prompted for it, enter your Linux account password and press the Enter key.

The command should complete successfully. Now try uploading again. Hopefully the error will no longer occur.

Yes, that worked. Thank you.

Perhaps that should be added to the getting started documentation?

While we are on the subject, filling in the specs for the pins would be helpful too. I went to the processor document fo see that it has an internal LDO and the pins are on 3.3V CMOS level. It wasn't completely clear there either, but close enough to figure it out. The Arduino datasheet for examples seems to not have any mention of voltage levels (or maybe I missed it) except compatibility with earlier 5V boards.

Anyway, I am about to test a new library for MCP33131D, a header only C++ class. It works on teensy and hopefully Arduino alike. If so, the next questions may be how to contribute to the libraries.

You are welcome. I'm glad it is working now.

I think it would be a good idea!

It is documented in the Arduino Help Center:

(they used a different technique, but it generates the same udev rule file as my instructions)

I think the idea was to take a need-driven approach to the subject. Since this is a general purpose rule that works for all Arduino boards, the user might already have it installed on their system, so putting this complex procedure in the introductory documentation might make it seem unnecessarily overwhelming for some beginners. But for those who are impacted by the lack of permissions, the hope was that they would search for a solution in the Help Center and find the instructions there.

We have recently made an advancement in this area, which I think will significantly improve the user experience:

After that change, when the user uses the Arduino IDE Boards Manager to install the "Arduino UNO R4 Boards" platform, Arduino IDE will display a message to Linux users that provides instructions for easily creating the udev rules file. There hasn't been a new release of the platform since that change was made, so this is why you didn't see the instructions, but at least the improvement is in place and ready to be shipped to the users on the next release of the platform.

The best way to make requests for improvements to the documentation is to submit an issues to the public GitHub repository where the documentation's source content is maintained:

That will bring it to the attention of the people at Arduino who are responsible for the documentation maintenance.

You are also welcome to submit pull requests to propose changes to the documentation directly.

You should submit a pull request (PR) to the repository where the library's code base is hosted.

For official Arduino libraries, you can find the repositories here:

As for 3rd party libraries, they might be hosted anywhere, but most of them are on GitHub. You can usually get to the repository by searching the Arduino IDE Library Manager and then clicking the "More Info" link you will find in the library's entry in the search results.