I have an uno r4 minima and it is one of my only arduino boards with a lot of memory. I bought it and it worked for some time then it started giving errors when uploading. Here is the error:
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: Failed to retrieve language identifiers
dfu-util: Failed to retrieve language identifiers
Opening DFU capable USB device...
Device ID 2341:0069
Run-Time device DFU version 0101
Claiming USB DFU (Run-Time) Interface...
Setting Alternate Interface zero...
dfu-util: Cannot set alternate interface zero: LIBUSB_ERROR_OTHER
dfu-util: Cannot set alternate interface zero: LIBUSB_ERROR_OTHER
I left it for a few months but when I tried to upload my new program that needed a lot of storage to the board, it started working again. Sadly, after a few days it gave the error again. I tried to find help online but I couldn't find anything.
Please help.
Hi @kinghappy. Please try this experiment and then report back here with the results:
- Press and release the reset button on your board quickly twice.
The built-in LED on the board should start pulsing.
ⓘ The double reset puts the board into the update mode. It will remain in this mode until the board is reset normally, powered off, or an upload is performed.
- Select Sketch > Upload from the Arduino IDE menus.
An "Upload" operation will start.
- Wait for the upload to finish.
Did the LED go into the pulsing state as expected at step (1)?
Was the upload successful, or did it fail again with that "dfu-util: Cannot set alternate interface zero: LIBUSB_ERROR_OTHER" error?
Somehow that fixed it. It may be that it works for a while then stops working. Should I double tap the button every time I upload?
This should not be necessary normally.
At the start of the upload process, Arduino IDE (or more specifically the dfu-util tool used by Arduino IDE to perform the upload) sends a special signal to the Arduino board via its USB interface. The purpose of this signal is to tell the board to go into a special mode where it can accept the upload.
The tricky thing about the boards with native USB capability like your board is the USB code is running on the same microcontroller as your sketch. This means your sketch code might be able to somehow interfere with the board's ability to recognize that signal. In this case, the board will not automatically switch to the mode that is required to perform an upload, which causes the upload to fail.
This can be unexpected to those who previously mainly worked with the boards like Uno and Mega with a dedicated USB chip that can never be affected by the sketch code.
When a board is in this state, you can't upload normally any more. However, the situation is really not so bad because it is possible to manually put the board into the update mode, by performing the double reset procedure.
The fact that you were not able to upload normally, but were able to upload after the double reset indicates that something in the sketch program that was running on the board at the time of the upload failure might have caused the board to be in a state where it couldn't recognize the signal from dfu-util.
If so, the task would be to determine whether this is caused by a bug in your sketch. You can verify this by uploading a simple sketch like the one from File > Examples > 01.Basics > BareMinimum in the Arduino IDE menus. If the uploads work normally after uploading that sketch, but not after uploading the previous sketch you were using, then you will know the issue is caused by that other sketch code. If you don't know what is causing this, you can post your sketch code in a reply here on this forum thread to get assistance from the forum helpers with the problem.
Interesting... It works now thanks so much
You are welcome. I'm glad it is working now.
Regards,
Per