1.6.3 fails to list serial ports in ubuntu 14.04 #2892

Closed
bgodard opened this Issue Apr 3, 2015 · 13 comments

Projects

None yet

9 participants

@bgodard
bgodard commented Apr 3, 2015

IDE 1.6.3 starts but doesn't show ports.
Tools->Port menu greyed out
Messages in console when IDE starts:

cybernetics@clarke:/arduino-1.6.3$ ./arduino
Error parsing gtk-icon-sizes string: ''
Exception in thread "cc.arduino.packages.discoverers.serial.SerialBoardsLister" java.lang.NullPointerException
at processing.app.Platform.resolveDeviceByVendorIdProductId(Platform.java:143)
at processing.app.linux.Platform.resolveDeviceAttachedTo(Platform.java:141)
at cc.arduino.packages.discoverers.serial.SerialBoardsLister.run(SerialBoardsLister.java:73)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
cybernetics@clarke:
/arduino-1.6.3$

ADDITIONAL INFO:

cybernetics@clarke:/arduino-1.6.3$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
cybernetics@clarke:
/arduino-1.6.3$ uname -a
Linux clarke 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:31:23 UTC 2014 i686 i686 i686 GNU/Linux
cybernetics@clarke:/arduino-1.6.3$ java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1
trusty1)
OpenJDK Client VM (build 24.75-b04, mixed mode, sharing)
cybernetics@clarke:~/arduino-1.6.3$ lsusb
Bus 001 Device 013: ID 050d:705a Belkin Components F5D7050 Wireless G Adapter v3000 [Ralink RT2571W]
Bus 001 Device 019: ID 2341:003d Arduino SA
Bus 001 Device 020: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse (M-BT58)
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0a5c:201e Broadcom Corp. IBM Integrated Bluetooth IV
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

@wayoda
wayoda commented Apr 3, 2015

Is the device file for the board created when you plug it in?
The Unix cmd dmesgshould print something similar to this after the due is plugged in

wayoda@shredder:~$ dmesg

[28042.136652] usb 3-2.5: new full-speed USB device number 20 using xhci_hcd
[28042.243179] usb 3-2.5: New USB device found, idVendor=2341, idProduct=003d
[28042.243184] usb 3-2.5: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[28042.243187] usb 3-2.5: Product: Arduino Due Prog. Port
[28042.243189] usb 3-2.5: Manufacturer: Arduino (www.arduino.cc)
[28042.243191] usb 3-2.5: SerialNumber: 74134373733351D00282
[28042.243398] usb 3-2.5: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[28042.243750] cdc_acm 3-2.5:1.0: ttyACM0: USB ACM device

And please check if the device file exists in /dev, should look like this

wayoda@shredder:~$ ls -all /dev/ttyACM0 
crw-rw-rw- 1 root dialout 166, 0 Apr  3 17:18 /dev/ttyACM0
@bgodard
bgodard commented Apr 4, 2015

Yes the device /dev/ttyACM0 is correctly created. Also the port listing should work whether or not an Arduino is connected.

cybernetics@clarke:/arduino-1.6.3$ ls -all /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Apr 4 15:03 /dev/ttyACM0
cybernetics@clarke:
/arduino-1.6.3$ groups
cybernetics adm dialout cdrom sudo dip plugdev lpadmin sambashare

Now it works sometimes when I start the Arduino IDE and sometimes not. It seems to be a bit random except that as of now after a boot once it starts correctly it continues starting correctly until next reboot but the first Arduino IDE start(s) after a reboot fails to list the ports (to take with a grain of salt: I have not done enough boots/Arduino IDE start to generalize).

