arduino: serial communication/uploader not working

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.


Solution 1:

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.

Solution 2:

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:

  • bug 896929 - "librxtx-java: java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver";
  • bug 894770 - "arduino: serial communication/uploader not working".

Solution 3:

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