Arduino Uno WiFi Rev2 will not upload IDE 2.0.3 using megaavr 1.8.8

I'm trying to load the Blink.ino sketch, from the File/Examples/Blink link in the IDE. It works in windows. But windows10 is going to die for me when it is no longer supported. I have Linux.

I am using linux Mint MATE 21.1, Arduino Uno WiFi Rev2 will not upload in [Flatpak]Arduino IDE 2.0.3 using Board Manager/megaavr 1.8.8.

I am user in dialout group:
user:~$ groups,

I have selected the correct port dev/ttyACM0: exists in /dev,

user:~$ lsusb
Bus 001 Device 006: ID xx:xx Atmel Corp. ATMEGA328P-XMINI (CDC ACM)
updates and follow device from port to port

I have run the script buried in ~.arduino15/packages/arduino/hardware/megaavr/1.8.8/scripts/create_dfu_udev_rule location.

I did not load a driver for the USB ports CH### [I forgot the numbers] because I AM running a current, up-to-date OS, and the linux-help/chat suggested instead to
sudo apt remove brltty [no change]

i've run dmesg |tail --lines=20, dmesg -w, unplugged the port and followed it all the way around all available ports.

It did: however, upload with the windows Arduino IDE2.

I've read about how it doesn't mean anything, it's just a warning - but I'm pretty sure they are not considering the detail where the upload fails.

I've seen where a chmod or adduser fixed the problem; but, not so in my case. It seems like a new twist on a recurring error.

Here is the message I get.

Sketch uses 1510 bytes (3%) of program storage space. Maximum is 48640 bytes.
Global variables use 22 bytes (0%) of dynamic memory, leaving 6122 bytes for local variables. Maximum is 6144 bytes.
"/home/name/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/home/name/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega4809 -cxplainedmini_updi -Pusb  -b115200 -e -D "-Uflash:w:/home/name/.var/app/cc.arduino.IDE2/cache/arduino-sketch-1B4912996D9E15F3B056FC1C75BA93E3/Blink.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x02:m" "-Uflash:w:/home/name/.arduino15/packages/arduino/hardware/megaavr/1.8.8/bootloaders/atmega4809_uart_bl.hex:i"

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

         System wide configuration file is "/home/tux/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/tux/.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(): cannot open device: Permission denied
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

I could not find /home/tux/.avrduderc and wouldn't know how to update it if I did.

I think it has something to do with permissions or a name jtag3 is looking for, that is missing or in the wrong location.

avrdude. what does that mean?

I have no experience with the Uno WiFi Rev2 nor with the xplained board.

I think that this is where it goes wrong. Can you compare it with the output on your Windows system? Are you using the same IDE version in Windows and in Linux?

How did you select the board and port in IDE 2.0? From the dropdown or from the tools menu. The dropdown might be wrong (I have had that with a different board package where Nanos where detected as Thinary Nanos). I suggest that you manually select the board and the port from the tools menu and see if that solves the issue.

I think that you need to install a board package for the xplained. If that is indeed the case, do both installs (Windows and Linux) have the xplained board package installed?

Note that I might be totally on the wrong track; it's just some ideas based on my understanding of the IDEs.

There may be a bug with Linux and the Arduino devices which require the 1200bps "touch" to enter programming mode.

https://forum.arduino.cc/t/cant-upload-sketches-to-nano-every-jtagmkii-getsync-sign-on-command-status-1/1058014/13

The OP in the referenced thread came up with a work around. There's also some more information on GitHub where the bug was reported.

sterretje:
I will check the Windows output, but I don't recall it giving me any output, Windows just uploaded the file and had no problem. Like Windows usually does not and Linux does with everything else.

The questions I can answer for now is I verified i updated the board's package in Board Manager and selected the correct board using Tools/Board/Arduino megaAVR Boards/~WiFi Rev2; then, also using Tools/Port/ to select the only [and correct] port available /dev/ttyACM0 (Brd Name). I generally don't use dropdown menus if I can remember the keyboard shortcuts that I look up until I learn them.

I searched xplained in the MATE package manager and found no entries. I don't know how to get the IDE to load xplained. I will look for it in the file manager in Win10's IDE2 but found no entries in MATE. Is explained package loading done with the IDE Board Manager? Board Manager shows the Arduino megaAVR Board v1.8.8 INSTALLED.

:penguin:

cattledog:
thanks for the link. I will get back here if anything pans out from...

That's probably a setting in the IDE under file -> preferences. To get the output that you provided in the opening post, you'll have to enable verbose output during upload.

The windows output shows the same

Using Programmer : xplainedmini_updi

I don't know how it happened but I deleted my post when I selected the reply button in the bottom left. I expect it will happen again, but if not here it is again.

Anyone can explain how avrdude User configuration file is created? Is there a way to force one to exist? maybe avrdude would like me after that.

OK, than that was not it.

Don't worry about the missing config file. avrdude first looks in the directory from where you issued the command for the config file; if not found, it will use a global config file. And you have that one based on the output of your opening post

System wide configuration file is "/home/tux/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"

No experience with your board so I can't help further; sorry.

Hi @RussianTrollFarm

I am able to reproduce this on a machine where I haven't run the script from this location:

~/.arduino15/packages/arduino/hardware/megaavr/1.8.8/scripts/create_dfu_udev_rule

But after running that script I can upload to my Uno WiFi Rev2 no problem.

Please try running the script again just to be sure. Note that you must run it using sudo.

1 Like

Thanks goes to the mighty ptillisch for perceiving the need for root execution of the script. I thought simply double "clicking" the file in the Linux Mint MATE 21.1 file manager would execute the script. Not so. Looking up how to run a script really helped also. I am providing these additional details just in case they are in some way helpful, but now that I can upload and run sketches, may not be all that helpful.

I was able to load a Temp/Humidity sketch and run in Win10 that output to the Serial Monitor. Then, I was able to get the Serial Monitor in the Linux Arduino 2.0.3 to work when the proper baud rate was selected. I then figured that confirms the connection, the port, the right board - it was likely a permission of some sort was not configured correctly.

Then - as I said - ptillish provided the solution to run the script as root and now I can go on to struggle with the bluetooth connections. I'm pretty sure I will be asking about this in the near future but someone has already put feelers out so I am watching:
?Bluetooth w/wifi rev2?

Thank You Very Much for helping me get the Linux Arduino 2.0.3 upload working on Arduino WiFi Ver2 ptillisch.

You are welcome. I'm glad it is working now. Thanks for taking the time to post your findings!

Regards,
Per

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