8

In Arduino IDE the serial port is greyed out and COM 1 i shown in the window There is no way to communicate trough serial connection. Dont know if this is a Arduino Bugg or a bugg in Bionic Beaver. The application worked in 17.10 Artfull.

This bugg is reported and a fix is awaiting an upload in debian

May 9:

Fixed the NullPointerException with Java 10 caused by the null java.ext.dirs system property (Closes: #896929)

Its not a Arduino only problem but affect serial connections in general.

Tested Pronterface and there is no serial connection to 3D printer.

  • 2
    Just some added info: This is a known issue with Ubuntu 18.04 as Arduino IDE throws an Exception when loading the Serial Driver. Specifically: java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver – user693336 May 10 '18 at 1:34
  • 1
    So it's a known problem. But there is no Known solutions (yet)? – bolean May 10 '18 at 9:08
  • 1
    Possible duplicate of How to install latest Arduino IDE? – N0rbert May 10 '18 at 17:54
  • This is actually a bug in librxtx-java and is fixed in Debian version 2.2pre2+dfsg1-2. Ubuntu has this since Cosmic. For Bionic you can download and install the Comic version by hand. – kleptog Jun 15 '19 at 13:31
5

The serial communication/uploader problem was fixed for me by following the instructions for installing Oracle java 8 from this posting:

https://linuxconfig.org/how-to-install-java-on-ubuntu-18-04-bionic-beaver-linux

on a newly installed Ubuntu 18.04 LTS system. After installing Oracle java 8:

  • $ sudo add-apt-repository ppa:webupd8team/java
  • $ sudo apt update
  • $ sudo apt install oracle-java8-set-default

the Arduino IDE worked properly.

| improve this answer | |
  • This workaround works for me. Serial port no longer greyed out. – bolean May 14 '18 at 11:32
  • 1
    This is the best answer to solve the problem with arduino from repo, but the better outcome will be to install the latest version of arduino from arduino.cc, as the repo version is very old and missing many features (Library and Boards managers being significant omissions) – CharlieS Mar 8 '19 at 21:28
  • 1
    My solution: install openjdk 8, then activate it via sudo update-alternatives --config java – Stephan Richter Jul 9 '19 at 14:47
  • Thanks Stephan. I installed the openjdk-8-jdk package, which helped (with update-alternatives --config java) – Neil Stockbridge Oct 28 '19 at 3:09
4

You should give your user permissions to write to serial port with

sudo usermod -a -G dialout $USER

Also see "How to install latest Arduino IDE?".


It seems that it is real bug, I also get on clean Ubuntu 18.04 LTS:

$ arduino
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver

$ dpkg -S `which arduino`
arduino: /usr/bin/arduino

$ dpkg -l arduino | tail -n1
ii  arduino        2:1.0.5+dfsg2-4.1 all          AVR development board IDE and built-in librarie

so I reported bug 1770604 to launchpad with linked Debian Bugs:

| improve this answer | |
  • I am a member of the dialout group – bolean May 10 '18 at 9:02
  • I reported bug to launchpad. – N0rbert May 11 '18 at 10:01
1

I was facing the same problem. I installed version Arduino IDE 1.9.0 beta and I no longer see that error.

| improve this answer | |
  • Version 1.9.0 beta of what? – Stephen Rauch Aug 5 '18 at 3:27
  • 1
    @StephenRauch Arduino IDE version 1.9 beta. – karel Aug 5 '18 at 4:11
  • Yes, Arduino IDE 1.9.0 beta. I worded a bit better my answer. – Ernesto Miranda Aug 5 '18 at 14:56
0

Try it using,

sudo usermod -a -G dialout $USER

and, don't forget to change permission, example COM1 as ttyUSB0 :

ls -l /dev/tty*
sudo chmod a+rw /dev/ttyUSB0
| improve this answer | |
0

Download the latest Arduino IDE from arduino.cc, extract the archive and make install.sh executable with chmod +x install.sh or through the Permissions tab of the file's properties. After this you can run sudo ./install.sh - from a terminal that has the extracted folder as its current path - to install the Arduino IDE. This should fix your problem.

Thanks to CharlieS for the suggestion by comment.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.