avrdude:ser_open():无法打开设备“/ dev / ttyACM0”:设备或资源繁忙

时间:2022-12-11 20:54:34

I am Linux Mint user.I am dealing with Arduino Yun.I am compiling Arduino program.After that I am uploading to Arduino Yun.Then I get these error.Can you help me?

我是Linux Mint用户。我正在处理Arduino Yun。我正在编译Arduino程序。之后我上传到Arduino Yun。然后我收到这些错误。你能帮助我吗?

3 个解决方案

#1


8  

you first need to make sure you have the correct read/write rights, as described here, esentially enter following commands:

首先需要确保您具有正确的读/写权限,如此处所述,首先输入以下命令:

$ sudo adduser <username> dialout
$ sudo chmod a+rw /dev/ttyACM0

the '/dev/ttyACM0' is the port your arduino is connected to, it should be listed in the /dev folder of your root.

'/ dev / ttyACM0'是你的arduino连接的端口,它应该列在你的root的/ dev文件夹中。

second: after you have identified which port the arduino is connected to and you have set the correct rights for this port, you need to run following command. I am not sure what it does, I am not sure if it's really needed, but it made the uploads work for me on several occasions

第二:在确定arduino所连接的端口并且您已为此端口设置了正确的权限之后,您需要运行以下命令。我不确定它是做什么的,我不确定它是否真的需要,但它使上传对我来说有好几次了

$ sudo udevadm trigger

found this command here: http://starter-kit.nettigo.eu/2015/serial-port-busy-for-avrdude-on-ubuntu-with-arduino-leonardo-eth/

在这里找到了这个命令:http://starter-kit.nettigo.eu/2015/serial-port-busy-for-avrdude-on-ubuntu-with-arduino-leonardo-eth/

and third, you will find the upload sometimes a challenge of timing and luck. Keep pressing the reset (sometimes twice very consecutively) and meanwhile press the upload button of your arduino sketch. At certain moment, it will work. I had more luck when constantly changing small pieces in the code, so when I pushed 'upload', it had to compile the code first.

第三,你会发现上传有时是时机和运气的挑战。继续按下重置(有时连续两次),同时按下arduino草图的上传按钮。在某些时刻,它会起作用。当我不断更改代码中的小块时,我有更多的运气,所以当我按下'upload'时,它必须先编译代码。

https://www.arduino.cc/en/Guide/Troubleshooting#upload

on some computers, you may need to push teh reset button

在某些计算机上,您可能需要按下重置按钮

I have never messed with the bootloader, nor with ICSP pins and such (luckily)

我从来没有搞过bootloader,也没有使用ICSP引脚等(幸运的是)

Also have a look on the Arduino forum or on the link provide by yourself

另请查看Arduino论坛或您自己提供的链接

#2


14  

I got exact problem with my Leonardo board and Ubuntu. Adding rule that tells ModemManger to ignore all USB devices from mentioned link didn't work for me. However, deleting modemmanager in fact did.

我的莱昂纳多董事会和Ubuntu确实遇到了问题。添加规则告诉ModemManger忽略所提到的链接中的所有USB设备对我不起作用。但是,实际上删除modemmanager确实如此。

sudo apt-get purge modemmanager

sudo apt-get purge modemmanager

#3


0  

Make sure your USB cable is plugged firmly. Mine stopped working all of a suddenly because of this. The "/dev/ttyACM0 not found" message happens because the device doesn't get created unless the device is plugged in.

确保USB电缆牢固插入。因为这个原因,我突然停止了工作。发生“/ dev / ttyACM0 not found”消息是因为除非插入设备,否则不会创建设备。

#1


8  

you first need to make sure you have the correct read/write rights, as described here, esentially enter following commands:

首先需要确保您具有正确的读/写权限,如此处所述,首先输入以下命令:

$ sudo adduser <username> dialout
$ sudo chmod a+rw /dev/ttyACM0

the '/dev/ttyACM0' is the port your arduino is connected to, it should be listed in the /dev folder of your root.

'/ dev / ttyACM0'是你的arduino连接的端口,它应该列在你的root的/ dev文件夹中。

second: after you have identified which port the arduino is connected to and you have set the correct rights for this port, you need to run following command. I am not sure what it does, I am not sure if it's really needed, but it made the uploads work for me on several occasions

第二:在确定arduino所连接的端口并且您已为此端口设置了正确的权限之后,您需要运行以下命令。我不确定它是做什么的,我不确定它是否真的需要,但它使上传对我来说有好几次了

$ sudo udevadm trigger

found this command here: http://starter-kit.nettigo.eu/2015/serial-port-busy-for-avrdude-on-ubuntu-with-arduino-leonardo-eth/

在这里找到了这个命令:http://starter-kit.nettigo.eu/2015/serial-port-busy-for-avrdude-on-ubuntu-with-arduino-leonardo-eth/

and third, you will find the upload sometimes a challenge of timing and luck. Keep pressing the reset (sometimes twice very consecutively) and meanwhile press the upload button of your arduino sketch. At certain moment, it will work. I had more luck when constantly changing small pieces in the code, so when I pushed 'upload', it had to compile the code first.

第三,你会发现上传有时是时机和运气的挑战。继续按下重置(有时连续两次),同时按下arduino草图的上传按钮。在某些时刻,它会起作用。当我不断更改代码中的小块时,我有更多的运气,所以当我按下'upload'时,它必须先编译代码。

https://www.arduino.cc/en/Guide/Troubleshooting#upload

on some computers, you may need to push teh reset button

在某些计算机上,您可能需要按下重置按钮

I have never messed with the bootloader, nor with ICSP pins and such (luckily)

我从来没有搞过bootloader,也没有使用ICSP引脚等(幸运的是)

Also have a look on the Arduino forum or on the link provide by yourself

另请查看Arduino论坛或您自己提供的链接

#2


14  

I got exact problem with my Leonardo board and Ubuntu. Adding rule that tells ModemManger to ignore all USB devices from mentioned link didn't work for me. However, deleting modemmanager in fact did.

我的莱昂纳多董事会和Ubuntu确实遇到了问题。添加规则告诉ModemManger忽略所提到的链接中的所有USB设备对我不起作用。但是,实际上删除modemmanager确实如此。

sudo apt-get purge modemmanager

sudo apt-get purge modemmanager

#3


0  

Make sure your USB cable is plugged firmly. Mine stopped working all of a suddenly because of this. The "/dev/ttyACM0 not found" message happens because the device doesn't get created unless the device is plugged in.

确保USB电缆牢固插入。因为这个原因,我突然停止了工作。发生“/ dev / ttyACM0 not found”消息是因为除非插入设备,否则不会创建设备。