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)
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:~$ 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:~$ 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:~$ 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)
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)
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.
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