Now I have other problems:

  • serial port configuration requiring very frequent manual set of the baud rate (shouldn't the board programmer do that?) before loading the program as described in http://forum.arduino.cc/index.php?topic=148613.0. This is also a bit random and might be related to the problem above.
  • no file MouseController.h (Due usb host lib) in 1.6.3 bundle or in extension installed by boards manager for SAM boards (Due). Where do I find this?
@bgodard bgodard changed the title from 1.6.3 fails to list serial ports in ubuntu 12.04 to 1.6.3 fails to list serial ports in ubuntu 14.04 Apr 5, 2015
@heman4t
heman4t commented Apr 8, 2015

Getting the same issue in Ubuntu 14. Its random

@PaulStoffregen
Contributor

Is the failure only temporary? In other words, if you go get a cup of coffee, when you come back and try again, does the Tools > Ports menu later have your device?

Such slowness may be totally unacceptable, but whether it's being very slow to detect and update the menu versus never working is important to tracking down what's really wrong. I hope you'll have the patience and perseverance to try again and wait several minutes, so we can get a little more info about what's happening on your system.

@bgodard
bgodard commented Apr 8, 2015

When this exception occurs at Arduino IDE startup, Tools->Ports menu is
greyed out. I have only been able to solve this by restarting the IDE until
it works (in that sense it is temporary).
I have had this problem with 2 PCs under 14.04 with IDE 1.6.3. It does NOT
seem to be related to which Arduino is connected (Due, Uno or None) but on
one of the PC, I have seen it happen only once out of about 10 IDE startup
while on the other it was more like 50/50.

On Wed, Apr 8, 2015 at 11:13 AM, Paul Stoffregen notifications@github.com
wrote:

Is the failure only temporary? In other words, if you go get a cup of
coffee, when you come back and try again, does the Tools > Ports menu later
have your device?


Reply to this email directly or view it on GitHub
#2892 (comment).

@niallp
niallp commented Apr 8, 2015

Seeing something similar here ... on ubuntu 12.04, sometimes get the SerialBoardsLister error on startup in which case no ports available. I've been try various IDE versions, the old one from the repos always works (but doesn't support the Yun) while 1.5.8 and 1.6.3 work intermittently. It seems like once one works, the other won't, maybe file locking ?

@natanael-fim

when happened this with me i do:
$ sudo usermod -a -G tty MY_USERNAME
$ sudo usermod -a -G dialout MY_USERNAME

  • logout;
  • logon;

DONE :)

@niallp
niallp commented Apr 13, 2015

On 15-04-12 01:58 PM, natanael wrote:

when happened this with me i do:
$ sudo usermod -a -G tty MY_USERNAME
$ sudo usermod -a -G dialout MY_USERNAME

logout;
logon;

DONE :)


Reply to this email directly or view it on GitHub
#2892 (comment).

Unfortunately not enough for me, I was already in the appropriate
groups. I haven't found the magic conditions for 1.6.3 to work
consistently on the serial port, also turns out to not see a device on
the LAN either, only 1.5.8 works there so I'll have to stick with the
older version for now.

@ffissore ffissore closed this in 350adb9 Apr 13, 2015
@ffissore
Contributor

Probably this issue has the same root cause of #2837. It should be fixed in the latest nightly (just triggered). Please download and try it http://arduino.cc/en/Main/Software#nightly

@niallp
niallp commented Apr 13, 2015

Thanks, the nightly build (marked 1.6.4) works for both serial discovery and network.

@misteralex

Serial monitor in 1.6.4 works fine on Linux 32 bits over /dev/ttyACM0 (virtual Debian context).

@oriregev oriregev added a commit to oriregev/Arduino that referenced this issue Apr 27, 2015
@oriregev oriregev Merge remote-tracking branch 'upstream/master'
* upstream/master: (239 commits)
  Fix for issue #292
  Windows: build_pull_request needed to be upgraded as well
  Update revisions.txt
  Windows: JRE is chosen at build time via WINDOWS_BUNDLED_JVM property
  Update Tone.cpp
  Update revisions.txt
  Block discovery threads until packages is not null, otherwise boards discovered during startup will miss model name
  Also SerialDiscovery was affected by bug found at 40535df. Fixes #2892
  NetworkDiscovery was silently failing because packages werenìt ready yet. Fixes #2837
  Better preference for setting warnings level. See arduino@61592d7#commitcomment-10668365
  SAM boards stop compiling due to way of handling params with spaces on different OSs. Fixed
  Update Tone.cpp
  Restored error messages. Got rid of MessageSyphon as ther were losing some error messages. Fixes #2737
  Windows: added listComPorts test case
  New preference: enable all compiler warnings, off by default. Fixes #1728 and #2415. Also affects #2634 and #2207
  build.xml: spreading failonerror on all exec tasks, it's better to crash early
  Lib/Board Manager CRC check is now case insensitive. Fixes #2953
  License fix to audio library
  License fix
  Library Manager: better error message
  ...
33ee7bf
@phenom128

oops

@phenom128

setup is debian 8 & arduino 1.6.4 binary tgz package giving the greyed out port

i edited the preferences.txt deleting the serial.* lines and on restarting the ide
it generated new lines for the serial.
i did the same when i had greyed out port with the first time execution of a 1.0.x release, then it had a preferences.txt with a windows style com port reference

@ffissore ffissore modified the milestone: Release 1.6.5 May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment