Notifications
Clear all

Arduino on Linux mint issue

12 Posts
5 Users
0 Likes
6,131 Views
(@gary-h)
Member
Joined: 5 years ago
Posts: 6
Topic starter  

After trying to find the answer at the Arduino website to my issue I am here to ask for help. I had used windows in the past but have just switched to Linux Mint and now I am unable to upload to my red board (Sparkfun Uno). The board comes up under tools as well as the port but I get this error message.

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

I am willing to admit I am new to programming as well as Linux. Any help would be great.

Thanks, Gary


   
Quote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

I am not entirely familiar with Linux Mint but this seems to be a file permission issue.

Linux treats everything as a file, including "ttyUSB0", so you will need to open the "terminal program" go to the dev folder on your hard drive, and check the permissions.

Enter ls -l at the prompt, this should give you a full list of files and permissions in the folder.

Read up on "chmod" command first, and you will need to use this command with "sudo" and your password.

Try following this:

$ cd /dev/

$ ls -l

If ttyUSB0 is showing something other than

crw-rw-rw-

it is definitely a permissions issue!


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

@gary-h

You need to be in the dialout group to get to serial devices on Linux.

Do a:

sudo adduser your_user_id dialout

Log out then back in and this should fix it.

Scott


   
ReplyQuote
(@gary-h)
Member
Joined: 5 years ago
Posts: 6
Topic starter  

@triform

Hello and thanks for the help. I followed your advice and I am already in the dialout group. I'm still getting the error. I need to do some more learning before I get this resolved.


   
ReplyQuote
(@gary-h)
Member
Joined: 5 years ago
Posts: 6
Topic starter  

@pugwash

Hi, I have managed to get into the files and discovered ttyUSB0 is not there! I'm going to try and see how to get it, thanks for your help. This is proving to be a slippery uphill climb!


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@gary-h

Did you look while the device was connected to the USB port?

If not, plug it in and have another look!

Also, I read that Ubuntu is prone to the same problem and one suggestion was to uninstall "Arduino"

and reinstall using "sudo apt-get install arduino".


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@gary-h

Another thing, when I bought some Nano clones I had to install a driver for the CH340G chipset. After the first install, it still wasn't working but after another install, everything worked perfectly.


   
ReplyQuote
(@gary-h)
Member
Joined: 5 years ago
Posts: 6
Topic starter  

@pugwash

I have checked to see if TTYUSB0 is there with my board plugged in and it is. However I am still not able to access the port in the arduino IDE.

The next step was to Uninstall which I did then reinstalled through the terminal.

Now I see TTYUSB0 in the file but in the IDE it is not there.....in addition to the genuine uno board only a dot now. This is going to take me places I never went before! LoL.

TIME FOR AN OLD MAN TO GO GET A SANDWICH AND SCRATCH HIS BEARD,

Thanks for your input.

Gary


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @pugwash

and reinstall using "sudo apt-get install arduino"

I tried that first on mine. It gives you an older version of the IDE without all the board options and other options. I got the best version by installing from the .gz I got from the Arduino website


   
ReplyQuote
(@gary-h)
Member
Joined: 5 years ago
Posts: 6
Topic starter  

@spyder

I have been forced to more mundane things for the time being but I will get the latest version of the IDE and dive back into it tomorrow.

Thanks, Gary


   
ReplyQuote
teddy
(@teddy)
Member
Joined: 4 years ago
Posts: 41
 
Posted by: @pugwash

@gary-h

Did you look while the device was connected to the USB port?

If not, plug it in and have another look!

Also, I read that Ubuntu is prone to the same problem and one suggestion was to uninstall "Arduino"

and reinstall using "sudo apt-get install arduino".

FYI - Most of the new version of Linux now use just apt -- apt-get is no longer needed in most cases!

 


   
ReplyQuote
(@gary-h)
Member
Joined: 5 years ago
Posts: 6
Topic starter  

@teddy

My linux issue  solved itself when my laptop died finally. I decided to buy a new windows machine and as stated, my arduino issues are behind me. But thanks to all who offered help. It is now gardening season and electronics goes to the back burner until this coming October when the veggies get harvested!

Regards, Gary


   
ReplyQuote