Go Down

Topic: Arduino IDE 'Port already in use' (Read 1 time) previous topic - next topic

Hoonse

hi

i am using the arduino now for a few years and i love it!!!

today i got a little problem and after searching for hours in the web i don't know what to do now but lets go step by step.

the last week i updated my os to MacOS 10.7 Lion.
today i wanted to start a new arduino project.
i installed the arduino IDE and the driver for the serial controller on the board.
i installed java runtime enviroment version SE 6 from Apple Inc.
i can select the board and i can select the right serial port, in my case: cu.usbserial-A800elg2 for the arduino duemilanove
but when i try to upload the code the error message is:


Binary sketch size: 1018 bytes (of a 30720 byte maximum)
processing.app.SerialException: Serial port '/dev/cu.usbserial-A800eIg2' already in use.  Try quiting any programs that may be using it.
   at processing.app.Serial.<init>(Serial.java:144)
   at processing.app.Serial.<init>(Serial.java:76)
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:75)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
   at processing.app.Sketch.upload(Sketch.java:1603)
   at processing.app.Sketch.exportApplet(Sketch.java:1568)
   at processing.app.Sketch.exportApplet(Sketch.java:1524)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
   at java.lang.Thread.run(Thread.java:680)
processing.app.debug.RunnerException: Serial port '/dev/cu.usbserial-A800eIg2' already in use.  Try quiting any programs that may be using it.
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:99)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
   at processing.app.Sketch.upload(Sketch.java:1603)
   at processing.app.Sketch.exportApplet(Sketch.java:1568)
   at processing.app.Sketch.exportApplet(Sketch.java:1524)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
   at java.lang.Thread.run(Thread.java:680)


i have also tried it with a arduino mega and a arduino pro mini 5V.
i couldn't find any other program and i am sure there is none that uses this serial port.

i also tried to use another RXTX library but i couldn't find any that works.
this sucks because i need this for a school project i should make...

i hope anyone of you got an idea who to fix that...

greetins form austira and please excuse my bad english =)

greetins Hoonse

Hoonse

i have an update for you

i have tried a new arduino mega (without the FDTI chip)

it has the same problem.

i really hope that someone knows what to do =(

greetings from austria
Hoonse

James C4S

At the terminal use "lsof | grep <serialport name>".  It will tell you all the processes using the serial port.

You can either use the full name "/dev/cu.usbmodemXXXXX" or just use "usbmodemXXXX".
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Hoonse

Hi and thanks for the awnser.

i tried this but there is no output:

Leeeroys-MacBook-Pro:~ Jenkins$ lsof | grep usbserial-A800elg2
Leeeroys-MacBook-Pro:~ Jenkins$

is this good or bad ? =)

greetings Hoonse

James C4S

The debug output shows a capital-I where appear to have used a lowercase-l.   (might just be a font issue.)

I would suggest just using "usbmodem" in the search.

If lsof returns nothing, then no other applications are using the file. (in unix/OSX devices are file-handles.)
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Hoonse

i have checked it again with:
Leeeroys-MacBook-Pro:~ Jenkins$ lsof | grep usbserial
Leeeroys-MacBook-Pro:~ Jenkins$ lsof | grep /dec/usbserial
Leeeroys-MacBook-Pro:~ Jenkins$

but it makes no difference... could it be a problem with the RXTX library?!

greetings hoonse

Hoonse

I fixed the problem by setting
Chmod 777 /var/lock
And
Chmod 777 /var/spools/uucp

Thanks for the help
Greetings hoonse

joeconway

Just a +1 for the above solution. I had the exact same problem using an Arduino Uno on OS X 10.7 with the error message "port already in use...etc."

changing permissions for /var/lock and /var/spool/uucp worked like a charm

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy