Pages: [1]   Go Down
Author Topic: Mac OSX "port in use" error  (Read 491 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 119
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have an Arduino Diecimilia, and I cant use it with my pretty Macbook.  I know the board works, because I've programmed it multiple times with my windows box.  Here is the error I get when I try to program it:

processing.app.SerialException: Serial port '/dev/tty.usbserial-A4001nDf' already in use.  Try quiting any programs that may be using it.
      at processing.app.Serial.<init>(Serial.java:140)
      at processing.app.Serial.<init>(Serial.java:72)
      at processing.app.Uploader.flushSerialBuffer(Uploader.java:66)
      at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:55)
      at processing.app.Sketch.upload(Sketch.java:1632)
      at processing.app.Sketch.exportApplet(Sketch.java:1701)
      at processing.app.Editor$41.run(Editor.java:2004)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I tried doing a lsof | grep usbserial, but it doesn't return any results (from what i understand, lsof tells you who is using the port.)

please help!  its a pain in the butt to have to use windows, and i cant play with my arduino on the go :-/
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 119
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

update:  i ran the macosx_setup command from arduino 0005 and it fixed my problems.  yay!
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Strange.  Which version of the Arduino software are you using?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 119
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this was on both 0009 and 0010.  i ran into it with 0009 but my board worked on windows so i forgot about it.  when 0010 came out i decided i needed to be able to use my macbook with it, and finally sat down and fixed it.

perhaps it would be a good idea to re-include that script just in case?  or even better, make it part of the arduino code that handles that error?
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The strange thing is that you shouldn't need to run the script at all.  What it does is set up permission on a directory used for locking, but the version of RXTX included with Arduino shouldn't use locks at all (since they're in a non-standard location for the Mac, they don't really help anyway, since most other programs don't know about them).  Do you have any versions of librxtxSerial.jnilib or comm.jar or jcl.jar in any of your Java directories?  
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 119
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ah yes, that could be it... i installed them as part of the RepRap host library code.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That would probably explain it.  The default versions of RXTX use the lock files.
Logged

Pages: [1]   Go Up
Jump to: