avrdude: ser_open(): can't open device “/dev/ttyACM0”: Device or resource busy

无人久伴 提交于 2019-12-30 01:02:35

问题


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?


回答1:


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.

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

$ sudo udevadm trigger

found this command here: 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.

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)

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




回答2:


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.

sudo apt-get purge modemmanager




回答3:


The solution that worked for me always is to go to Tools -> Port -> /dev/ttyACMx and click the selected port again.

After that IDE uploads the code without a problem.




回答4:


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.




回答5:


sudo chmod a+rw /dev/ttyACM0

run following command for first time uploading




回答6:


Use

sudo arduino

This will fix for one Time




回答7:


I was struggling with this issue for quite a while earlier today and all the solutions I found online didn't help. All of the error messages I was receiving were exactly identical to the ones on forums like this.

Then I realized that I made the most embarrassing mistake which was my cable wasn't properly plugged in.

So, please, before you scour the web over an hour trying every solution on the internet, please make sure your cables are plugged in correctly.



来源:https://stackoverflow.com/questions/40951728/avrdude-ser-open-cant-open-device-dev-ttyacm0-device-or-resource-busy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!