librxtx-java fails to open /dev/ttyACM0 port!

Bug #1579781 reported by Marco Righi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-9 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

In order to use librxtx-java to communicate with an arduino I have to use 1081 alternatives (OpenJDK 8 is 1081). In order to obtain this result I have installed galternatives and I have set for each j* voice the 1081 choice (in each place where it was present).

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: openjdk-9-jdk (not installed)
ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Mon May 9 14:44:03 2016
ErrorMessage: tentata sovrascrittura di "/usr/lib/jvm/java-9-openjdk-amd64/include/linux/jawt_md.h" presente anche nel pacchetto openjdk-9-jdk-headless:amd64 9~b114-0ubuntu1
InstallationDate: Installed on 2016-04-28 (11 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1
 apt 1.2.10ubuntu1
SourcePackage: openjdk-9
Title: package openjdk-9-jdk (not installed) failed to install/upgrade: tentata sovrascrittura di "/usr/lib/jvm/java-9-openjdk-amd64/include/linux/jawt_md.h" presente anche nel pacchetto openjdk-9-jdk-headless:amd64 9~b114-0ubuntu1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marco Righi (marco-righi) wrote :
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, we cannot work on this bug because your description didn't include enough information and also provided ambiguous information.

As for the description being ambiguous:
1. The first paragraph describes a librxtx problem, but the ErrorMessage and Title fields indicates a duplicate of bug #1550950
2. OpenJDK 8 is cited on the first paragraph but the bug is associated to OpenJDK 9 and further on the Package field contains openjdk-9-jdk

Please clarify what the actual issue is and provide additional information. At a minimum, we need:
1. The specific steps or actions you took that caused you to encounter the problem.
2. The behavior you expected.
3. The behavior you actually encountered (in as much detail as possible).

Thanks!

Changed in openjdk-9 (Ubuntu):
status: New → Incomplete
Revision history for this message
Marco Righi (marco-righi) wrote :

Hi, some mounts ago I wrote a code able to read/write USB port in order to communicate with an Arduino 2560. The code is written in Java. The code works perfectly with Ubuntu 14.04.
Some days ago I upgraded to Ubuntu 16.04 from scratch (completely erasing the OS partition) and I installed the GNU IO library.
I expected to run my code as in the previous OS 14.04 but when I tired to execute my code I noticed a problem. The problem was the inability to access the /dev/ttyACM0 (using the root user and a normal 'dialout' user).
In order to resolve the problem I tried to update the OpenJDK because Java8 was already installed. During the upgrade I got the bug #1550950.
After this partial upgrade GNU IO was not runnable: the problem was not solved.
I resolved the problem using galternatives and setting for each j* voice the 1081 choice (in each place where it was present).

Please write me if you need more explanation. I am glad to help the linux community.

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

OpenJDK 9 has not been released yet and it is based on a development branch of OpenJDK, thus only use it if you know what you are doing. The official OpenJDK is 8. I highly recommend you to uninstall OpenJDK 9 and keep using OpenJDK 8.

With that out of the way, did forcing your system to use OpenJDK 8 through the alternatives systems fix your issue accessing /dev/ttyACM0?

If you are still having problems accessing /dev/ttyACM0 please detach and attach your Arduino and then run

$ dmesg
$ ls -l /dev/ttyACM* /dev/ttyUSB*
$ groups

Look for USB messages right at the bottom of dmesg, they should indicate if your Arduino was recognized and what device was associated to it. The ls command will show you what user and group are associated with the device (probably root/dialout) and groups will show you what groups you belong to. In case you are not in the right group, please run

$ sudo usermod -a -G dialout <your username>

You need to logout and login again after adding yourself to a new group.

If you need help, please copy and paste the outputs here so I can take a look. As an example, here is a dmesg output snip right after I plug an Arduino:

[75244.850166] usb 1-3: new full-speed USB device number 50 using xhci_hcd
[75244.978703] usb 1-3: New USB device found, idVendor=067b, idProduct=2303
[75244.978706] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[75244.978708] usb 1-3: Product: USB-Serial Controller D
[75244.978710] usb 1-3: Manufacturer: Prolific Technology Inc.
[75245.998601] usbcore: registered new interface driver usbserial
[75245.998620] usbcore: registered new interface driver usbserial_generic
[75245.998636] usbserial: USB Serial support registered for generic
[75246.000675] usbcore: registered new interface driver pl2303
[75246.000698] usbserial: USB Serial support registered for pl2303
[75246.000721] pl2303 1-3:1.0: pl2303 converter detected
[75246.001445] usb 1-3: pl2303 converter now attached to ttyUSB0

The last message indicates it has been associated to /dev/ttyUSB0. The ls command shows

$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 May 11 10:38 /dev/ttyUSB0

And my permissions don't include dialout access (I'm not in the dialout group):

$ groups
tdaitx adm cdrom sudo dip plugdev netdev libvirtd lpadmin sambashare vnstat sbuild lxd

Revision history for this message
Marco Righi (marco-righi) wrote :

This fix the problem:

>With that out of the way, did forcing your system to use OpenJDK 8

By the way, using the default OpenJDK 8 installation the problem was present, after that I have forced the use of OpenJDK 8 the problem was fixed!

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Marco, thank you for your report and all the information you provided. As the issue was fixed after installing OpenJDK 8 and I have been unable to reproduce it, I will be closing this.

Changed in openjdk-9 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.