Created
December 1, 2011 20:39
-
-
Save jens-a-e/1419677 to your computer and use it in GitHub Desktop.
Fix the serial port in use issue for Java/Arduino on OS X Lion.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't working for me. It runs as described but the "port in use" error is unchanged.