Arduino Forum

Forum 2005-2010 (read only) => Hardware => Troubleshooting => Topic started by: mr_tim_esquire on Jun 25, 2009, 08:29 pm

Title: Tools -> Serial Port greyed out on Linux
Post by: mr_tim_esquire on Jun 25, 2009, 08:29 pm
Hi the board seems to be recognised, it shows up in /dev as ttyUSB0.  Dmesg shows:
Code: [Select]

ftdi_sio 5-2:1.0: FTDI USB Serial Device converter detected
ftdi_sio: Detected FT232RL
usb 5-2: FTDI USB Serial Device converter now attached to ttyUSB0
usb 5-2: New USB device found, idVendor=0403, idProduct=6001
usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 5-2: Product: FT232R USB UART
usb 5-2: Manufacturer: FTDI
usb 5-2: SerialNumber: A40018qs


The problem is the tools-> serial port oprion in the menu is greyed out and when i try to upload to the arduino i get the ERROR:

Code: [Select]

processing.app.SerialException: Serial port 'COM1' not found.  Did you select the right one from the Tools > Serial Port menu?


I have changed the serial port option in the arduino/lib/preferences.txt file to /dev/ttyUSB0 but i still get the COM1 error suggesting the preferences isnt being recognised.

any ideas??

thanks x
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: jezuz on Jun 25, 2009, 10:22 pm
not familiar with linux, but perhaps reinstalling the usb drivers or finding updated usb drivers and installing those?
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: madworm on Jun 26, 2009, 06:23 pm
@timmmmmeeee:

you need to make sure you actually have read/write permissions on /dev/ttyUSB0
if you have an up to date linux system device files are created on the fly by UDEV, so using chmod will only work until you re-plug the board.

on openSUSE users must be members of the UUCP group to get proper access rights to serial ports.

Code: [Select]
crw-rw---- 1 root uucp 4, 64 2009-04-14 12:16 /dev/ttyS0

Title: Re: Tools -> Serial Port greyed out on Linux
Post by: jesselks on Jul 04, 2009, 09:27 pm
@timmmmmeeee:
On Ubuntu 9.04 i386 desktop, it worked after I added my account to the "dailout" group (which requires re-login to enable):

Code: [Select]
$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 2009-07-04 15:23 /dev/ttyUSB0
$ sudo usermod -aG dialout <mylogin>
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: penguinpete50 on Sep 10, 2009, 12:48 am
I had the same problem on Fedora 11.  I had extracted the software in my Downloads directory.  I re-extracted in /usr/local/ and  the com port option in Tools is no longer greyed out.  After selecting /dev/ttyUSB0 it uploads to my Duemilanove which is now merrily blinkin' it's little backside off.
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: checkmate on Sep 10, 2009, 05:11 pm
as root try
[edit]echo "ciao" > /dev/ttyUSB0[/edit]

do you see the rx pin on arduino blinking?
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: penguinpete50 on Sep 12, 2009, 06:26 pm
This is an update and partial retraction of my entry of 10-09-2009: Tools>Serial Port is still greyed out...unless you are executing the binary as root.  I had forgotten to exit from my "su" session (required to get arduino-0017 into /usr/local/bin).  Latest status is Tools->Serial Port (and upload capability) are currently accessible only to root in Fedora 11.  Now, if I could figure out how to extend root privileges to my user account when accessing this application...
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: yakov on Jul 23, 2010, 07:22 pm
Sorry for the up, but I bought an Arduino Duemilanove board, and I'm having the same problem.

I use openSuse 11.3, but only like a final user, so, i dont know very much about linux configurations. The only way, here,  to upload the programs to arduino board, is like root.

madworm, says that opensuse users have to be part of UUCP group to can do it without root privileges, but i went to yast2, change my user privileges from 'User, Video', first to 'User, Video, UUCP', then to 'User, Video, UUCP, TTY', but didn't work in anyways.

Can anyone help me?

ps. Sorry about the poor english, i'm still learning.
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: madworm on Jul 23, 2010, 08:14 pm
Add the 'dialout' group as well, then it should work. There were some changes in 11.1 I think.

If you get errors about a "lockfile", then let us know. This can be fixed easily.
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: jpgr87 on Jul 23, 2010, 10:44 pm
PenguinPete:

In Fedora 11 and 12, you need to add your user to the "uucp" and "lock" groups.  To do so, run the 'system-config-users' utility (or go to system->administration->users and groups), double click on your username, and check off the required groups.  Then log out and back in.

If you upgrade to Fedora 12 or higher, you'll need to add yourself to "dialout" as well.

