Solution to gnu.io.PortInUseException (on Mac OS X)

703 views
Skip to first unread message

Kees de Kooter

unread,
Jan 4, 2013, 8:07:08 AM1/4/13
to ope...@googlegroups.com
While trying to make the plugwise binding work I encountered the gnu.io.PortInUseException. 

I found the solution here: http://playground.arduino.cc/Interfacing/Java. It is a locking issue of the RXTX library and can be solved by following these steps:

"1. The RXTX library places its lock files in the folder /var/lock - which sometimes does not exist. Open terminal and Create the lock directory (as root) by using the following command:
 
sudo mkdir /var/lock

And enter your root password when prompted.

2. The appropriate permissions need to be applied to the /var/lock directory to allow the program to be run without being root. It is necessary to make sure you're in the group uucp and make sure the directory has group write permissions to uucp. Replace ‘username’ with your profile user name.

 
sudo dscl . -append /groups/_uucp GroupMembership username 
sudo chgrp uucp /var/lock 
sudo chmod 775 /var/lock"

Or by running the fixperm script found on http://jlog.org/rxtx-mac.html

Kai Kreuzer

unread,
Jan 4, 2013, 8:10:35 AM1/4/13
to ope...@googlegroups.com
This information is also available at the end of the wiki page of the serial binding: http://code.google.com/p/openhab/wiki/SerialBinding
Possibly not easy to find there, if you are just interested in the Plugwise binding ;-)

Regards,
Kai

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/JCnjgOLnTDwJ.
To post to this group, send email to ope...@googlegroups.com.
To unsubscribe from this group, send email to openhab+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openhab?hl=en.

Reply all
Reply to author
Forward
0 new messages