You are not logged in.

#1 2014-01-07 18:02:40

subraizada3
Member
Registered: 2013-06-02
Posts: 90

[SOLVED] Arduino Serial Port Greyed Out

I have an Arduino Duemilanove and installed arduino-beta from the AUR using yaourt.

Inside the tools menu, I can select the correct board type and processor, but the port option is always grayed out.

Running with sudo doesn't change anything, and I have added my user to the uucp and lock groups. Some websites suggest adding the dialout group, but that group doesn't exist on my computer.

When I plug in the Arduino, dmesg shows this:

usb 3-1.1: new full-speed USB device number xx using ehci-pci

There aren't any ttyUSB or ttyASM files in /dev, but there are /dev/ttyS0, 1, 2, and 3.

Last edited by subraizada3 (2014-01-08 13:41:13)

Offline

#2 2014-01-07 18:24:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,210

Re: [SOLVED] Arduino Serial Port Greyed Out

Moving to AUR issues.

Make sure you are a member of the lock group.  Last time I played with Aruino, I had to change the group for /var/lock and/or /var/run to 'lock' .   At issue is the inability to set a lock to capture the serial port.

BTW: You might launch the IDE from a terminal and look at the litany of errors; they give some pretty good clues as to the issue.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-01-07 18:30:07

subraizada3
Member
Registered: 2013-06-02
Posts: 90

Re: [SOLVED] Arduino Serial Port Greyed Out

Aha! Well, kind of.
I have only run sudo arduino from a terminal.
After running it without sudo, it gives these errors:

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

I am a member of the lock group and I have logged in/out, I'll try rebooting it.

Offline

#4 2014-01-07 18:33:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,210

Re: [SOLVED] Arduino Serial Port Greyed Out

Go check  /run/lock and /var/lock.  If the group is root, chgrp those nodes to lock.  If that works, either do it every time you want to run Arduino after boot, or create a udev rule to make it happen automatically.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2014-01-07 18:43:49

subraizada3
Member
Registered: 2013-06-02
Posts: 90

Re: [SOLVED] Arduino Serial Port Greyed Out

/var/lock is a symlink to /run/lock and chgrp doesn't work on it. I changed the group of /run/lock to lock.

Now it works with sudo but running as a normal user still gives the same error.

Offline

#6 2014-01-07 18:48:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,210

Re: [SOLVED] Arduino Serial Port Greyed Out

And that user shows up in the 'lock' group ?  Verify by locking at the output of the group command.   If so, I'll have to wait until I get home tonight (~1900 GMT-8)  to check my setup.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2014-01-07 18:54:15

subraizada3
Member
Registered: 2013-06-02
Posts: 90

Re: [SOLVED] Arduino Serial Port Greyed Out

I don't have a group command, but the groups command shows this:
lp wheel uucp http lock audio optical scanner vboxusers

Offline

#8 2014-01-07 19:15:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,210

Re: [SOLVED] Arduino Serial Port Greyed Out

That is what I meant tongue
Verify that your /dev node is in the uucp group.  If your board is a Leonardo, It should be /dev/ttyASM0, or something like that.  I am not in front of my machine -- I can ssh into it, but I cannot plug in my Arduino remotely.
It might be that the udev rule is wrong for the that class of board.   Again, I am going to have to experiment when I get home.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2014-01-07 19:26:28

subraizada3
Member
Registered: 2013-06-02
Posts: 90

Re: [SOLVED] Arduino Serial Port Greyed Out

I chgrpd /dev/ttyUSB0 to uucp, but it still gives the same errors.
The uucp group has read/write permissions on /dev/ttyUSB0.
Does it matter if the owner of the file is root?

Offline

#10 2014-01-07 19:43:04

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,210

Re: [SOLVED] Arduino Serial Port Greyed Out

No.   What is your device type?  As I say, mine is a Leonardo -- it uses an AT Mega with an integral USB interface, so it shows up differently than those that have a USB to Serial converter external to the processor.  Mine does not show up as /dev/ttyUSBx. , mine shows up as /dev/ttyACM0.  It should not matter, for now it is just my curiosity.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2014-01-07 19:44:59

