Home > processing
processing Archive
processing シリアルの設定メモ
- 2007-05-17 (木)
- processing
Mac上のprocessingでシリアルを使う場合、最初にちょっとした設定を施す必要がある。それについてのメモ。
かつてシリアルのセットアップをした環境でも、それがprocessing 0111以前の場合は、再度このインストールをする必要ありとのこと。
1) 管理者権限でログインし、
processing -> libraries -> serial -> macosx_setup.command
を起動。はいはいと答え、パスワードを入力。
2) 再起動する。
ただし、OS10.4(Tiger)の場合、再起動ではだめで、電源を切り-入れ直すべきとの記述がprocessingのserial library解説にあるのでそのようにする。
個人マシン(常に管理者権限)で使用する分にはここまでの作業で問題なく動作すると思います。
一方、教室にある共用マシンの場合、学生用のアカウントではシリアルが使えないという問題が起きていた。
実行時にこんなエラーメッセージが出る。
check_group_uucp(): error testing lock file creation Error details: Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
lock fileはシリアルポートを複数のプロセスで使う事が無いように制御するために作成される鍵のようなものなのだが、このアカウントはそのファイルを作成することが許可されていないのだった。
対処法は以下の通り。
1) /var/spool/uucpというフォルダがあるか確認
ない場合、
sudo mkdir /var/spool/uucp
でそれを作成。
sudo chmod 775 /var/spool/uucp
としてパーミッションを設定
2) グループにアカウントを追加
sudo niutil -appendprop / /groups/uucp users 使用したいアカウント名
以上でオッケーです。rxtxのインストーラについていた説明に全部書いてある。以下原文より引用
AFTER INSTALLATION VERY IMPORTANT
check existence of the folder /var/spool/uucp
if you don't have it create it with command
sudo mkdir /var/spool/uucp
permissions should be: drwxrwxr-x
if they are not do command
sudo chmod 775 /var/spool/uucp
YOU should be a member of the uucp group
you can check it with command
niutil -readprop / /groups/uucp users
you should see your name in output of the niutil command
if you don't do following:
sudo niutil -appendprop / /groups/uucp users
substitutewith your user's name
for example if your user name is peter:
sudo niutil -appendprop / /groups/uucp users peter
- Comment (Close): 0
- TrackBack: 0
Home > processing