I am relatively new to ubuntu, and have been enjoying it. I currently have this issue. I get the error message shown below. It detects my Arduino Mega 2560, but it instead decides to give these error codes:

avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

Anyone have a solution?

  • Does it show up under /dev/ttyXYZ? – You'reAGitForNotUsingGit Jul 29 '19 at 1:47
  • @AndroidDev no, it shows up under /dev/tty/ACM0 – Myspace Jul 29 '19 at 1:51
  • No no, that's fine, I was simply using XYZ as a placeholder – You'reAGitForNotUsingGit Jul 29 '19 at 1:52
  • Did you set the udev rules for it? – You'reAGitForNotUsingGit Jul 29 '19 at 1:52
  • @AndroidDev sorry, I don't know what that is – Myspace Jul 29 '19 at 1:53

Anyone who is having this issue, here is a temporary fix.

Thanks to @AndroidDev, here is an easy fix that works well enough.

  1. Find out which port your Arduino is using (look in the bottom right corner or in the menu)

  2. Go to terminal and do sudo chmod a+rw /dev/ttyfoo (fill in the last part with your part)

  3. Open Arduino and carry on!

The issue with this solution is that you must redo steps 2&3 every time you use Arduino, so try to write a script or something which does it automatically and post it here so others can use it.

  • That's not recommended. You're giving read and write access to everyone! You should probably add the particular user that's trying to use the port to the group that has access to it (usually dialout). – Simón Feb 21 '20 at 19:03
  • Ok... then change it. Most people (like myself) shouldn't care since if you really didn't want someone else to throw code onto your Arduino, just unplug it. Also, another user most likely wouldn't be on at the same time as you... You're saying I should be worrying about a use case which wouldn't occur for most people and that it isn't recommended. I don't really see a purpose of leaving a comment on a seven month old thread... – Myspace Feb 22 '20 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.