Pages: [1]   Go Down
Author Topic: Arduino IDE 'Port already in use'  (Read 1219 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* Bildschirmfoto 2011-08-06 um 11.32.50.png (78.88 KB, 446x253 - viewed 23 times.)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-cry

greetings from austria
Hoonse
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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".
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.)
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks for the help
Greetings hoonse
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: