Skip to content

Serial port already in use #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
woutgg opened this issue Feb 10, 2014 · 6 comments
Closed

Serial port already in use #129

woutgg opened this issue Feb 10, 2014 · 6 comments

Comments

@woutgg
Copy link

woutgg commented Feb 10, 2014

Each time I try to upload the sketch, Eclipse reports this message:
Serial port /dev/tty.usbmodem1411 already in use. Try quiting any programs that may be using it.
After dismissing the error it does start uploading though, and succeeds as well.

Trying to add the port (or any other serial port for that matter) to the serial monitor also results in a similar error and thus prevents me from using the serial monitor.

System details: Eclipse Kepler, OSX Mavericks, Arduino 1.5.5, plugin 2.2.0.1.

@TrippyLighting
Copy link

@woutgg
Copy link
Author

woutgg commented Feb 10, 2014

Oh nice. I did search around for a bit but couldn't find anything. This works like a charm, thanks so much!
I'll leave the ticket open since it's probably a good idea if the plugin would mention this in any way (or fix it automatically).

Edit: what I don't understand though, is that I did not get this error in the Arduino IDE indicating it has its own 'properly compiled' rxtx if I understand correctly. Does that mean the eclipse plugin uses a different one which does have locking compiled in?

@jantje
Copy link
Member

jantje commented Feb 11, 2014

the plugin comes with a rxtx but uses the rxtx delivered with arduino when possible (so it first tries to load the rxtx of arduino and if that fails tries to load the rxtx of the plugin.
You can see which rxtx is loaded in the preference page.
I don't know why arduino IDE does not have this issue. rxtx is going to be replaced in Arduino and that should solve all issues rofl. I'll have to do the same for the plugin.
We'll see.....

@jantje
Copy link
Member

jantje commented Feb 19, 2014

I have been reading up a bit on this issue and I think I get the picture.
The default RXTX lib needs the folder /var/lock to be writable. The Arduino RXTX lib does not.
What I think is that the mac version RXTX lib delivered by Arduino is only 32 bit. As such when you run a 64 bit Arduino eclipse plugin you still have the problem because it cannot load the 32 bit RXTX lib.
It may be the other way around (64 bit arduino IDE 32 bit eclipse) but I don't have a mac to test that.
You can see in the preferences with version of the rxtx you are using.
If this is reporting that the Arduino rxtx is being used I have another theory:
In mac a loib can be many version of the lib (os 32/64 bit ...) So maybe only the Arduino bit version is compiled with the option not to use /var/lock.
This theory is important as it means that replacing RXTX should solve this issue.
Can you check this theory?

@woutgg
Copy link
Author

woutgg commented Feb 19, 2014

I think you're right about why the default library fails, what's I concluded from the discussion as well.

Eclipse reports the plugin's own rxtx and again I think you're right here. Eclipse is purely 64 bit while Arduino's rxtx is a universal binary with only 32 bit intel and ppc (==very old) binaries compiled in, so it seems this explains the issue (and different behaviour of the arduino IDE).

@jantje
Copy link
Member

jantje commented Feb 19, 2014

Great, thanks
In that case I'll close this issue as issue #67 should fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants