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.

bolean
  • 291

5 Answers5

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.

  • 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 08 '19 at 21:28
  • 1
    My solution: install openjdk 8, then activate it via sudo update-alternatives --config java – Stephan Richter Jul 09 '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 03: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:

N0rbert
  • 99,918
1

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

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
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.

魔大农
  • 153
  • 1
  • 8