天上天下唯我独尊!!(FreeBSD) - iPhoneとFreeBSDの連系を考える(3)
iPhoneとの連系記事も今回で3回めになるのですが、懲りずに今日も続きの記事を書きます^^;


ifuseコマンドを使って気になったのが、"・・・FAM Server・・・"というメッセージ。どうやら、UUIDと関係がありそう?

(gtkpod:2908): Gtk-WARNING **: Error loading theme icon 'playlist-photo' for stock: テーマの中にアイコン 'playlist-photo' はありません
Couldn't find get device UUID itdbprep processing won't work!

(gtkpod:2908): WARNING **: Trying to unlock an already unlocked device

end from FAM server connection


と、言うことで

ifuse /media/iphone --root -u 0xxxxx2caxxxxxd47exxxxx3c2xxxxxa2xxxxx20


uuidを指定して実行しました。すると、以下のメッセージが表示されました。

Failed to connect to lockdownd service on the device.
Try again. If it still fails try rebooting your device.

iPhone4Sをリブートしてみましたが、同じでした。
やはり、何やってもダメ。


で、/devel/famよりインストール。途中、gamin-0.1.10_4とコンフリクトしてたので処置しました。
で、インストール中にこんなメッセージが表示されます。

'******************************************************************'
'* *'
'* Note! Kernel support for imon was not detected. fam should *'
'* still work, but it will have to poll monitored filesystems *'
'* instead of receiving file operation events from the kernel. *'
'* *'
'* If you think your kernel has imon, see what this script is *'
'* looking for (on Linux, probably /usr/include/linux/imon.h), *'
'* fix the problem (perhaps by adding a link), and run this *'
'* again. (You probably need to remove config.cache first.) *'
'* *'
'* See http://oss.sgi.com/projects/fam/ for more information. *'
'* *'
'******************************************************************'

そんで、メッセージに従ってもろもろ設定します。
1. In order to run this port, please add the following line to /etc/rpc if
it is not already there:

'--------------------------------------------------------------------'
sgi_fam 391002
'--------------------------------------------------------------------'

2. To run fam from inetd (the recommended method), then please add the
following lines to /etc/inetd.conf if they are not already there:

'--------------------------------------------------------------------'
# FAM: File Alteration Monitor [devel/fam]
sgi_fam/1-2 stream rpc/tcp wait root /usr/local/bin/fam fam
'--------------------------------------------------------------------'

After modifying /etc/inetd.conf, you must (as root) run:

killall -HUP inetd

Fam also requires that portmapper is running. Add the appropriate
entry to /etc/rc.conf:

For 4.x:
Add portmap_enable="YES" and either reboot or run /usr/sbin/portmap.

For 5.x and later:
Add rpcbind_enable="YES" and either reboot or run /etc/rc.d/rpcbind start.

'************************************************************************'

設定後、もう一度ifuseを実行します。

ifuse /media/iphone --root -u 0xxxxx2caxxxxxd47exxxxx3c2xxxxxa2xxxxx20

No device found, is it connected?
If it is make sure that your user has permissions to access the raw usb device.
If you're still having issues try unplugging the device and reconnecting it.

で、iPhone4Sを再起動してもう一度ifuseを実行すると、今度は以下のメッセージが表示されました。

Failed to connect to lockdownd service on the device.
Try again. If it still fails try rebooting your device.

結局、iPhone4Sがロックされているのでもう一度iPhone4Sを再起動して試してみましたが、結果変わらず・・・。gtkpodでは以下のようになりました。
「ファイルの追加ができました」と表示されますが、結局、ファイルが取得出来ないようです。これは、iPhone4S側でロックが掛かっている為です。

ただ、今回のやり方で一通り出来る事は分かりましたので、将来、iPhone側でロックが解除されれば、今回のやりかたでgtkpod上で音楽やpodなどが同期出来るようになると思います。








また、余談ですが、USB接続でPTPによりiPhone4S上の写真は取り込む動作は正常に動く事が確認できました。僕はdigikamを使って試しましたが他のツールでも出来ると思います。こちらの記事。

まぁ、また機会があればもう少し解析してみたいと思います。
FreeBSD側だけの問題ではないので、iPhone側をjailbreakeするなどの手段も必要になるかもしれません。ただ、僕の場合、 jailbreakeしてまではやるつもりはないので、AppleがiTunes以外のツールに公開する日迄待つしかないのかな・・?