This is all in the documentation under the F12 instructions, I don't know why they don't include the groups for F11 and older...
http://www.arduino.cc/playground/Linux/Fedora
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: lestofante on Jul 24, 2010, 08:28 pm
i simply use arduino with sudo powers  ;D
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: Osgeld on Jul 25, 2010, 01:48 am
same
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: pluggy on Jul 25, 2010, 10:45 pm
Quote
(required to get arduino-0017 into /usr/local/bin)


I reckon this is the cause of many of the problems, I just install the prequisites using Synaptic (Ubuntu) and just plain old extract the Arduino program into my home folder.  The arduino program needs to write to some of its files and if its been put into the /usr/local/bin folder its going to need root privilages to run.  My arduino IDE is in /home/sv/arduino-0018, it works without a hitch, no root privileges, no messing with permissions...........
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: lestofante on Jul 25, 2010, 11:04 pm
arch linux updated at last version (it's a rolling release) without sudo power = Tools -> Serial Port greyed out, arduino in the home directory... but if i upload code will try with COM1, the serial port of my pc(i think).
installed via pacman only gcc-avr, no FTDI driver
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: pluggy on Jul 25, 2010, 11:11 pm
Quote
COM1


Sounds a bit 'Windows' , my PC's serial port is /dev/ttyS0 which would be called COM1 in another parallel universe :)
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: lestofante on Jul 26, 2010, 01:19 am
because Tools > Serial Port is gray i can't see the selection.. with sudo power i can confirm serial port is /dev/ttyS0
tryng to upload without sudo power:
Code: [Select]
Binary sketch size: 902 bytes (of a 30720 byte maximum)

processing.app.SerialException: Serial port 'COM1' not found.  Did you select the right one from the Tools > Serial Port menu?
     at processing.app.Serial.<init>(Serial.java:153)
     at processing.app.Serial.<init>(Serial.java:76)
     at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:73)
     at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:83)
     at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:55)
     at processing.app.Sketch.upload(Sketch.java:1498)
     at processing.app.Sketch.exportApplet(Sketch.java:1465)
     at processing.app.Sketch.exportApplet(Sketch.java:1420)
     at processing.app.Editor$46.run(Editor.java:2219)
     at java.lang.Thread.run(Thread.java:619)
processing.app.debug.RunnerException: Serial port 'COM1' not found.  Did you select the right one from the Tools > Serial Port menu?
     at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:93)
     at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:83)
     at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:55)
     at processing.app.Sketch.upload(Sketch.java:1498)
     at processing.app.Sketch.exportApplet(Sketch.java:1465)
     at processing.app.Sketch.exportApplet(Sketch.java:1420)
     at processing.app.Editor$46.run(Editor.java:2219)
     at java.lang.Thread.run(Thread.java:619)
processing.app.debug.RunnerException: Serial port 'COM1' not found.  Did you select the right one from the Tools > Serial Port menu?
     at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:93)
     at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:83)
     at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:55)
     at processing.app.Sketch.upload(Sketch.java:1498)
     at processing.app.Sketch.exportApplet(Sketch.java:1465)
     at processing.app.Sketch.exportApplet(Sketch.java:1420)
     at processing.app.Editor$46.run(Editor.java:2219)
     at java.lang.Thread.run(Thread.java:619)

/dev/ttyS0 with sudo power:
Code: [Select]

Binary sketch size: 902 bytes (of a 30720 byte maximum)

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding


seems a permission problem.. maybe ubuntu is more "user friendly" with USB/serial permission. I also don't need to use sudo power to mount devices, maybe it's a driver restriction, i don't know.
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: pluggy on Jul 26, 2010, 02:49 pm
Part of the problem (and part of its appeal on the other side of the coin) is that there are hundreds of distros of Linux.  Many linux gurus scoff at Ubuntu because its popular (just as many microcontroller experts scoff at Arduino because its popular).  Its popular because it's pretty easy to live with (I've played with quite a few of the major distros and Ubuntu is probably the easiest).  Popular means its well supported, which tends to help its popularity.   You'll get a lot more joy on forums if you are using something (no insult intended here) thats a little less obscure.  
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: yakov on Jul 26, 2010, 03:55 pm
I've changed the user groups, but still not working.
In console is showing the code:
Code: [Select]
check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

Title: Re: Tools -> Serial Port greyed out on Linux
Post by: impact on Jul 27, 2010, 08:44 pm
I just opened terminal, logged in as root (su) and then just run ./arduino ... it's working great
Title: Re: Tools -> Serial Port greyed out on Linux
Post by: caerdu on Aug 13, 2010, 03:56 pm
Hello,

better late than never!

"Others" need write access to /var/lock

via (example)

chmod o+rwx /var/lock

The user starting the IDE has to a member of the following groups:

dialout
uucp

(OpenSuSE 11.3)

Best regards

caerdu