Uno wifi rev2 - avrdude: usbdev_open(): WARNING: failed to set configuration 1

hello,

Upload message: "avrdude: usbdev_open(): WARNING: failed to set configuration 1: Device or resource busy "

I can't upload my programm to my Arduino uno wifi rev2, i bought it on Arduino Store. This is my configuration.

Tools -> Arduino uno wifi rev2

Tools -> Register emulation ATMEGA328

Tools -> Port /dev/ttyACM0

Tools -> Programmer: On Board ATmel mEDBG (Uno Wifi Rev2)

root@enterprise:/etc/udev/rules.d# ll /dev/ttyACM*
crw-rw-rw- 1 root dialout 166, 0 févr. 4 20:49 /dev/ttyACM0

I can't understand what's wrong in this configuration ?????

root@enterprise:/etc/udev/rules.d# cat 09-local.rules
#Arduino UNO
SUBSYSTEMS=="usb", ATTRS{idProduct}=="2145", ATTRS{idVendor}=="03eb", MODE:="666", GROUP="dialout"

I worked on this problem for 4 hours .... but no results.

Many thanks
Fred

Message from Linux kernel when i pluhg the board:

[ 4745.028202] usb 3-4: new full-speed USB device number 9 using xhci_hcd
[ 4745.179011] usb 3-4: New USB device found, idVendor=03eb, idProduct=2145
[ 4745.179016] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4745.179019] usb 3-4: Product: mEDBG CMSIS-DAP
[ 4745.179022] usb 3-4: Manufacturer: ATMEL
[ 4745.179025] usb 3-4: SerialNumber: 47430ECA48D361403143
[ 4745.180827] hid-generic 0003:03EB:2145.0009: hiddev0,hidraw0: USB HID v1.11 Device [ATMEL mEDBG CMSIS-DAP] on usb-0000:00:14.0-4/input0
[ 4745.181037] cdc_acm 3-4:1.1: ttyACM0: USB ACM device

error from kernel while uploading : [ 4291.789789] usb 3-4: usbfs: interface 1 claimed by cdc_acm while 'avrdude' sets config #1
[ 4293.254703] usb 3-4: reset full-speed USB device number 8 using xhci_hcd

Please do this:

  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload
  • After the upload fails you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the forum toolbar).

Hello PERT,

This is the log : compile(in attachment log.txt file) + flash


avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is “/home/fred/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14/etc/avrdude.conf”
User configuration file is “/home/fred/.avrduderc”
User configuration file does not exist or is not a regular file, skipping

Using Port : usb
Using Programmer : xplainedmini_updi
Overriding Baud Rate : 115200
avrdude: usbdev_open(): Found mEDBG CMSIS-DAP, serno: 47430ECA48D361403143
avrdude: usbdev_open(): WARNING: failed to set configuration 1: Device or resource busy
avrdude: max packet size expected 512, but found 64 due to EP 0x81’s wMaxPacketSize
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
AVR Part : ATmega4809
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 61 61 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 0 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse6 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse7 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse8 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00
data 0 0 0 0 no 0 0 0 0 0 0x00 0x00
usersig 0 0 0 0 no 64 64 0 0 0 0x00 0x00
flash 0 0 0 0 no 49152 128 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 256 64 0 0 0 0x00 0x00

Programmer Type : JTAGICE3_UPDI
Description : Atmel AVR XplainedMini in UPDI mode
ICE hardware version: 0
ICE firmware version: 1.19 (rel. 57)
Serial number : 47430ECA48D361403143
Vtarget : 5.00 V
JTAG clock megaAVR/program: 0 kHz
JTAG clock megaAVR/debug: 0 kHz
JTAG clock Xmega: 0 kHz
PDI clock Xmega : 0 kHz

avrdude: Partial Family_ID returned: “mega”
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: erasing chip
avrdude: reading input file “/tmp/arduino_build_744829/Blink.ino.hex”
avrdude: writing flash (1534 bytes):

Writing | ################################################## | 100% 0.49s

avrdude: 1534 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_744829/Blink.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_744829/Blink.ino.hex:
avrdude: input file /tmp/arduino_build_744829/Blink.ino.hex contains 1534 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.39s

avrdude: verifying …
avrdude: 1534 bytes of flash verified

avrdude done. Thank you.

log.txt (12.5 KB)

I don't have an answer for you regarding the warning. However, it appears that the upload completes successfully. Is this correct? If so, I would either ignore the warning or simply treat is as an intellectual challenge to work on at my leisure.

Hello,

Yes the upload completes successfully, but it's a really strange behaviour ...

I use this udev configuration:

ll /etc/udev/rules.d
total 4
-rw-r--r-- 1 root root 1349 Feb 5 10:10 99-adafruit-boards.rules

cat 99-adafruit-boards.rules

SUBSYSTEM=="usb", ATTRS{idProduct}=="2145", ATTRS{idVendor}=="03eb", MODE="0660", GROUP="dialout"

Fixes issue with hanging references to /dev/ttyACM* devices on Ubuntu 15.04.

ATTRS{idVendor}=="03eb", ENV{ID_MM_DEVICE_IGNORE}="1"

General rule (actually covers all Adafruit boards with same USB VID):

ATTRS{idVendor}=="03eb", MODE="0660", GROUP="adm"

==> with these commands:

sudo udevadm control --reload-rules

sudo udevadm trigger

==> add user to dialout and adm group in /etc/group

I'm not very experienced with this sort of thing on Linux. I do use the Arduino IDE on Linux occasionally but so far I've been lucky enough that everything just works.

I know that in addition to the dialout group thing, some people have problem with programs trying to take over virtual serial ports. The common offender is "modemmanager". I would associate that with an upload error, rather than the warning though.