subraizada3
Member
Registered: 2013-06-02
Posts: 90

Re: [SOLVED] Arduino Serial Port Greyed Out

I have a Duemilanove.
It is one of the older devices and uses the FTDI USB to serial processor.

Offline

#12 2014-01-07 20:12:33

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] Arduino Serial Port Greyed Out

IIRC:

This is about the lockfile in /run/lock. The whole idea is that programs can check if the serial port in question is in use by another program. For that there has to be a) standard location and b) consistent naming (to identify the device) for that lockfile. Well, that never really worked out, and at some point there was a "new" way of doing things, like "put the lockfile inside /run/lock/lockdev" instead of "make an extra folder in /run/lock". I can't remember the specifics right now, but looking at my /run/lock I think everyting should be done inside /run/lock/lockdev nowadays (which is writable by lock group), but Rxtx tries to create a folder inside /run/lock, for which the lock group has no permission.

Rxtx is in community, so I would think the lockfile stuff is patched there, but arduino packages its own version of rxtx. So either replace the rxtx libs packaged with arduino with a version which has the lock stuff disabled or fixed, or change group on /run/lock to lock.

EDIT: Have a look at the standard arduino package - it symlinks rxtx from community. That should fix your issue without the need for meddling with permissions in /run/lock.

2nd Edit: Here it is:  lock patch. Sorry for the slight rant, serial libraries on java have annoyed the hell out of me. If you ever have the pleasure, give one of the other implementations a try. Although they are all flakey, some are at least more recent than 2006.

Last edited by hokasch (2014-01-07 20:35:17)

Offline

#13 2014-01-07 20:16:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,210

Re: [SOLVED] Arduino Serial Port Greyed Out

Ah yes, while getting this to work, I believe I did install the java-rxtx package.  I just checked

ewaller$@$odin ~ 1004 %pacman -Ss rxtx
community/java-rxtx 2.2pre2-2 [installed]
    Java library for serial IO
ewaller$@$odin ~ 1005 %

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#14 2014-01-08 13:40:58

subraizada3
Member
Registered: 2013-06-02
Posts: 90

Re: [SOLVED] Arduino Serial Port Greyed Out

Everything works now that I have downgraded from arduino-beta to arduino!

Offline

#15 2014-01-08 13:52:46

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED] Arduino Serial Port Greyed Out

If you want to use the beta version, just append

# use system's RXTX library
  ln -sf /usr/lib/librxtxSerial.so "$pkgdir/usr/share/arduino/lib/librxtxSerial.so"
  ln -sf /usr/lib/librxtxSerial.so "$pkgdir/usr/share/arduino/lib/librxtxSerial64.so"
  ln -sf /usr/share/java/rxtx/RXTXcomm.jar "$pkgdir/usr/share/arduino/lib/RXTXcomm.jar"

to the package function and add java-rxtx to depends. Then check if everything works, and leave a comment for the AUR maintainer so he can fix the PKGBUILD.

Offline

#16 2014-01-22 14:12:35

szebenyib
Member
From: LHBP
Registered: 2011-10-18
Posts: 68

Re: [SOLVED] Arduino Serial Port Greyed Out

It has helped me too, thanks!
Using arduino package from aur, added myself  to uucp, installed rxtx again, reboot and I have managed to upload my sketch.
(After many trial and error smile)

Offline

#17 2014-03-11 10:38:43

joaocandre
Member
Registered: 2013-02-23
Posts: 157

Re: [SOLVED] Arduino Serial Port Greyed Out

Ran into a similar problem with Intel's Arduino IDE for the Galileo, which packed its own librxtxSerial.so and librxtxSerial64.so, solved it by symlinking them to the system's libraries. Thanks for the solution, it really helped smile

Offline

#18 2015-01-09 08:11:24

IlikePepsi
Member
Registered: 2013-10-29
Posts: 10

Re: [SOLVED] Arduino Serial Port Greyed Out

Much appreciated,

same thing here with Intel Galileo and the modified IDE. Thanks for the solution.

Offline

Board footer

Powered by FluxBB