通过 /dev/ttyACM0 的 Arduino 连接不工作
Arduino connection via /dev/ttyACM0 not working
我在 Ubuntu 上通过 Arduino IDE 连接到 arduino UNO 时遇到问题
当然端口是灰色的,但我手动设置了它。
当我尝试上传时,我得到以下信息:
java.lang.NullPointerException thrown while loading
gnu.io.RXTXCommDriver processing.app.SerialNotFoundException: Serial
port '/dev/ttyACM0' not found. Did you select the right one from the
Tools > Serial Port menu?
已安装的软件包:
$ apt list --installed |grep arduino
arduino/bionic,bionic,now 2:1.0.5+dfsg2-4.1 all [installed]
arduino-core/bionic,bionic,now 2:1.0.5+dfsg2-4.1 all [installed]
arduino-mk/bionic,bionic,now 1.5.2-1 all [installed]
$
我是拨出组的成员:
$ cat /etc/group |grep marcin
uucp:x:10:marcin
dialout:x:20:marcin
fax:x:21:marcin
audio:x:29:pulse,marcin,timidity
dip:x:30:marcin,marcin
video:x:44:marcin
plugdev:x:46:marcin
marcin:x:1001:
端口 /dev/ttyACM0 是正确的:
$ ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 paź 12 20:54 /dev/ttyACM0
$
dmesg output:
[ 1033.897893] usb 1-1: new full-speed USB device number 4 using xhci_hcd
[ 1034.051751] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[ 1034.051768] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 1034.051780] usb 1-1: Manufacturer: Arduino (www.arduino.cc)
[ 1034.051789] usb 1-1: SerialNumber: 9573xxxxxxxxxxxx
[ 1034.112081] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 1034.114359] usbcore: registered new interface driver cdc_acm
[ 1034.114363] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
与端口相关的 Arduino 首选项文件:
$ cat .arduino/preferences.txt |grep serial
serial.databits=8
serial.debug_rate=9600
serial.parity=N
serial.port=/dev/ttyACM0
serial.stopbits=1
$
USB 设备:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 058f:5608 Alcor Micro Corp.
Bus 001 Device 002: ID 258a:000c
Bus 001 Device 004: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$
计算机已重新启动,USB 数据线在 IDE 打开和关闭的情况下插拔了几次,没有更多关于如何继续前进的想法。
任何帮助将不胜感激。谢谢。
我按照 NPE 指出的错误解决了问题。
我从 bionic-proposed 存储库安装了 librxtx-java 包
$ sudo apt-get install librxtx-java/bionic-proposed
现在连接正常。谢谢!
我在 Ubuntu 上通过 Arduino IDE 连接到 arduino UNO 时遇到问题 当然端口是灰色的,但我手动设置了它。 当我尝试上传时,我得到以下信息:
java.lang.NullPointerException thrown while loading
gnu.io.RXTXCommDriver processing.app.SerialNotFoundException: Serial
port '/dev/ttyACM0' not found. Did you select the right one from the
Tools > Serial Port menu?
已安装的软件包:
$ apt list --installed |grep arduino
arduino/bionic,bionic,now 2:1.0.5+dfsg2-4.1 all [installed]
arduino-core/bionic,bionic,now 2:1.0.5+dfsg2-4.1 all [installed]
arduino-mk/bionic,bionic,now 1.5.2-1 all [installed]
$
我是拨出组的成员:
$ cat /etc/group |grep marcin
uucp:x:10:marcin
dialout:x:20:marcin
fax:x:21:marcin
audio:x:29:pulse,marcin,timidity
dip:x:30:marcin,marcin
video:x:44:marcin
plugdev:x:46:marcin
marcin:x:1001:
端口 /dev/ttyACM0 是正确的:
$ ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 paź 12 20:54 /dev/ttyACM0
$
dmesg output:
[ 1033.897893] usb 1-1: new full-speed USB device number 4 using xhci_hcd
[ 1034.051751] usb 1-1: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[ 1034.051768] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 1034.051780] usb 1-1: Manufacturer: Arduino (www.arduino.cc)
[ 1034.051789] usb 1-1: SerialNumber: 9573xxxxxxxxxxxx
[ 1034.112081] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 1034.114359] usbcore: registered new interface driver cdc_acm
[ 1034.114363] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
与端口相关的 Arduino 首选项文件:
$ cat .arduino/preferences.txt |grep serial
serial.databits=8
serial.debug_rate=9600
serial.parity=N
serial.port=/dev/ttyACM0
serial.stopbits=1
$
USB 设备:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 058f:5608 Alcor Micro Corp.
Bus 001 Device 002: ID 258a:000c
Bus 001 Device 004: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$
计算机已重新启动,USB 数据线在 IDE 打开和关闭的情况下插拔了几次,没有更多关于如何继续前进的想法。 任何帮助将不胜感激。谢谢。
我按照 NPE 指出的错误解决了问题。
我从 bionic-proposed 存储库安装了 librxtx-java 包
$ sudo apt-get install librxtx-java/bionic-proposed
现在连接正常。谢谢!