Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix the serial port in use issue for Java/Arduino on OS X Lion.
--- Fix the Arduino Serial Port in use Issue on OS X Lion
--- copyleft jens alexander ewald, ififelse.net
--- based on a google search with the keywords:
--- "osx lion arduino port already in use"
--- Credit also to this bolg entry: http://marcosc.com/2011/10/arduino-java-error-serial-port-already-in-use/
--- Download a compiled version here: http://ififelse.net/get/ArduinoLionFix.zip
try
display dialog "Would you like to fix the Lion issue for Arduino (Admin priviliges needed!)?" buttons ¬
{"Yes, please!", "Nope, i'm fine."} with icon stop default button 1 giving up after 30
set DlogResult to result
if button returned of result = "Yes, please!" then
do shell script "sudo mkdir -p /var/lock && sudo chmod 0777 /var/lock" with administrator privileges
display dialog "Fix successfully applied." buttons {"Thanks"} with icon note
else
display dialog "Fix was not applied. Try again, if you need to." buttons {"OK"} with icon caution
end if
on error errorMsg number errorNum
display alert "Could not fix it!" message "Try: sudo \"mkdir /var/lock && sudo chomd 0777 /var/lock\" in the Terminal. " & errorMsg buttons "Cancel" default button 1
end try
@bjosephs

This comment has been minimized.

Copy link

commented May 6, 2013

This isn't working for me. It runs as described but the "port in use" error is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.