i have problem with aruino and jetson tx2. HOw to fix

Binary sketch size: 1,548 bytes (of a 258,048 byte maximum)
processing.app.SerialException: Error opening serial port ‘/dev/ttyACM1’.
at processing.app.Serial.(Serial.java:178)
at processing.app.Serial.(Serial.java:77)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:175)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:748)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:213)
at processing.app.Serial.(Serial.java:163)
… 9 more
processing.app.debug.RunnerException: Error opening serial port ‘/dev/ttyACM1’.
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:175)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:748)

Exception in thread “main” java.lang.NullPointerException
at processing.app.I18n._(I18n.java:51)
at processing.app.Preferences.init(Preferences.java:210)
at processing.app.Base.main(Base.java:117)

pls help. I am going to send product for warranty. I dont know how to fix this problem

i can upload code from jetsontx to arduino. Arduino is good for another computer.
Jetsontx2 can not read port and can not accept foe download

Error:

nvidia@tegra-ubuntu:~$ arduino
Exception in thread “main” java.lang.NullPointerException
at processing.app.I18n._(I18n.java:51)
at processing.app.Preferences.init(Preferences.java:210)
at processing.app.Base.main(Base.java:117)

I see this:

processing.app.SerialException: Error opening serial port '/dev/ttyACM1'.

What do you see from:

ls -l /dev/ttyACM1

Which user are you logged in as when running the failing command? What do you see from this (assumes “whoami” is who runs the command that fails):

grep `whoami` /etc/group

nvidia@tegra-ubuntu:~ ls -l /dev/ttyACM1 ls: cannot access '/dev/ttyACM1': No such file or directory nvidia@tegra-ubuntu:~ ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Nov 20 12:34 /dev/ttyACM0
nvidia@tegra-ubuntu:~$

nvidia@tegra-ubuntu:~ grep `whoami` /etc/group adm:x:4:ubuntu,syslog,nvidia tty:x:5:nvidia uucp:x:10:nvidia dialout:x:20:ubuntu,nvidia cdrom:x:24:nvidia floppy:x:25:nvidia sudo:x:27:ubuntu,nvidia audio:x:29:ubuntu,pulse,nvidia dip:x:30:nvidia video:x:44:ubuntu,nvidia plugdev:x:46:nvidia nvidia:x:1001: nvidia@tegra-ubuntu:~

nvidia@tegra-ubuntu:~$ lsusb
Bus 002 Device 003: ID 05e3:0743 Genesys Logic, Inc. SDXC and microSDXC CardReader
Bus 002 Device 002: ID 2109:0813 VIA Labs, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)
Bus 001 Device 002: ID 2109:2813 VIA Labs, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

nvidia@tegra-ubuntu:~$ ls /dev/tty*
/dev/tty /dev/tty2 /dev/tty31 /dev/tty43 /dev/tty55 /dev/ttyACM0
/dev/tty0 /dev/tty20 /dev/tty32 /dev/tty44 /dev/tty56 /dev/ttyGS0
/dev/tty1 /dev/tty21 /dev/tty33 /dev/tty45 /dev/tty57 /dev/ttyS0
/dev/tty10 /dev/tty22 /dev/tty34 /dev/tty46 /dev/tty58 /dev/ttyS1
/dev/tty11 /dev/tty23 /dev/tty35 /dev/tty47 /dev/tty59 /dev/ttyS2
/dev/tty12 /dev/tty24 /dev/tty36 /dev/tty48 /dev/tty6 /dev/ttyS3
/dev/tty13 /dev/tty25 /dev/tty37 /dev/tty49 /dev/tty60 /dev/ttyTHS1
/dev/tty14 /dev/tty26 /dev/tty38 /dev/tty5 /dev/tty61 /dev/ttyTHS2
/dev/tty15 /dev/tty27 /dev/tty39 /dev/tty50 /dev/tty62 /dev/ttyTHS3
/dev/tty16 /dev/tty28 /dev/tty4 /dev/tty51 /dev/tty63
/dev/tty17 /dev/tty29 /dev/tty40 /dev/tty52 /dev/tty7
/dev/tty18 /dev/tty3 /dev/tty41 /dev/tty53 /dev/tty8
/dev/tty19 /dev/tty30 /dev/tty42 /dev/tty54 /dev/tty9

nvidia@tegra-ubuntu:~$ arduino
Exception in thread “main” java.lang.NullPointerException
at processing.app.I18n._(I18n.java:51)
at processing.app.Preferences.init(Preferences.java:210)
at processing.app.Base.main(Base.java:117)

DO you think I have to re-install ubuntu on Jetson Tx2? or DO I have to send product for fixed

in JetsonTx2, it have 2 users, one is nvidia and other is ubuntu. I use nvidia user

Drivers create the files in “/dev”, and the ttyACM0 is for the first serial UART of that driver. Because you don’t have ttyACM1, the implication is that you have only one serial UART. Your program wants to use ttyACM1, and it doesn’t exist. Presumably that is because there is no such hardware present and is not a bug.

The nvidia user is a member of group dialout, so you have permission for those devices which exist.

Pretty much the operating system and drivers are working correctly. Probably your arduino program needs to be told to use “/dev/ttyACM0” instead of “/dev/ttyACM1” and it’ll “just work”.

I am not familiar with the software you use, but almost all such software for use of a serial port allows specifying which port…either on the command line when you start the software as an option, or in a GUI if it is graphical, or by editing a preferences or config file.

Just to see what the options are I installed package “arduino” (I have no arduino hardware though, and I am using Fedora on my host…but options should be the same among Jetsons/PCs/Ubuntu/Fedora). Here is what I found…

  • The GUI has "Tools->Port". Perhaps this lists "ttyACM0"...if it does, then pick this instead of "ttyACM1".
  • There is a subdirectory in the home directory of your user which is probably the same as the Fedora version:
    ~/.arduino15/
    

    Perhaps yours has a different version number, but should be there with “ls -aFd ~/.arduino*”. Possibly the “preferences.txt” file could be edited via the “serial.port” entry to instead be something like “/dev/ttyACM0”. Don’t have the hardware, so I can’t test.

All in all it seems your arduino software simply needs to be told which port to use. The software shouldn’t crash if it looks for the wrong port, but this seems to be the case. Telling it to use the right port should do the job…if you can’t start up without a crash, then go to your “~/.arduino15/” directory, and run this command and post the result:

grep '^serial<li>.*' preferences.txt

(this will show what it was configured to set up as on startup…beware that “COM1” is a “Windowsism” and in your case should be instead “/dev/ttyACM0” or “ttyACM0”, depending on what the software does)

right now I have error, arduino installed but i can’t run

nvidia@tegra-ubuntu:~ arduino Exception in thread "main" java.lang.NullPointerException at processing.app.I18n._(I18n.java:51) at processing.app.Preferences.init(Preferences.java:210) at processing.app.Base.main(Base.java:117) nvidia@tegra-ubuntu:~ sudo arduino
Exception in thread “main” java.lang.NullPointerException
at processing.app.I18n._(I18n.java:51)
at processing.app.Preferences.init(Preferences.java:210)
at processing.app.Base.main(Base.java:117)

do you know how to reinstall ubuntu on jetson tx2?

The system jetsontx2 is horrible now, I really want to make new ubuntu on jetson

More likely the Jetson is ok, but the arduino program is not installed correctly (or is configured incorrectly). Since there is no “ttyACM1” it can’t possibly succeed in using it…but there is a “ttyACM0”, and so you know the driver is there. It is very unlikely flashing the Jetson will fix anything, but you can flash it if you like.

You probably want to use JetPack3.3, which would flash L4T R28.2.1:
https://developer.nvidia.com/embedded/linux-tegra-r2821
(you probably have to go to that URL, then log in, and then go to the URL a second time to see the content)

Look for “JetPack” on that page. If you don’t have an Ubuntu host, then you could flash on command line. In reality JetPack does not flash, it just acts as a GUI front end for the flash software (which is the “driver package” plus “sample rootfs” from that same page…but JetPack downloads them for you).

Just to emphasize though, the arduino software is trying to use a non-existent device (and Linux can’t create a device special file for a non-existent device…the one which does exist is ttyACM0). Odds are reinstalling the arduino software would be a better first test.

Thank you very much linuxdev
I reinstall Ubuntu on jetsontx2, it takes more than 1 hour. the result is my problem solved, arduino work with jetson now.
thanks