Problem with avrdude and blinking board

Good day,
I have an Arduino Uno R3 and I am using the newest version of the IDE on Ubuntu 22.10.
The built-in LED light is going on and off for 1 second at a time since I first plugged the board in (is that normal?) and when I upload a simple blink program, this is the response I get:

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/hans/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
     User configuration file is "/home/hans/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/ttyACM0
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

Thank you in advance and I appreciate your help.

Yes, it's normal. The blink sketch is programmed into it in the factory, to verify that it works.

How do you know that your device is on that serial port? Did you add your user account to the "dialout" group to get permission to use it?

Hello aarg, thank you for the reply!
What is a dialout group and a serial port?

Group permissions in Unix allow you to access shared resources on a limited basis. The dialout group is documented in the Linux documentation on serial ports.

It is a way to allow end users to run applications that use the serial ports, without having the root permission that is required to access raw hardware.

It's not the frat party that MS created, where once you get in the door, anything goes...

Actually, only an admin can add you to the dialout group. So you have to make yourself admin for a while to do that.

Are you really asking me what a serial port is? That level of lack of familiarity will make things nearly impossible. Just use a Windows machine.

You'll have to study Linux a bit. To sort your current issue, arduino dialout - Google Search.

In the old days, communication between e.g. your PC and a device was often done using serial communication; it was suitable for longer distances than the parallel port. Physically it was DB-9 or DB-25 connector with RS232 levels. See e.g. Serial port - Wikipedia.

For communication between PC and devices, nowadays USB is mostly used. In the context of the Arduino, a serial port is simulated over the USB port.

Thank you for your replies.
I have added my user to the dialout group by doing:

sudo usermod -a -G dialout root

I have followed this link: https://support.arduino.cc/hc/en-us/articles/360016495679-Fix-port-access-on-Linux

When I tried to do everything I was faced with the same error message:

Using board 'uno' from platform in folder: /home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6
Detecting libraries used...
/home/hans/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/sketch/Test.ino.cpp -o /dev/null
Generating function prototypes...
/home/hans/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/sketch/Test.ino.cpp -o /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/preproc/ctags_target_for_gcc_minus_e.cpp
/home/hans/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/hans/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/hans/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/sketch/Test.ino.cpp -o /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/sketch/Test.ino.cpp.o
Compiling libraries...
Compiling core...
Using precompiled core: /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-core-cache/core_arduino_avr_uno_3b07e051ea8fadf632ad34b44017f31c.a
Linking everything together...
/home/hans/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/Test.ino.elf /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/sketch/Test.ino.cpp.o /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/../arduino-core-cache/core_arduino_avr_uno_3b07e051ea8fadf632ad34b44017f31c.a -L/home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A -lm
/home/hans/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/Test.ino.elf /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/Test.ino.eep
/home/hans/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/Test.ino.elf /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/Test.ino.hex

/home/hans/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/Test.ino.elf
Sketch uses 1918 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 184 bytes (8%) of dynamic memory, leaving 1864 bytes for local variables. Maximum is 2048 bytes.
"/home/hans/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/home/hans/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -carduino "-P/dev/ttyACM0" -b115200 -D "-Uflash:w:/home/hans/.var/app/cc.arduino.IDE2/cache/arduino-sketch-79EFDBC814DDD6CABDF06E4D67F7A81A/Test.ino.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/hans/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
     User configuration file is "/home/hans/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/ttyACM0
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

Thank you in advance!

Did you log out and in after adding yourself to the group?

Run dmesg and check if there is something called BRLTTY. I'm not sure what the side effects of BRLTTY are when it comes to Arduino but it's known to cause havoc. Uninstall or disable it and see if it solves the issue.

There is no BRTLLY as far as I can see, but I restarted the computer. How do I log out?
Thank you once again

My last Ubuntu was 12.04. I barely use it. It was somewhere where you also can pick the shutdown if I'm not mistaken (right top).

But restarting the computer would also have worked.

Can't help you further, I think.

I'll update you once I get home

It has magically worked, everything works now.
I will update if something goes wrong.
Thank you so much for your help!!

1 Like

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