I used to have great success on mac (about a year ago on an older version of OSX and arduino IDE), but recently I can't seem to upload to Arduino consistently. Nine out of ten times I get the errors below and one out of ten I get a successful upload.
I'm running
OSX 10.10.4 on a mac book air
Arduino 1.6.5
Trying to upload to: Uno R3, Mega2560, bare conductive board. I have multiple of each and have reproduced the problem on all of them. Also, I'm able to upload successfully from another Ubuntu machine that I have, so I think the hardware is ok.
It's unclear what is the culprit. I've read that the mac ftdi drivers have changed, but the new Arduino boards have ditched the FTDI chip for an onboard usb-serial-converter. I also noticed that the /dev/tty.usbmodem* has disappeared from the port options under tools, so I have to use /dev/cu.usbmodem*. Oddly, if I ls /dev from the command line both cu.usbmodem and tty.usbmodem exist.
I frequently get one of the errors below and the boards fail to program, occasionally I get no error and the board fails to program silently. Restarting the Arduino IDE will normally allow me to upload the first time and then will give me errors on subsequent uploads, ~10% successful. I get similar errors trying to open the serial port and need to try about 6-10 times before connecting.
Is anyone else seeing this? Any suggestions on troubleshooting this issue?
Errors:
Error opening serial port '/dev/cu.usbmodem1421'. (Port busy)
avrdude: ser_open(): can't open device "/dev/cu.usbmodem1421": Resource busy
avrdude: ser_send(): write error: Bad file descriptor
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:131)
at processing.app.debug.Compiler.upload(Compiler.java:165)
at processing.app.Sketch.upload(Sketch.java:1167)
at processing.app.Sketch.exportApplet(Sketch.java:1141)
at processing.app.Sketch.exportApplet(Sketch.java:1113)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:745)
Caused by: processing.app.SerialException: Error touching serial port '/dev/cu.usbmodem1421'.
at processing.app.Serial.touchForCDCReset(Serial.java:92)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:120)
... 6 more
Caused by: jssc.SerialPortException: Port name - /dev/cu.usbmodem1421; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:86)
... 7 more
I have basically the same setup and have had the exact same problem for quite a long time now. Problems i have encountered are as follows:
Uploading a sketch works 1/5 times
after upload
Serial monitor will open 1/5 times
My programs act weirdly when USB cable is connected.
SOLUTION (specific for Dimaru)
Kill the Moveslink process by typing in the terminal: kill 896
You will notice that it worked when the moveslink icon disappears. The 896 is the process id specific to the program using that serial port which is unavailable. I guess the moveslink software is sniffing the usb port for the suunto wrist watch and therefore uploading a sketch works only every now and then. I will now make sure that moveslink won't start during startup and cause the same problem.
I had the same issue, tried some terminal commands to no avail, and then figured out that I had connected the Arduino to a different USB port on my MacBook than I had when I initially used it. Switched to the other USB port, problem solved!
slingshotdancu:
I had the same issue, tried some terminal commands to no avail, and then figured out that I had connected the Arduino to a different USB port on my MacBook than I had when I initially used it. Switched to the other USB port, problem solved!
I feel so stupid, after 6 hours of banging my head against the wall. This solved my issue. Thank you
Really was the usb cable - tried a short high quality one that didn't work, tried a dozen other solutions, and then found an old thing covered in gaffer tape that worked fine. Moral of the story is; try ten usb cables before you try any hardcore troubleshooting