Thursday, December 18, 2008

Mounting a cellphone through bluetooth on the EeePC

Before you start following this blog entry, make sure bluetooth is working and your computer is all set for pairing your device. So this time I will explain how you can mount your cellphone, and browse your phone as if it were an internal disk. But before we start, You must know that browsing over bluetooth isn't the fastest way. Make sure your browser only shows lists and doesn't show icon's. This might speed things up. Or you could use a non graphical file browser like midnight commander or if you want a GUI without the icon's, you could try Krusader

Time to do some mounting. We do need several packages, so that we will be eable to mount a cellphone. We will be using the Obex file system, so you'll have to make sure your phone is capable of using obex. It's not that hard to find out, whether your phone can handle obex or not.

sdptool search --bdaddr AA:BB:CC:DD:EE:FF 0x1002

Replace the macaddress by the one of your phone. You will see a lot of services. You'll have to find the channel number for "OBEX File transfer" service.

Now you'll have to check if you have fuse-utils, libopenobex1 and obexfs installed. On the EeePC with xandros, you'll have to download the obex files, because they are not in the repositories, and install them manually.
wget http://ftp.nl.debian.org/debian/pool/main/libo/libopenobex/libopenobex1_1.3-3_i386.deb
wget http://ftp.nl.debian.org/debian/pool/main/o/obexfs/obexfs_0.10-3+b2_i386.deb

sudo dpkg -i libopenobex1_1.3-3_i386.deb
sudo dpkg -i obexfs_0.10-3+b2_i386.deb

Let's mount the phone for the first time. We will have to pair both the EeePC and the phone and therefore we need the passkey-agent. Replace the pin with the one you have put in the givepin script, the mac-addr. and the channelnumber (the x in -Bx). The phone will ask you a pin number.

mdkir /home/user/phone
./passkey-agent --default 1234 &
obexfs -b AA:BB:CC:DD:EE:FF -Bx /home/user/phone
ls /home/user/phone
fusermount -u /home/user/phone
Rember, bluetooth is slow, so give it time while browsing the device. The next time you mount, you won't need to run the passkey-agent again (pairing has been done). Trying to put this into /etc/fstab, doesn't work. There is some bug in the obexfs, so that unmounting as user keeps failing, but you could make a script that checks if the phone has been mounted or not and than does the opposite.


Share/Save/Bookmark

No comments: