This is an ongoing article on how to use bluetooth in Linux, and connecting it with series 60 Nokia phones. Come back for updates.
Update:
2005.11.02 -
almost gave up, stopped since i have lots of other things to do, but later resumed and walla! i got p3nfsd working, finally. Added new findings
2005.11.01 -
begin of document. very non-organized, hard to comprehend (since i just make short notes of what i did here, but will rewrite when i really find the time soon.)
Bluetooth on Linux
1. things needed: bluetooth packages (tbu)
if /dev/rfcomm0 is not there, you need to create it yourself:
wahlau:~$ cd /dev && sudo mknod --mode 666 /dev/rfcomm0 c 216 0
To send files
1. run command with name of the file you want to transfer
wahlau:~$ gnome-obex-send <filename>
you will be prompted on the phone to accept the file
mount phone as a nfs mount
needed:
p3nfsd
If you are using Ubuntu Breezy start with
wahlau:~$ sudo apt-get install p3nfs
the client file on your phone, nfsapp is found in the source of the p3nfsd file under /bin. find it then send it using gnome-obex-send.
if not already configured, please make sure the following entry exist in your /etc/bluetooth/rfcomm.conf
rfcomm0 {
bind yes;
device <bdaddr>;
channel 3;
comment "Nokia 6260";
}you have to check and make sure channel number and bluetooth address is correct. if no idea how this works, check out <link to conf>
the number of channel is the tricky part. I must have missed it somewhere while reading through all the how-tos, but i have always thought it has to be the channel of some OBEX services. So i had lots of tests around port 9, 10 and 12. Guess what? at the end my conclusion was : use any unused port found on your phone. 3 works for me with my Nokia 6260. To know which port is free, use sdptool to browse your phones
wahlau:~$ sdptool browse
you will end up with a list of sdp services available on your phone. Check through and just use one that is not mentioned.
when rfcomm.conf is configured, now try the following:
wahlau:~$ sudo rfcomm bind rfcomm0
wahlau:~$ sudo rfcomm -a
rfcomm0: 00:11:9F:6C:2E:E8 channel 3 clean
great. to be sure, you should now check whether /dev/rfcomm0 is there.
wahlau:~$ ls /dev/rfcomm0
/dev/rfcomm0
if everything happens as above, you are just one step away from successful mount of your nokia phone. First start the nfsapp nfsclient on your series 60 phone. you would get the following:
<screenshot>
Now go on with p3nfsd
wahlau:~$ sudo p3nfsd -series60 -tty /dev/rfcomm0 -dir /mnt/nokia
p3nfsd: version 5.18, using /dev/rfcomm0 (115200), mounting on /mnt/nokia
p3nfsd: to stop the server do "ls /mnt/nokia/exit". (pid 12616)
now you can browse and access /mnt/nokia and see the content of your nokia phone as if it is a partition on your computer. At this point i would still need to access it as super user, but as long as i can access it, fine for the time being.
to stop, you only need to issue the exit command as mentioned above
wahlau:~$ sudo ls /mnt/nokia/exit
ls: /mnt/nokia/exit: File exists
wahlau:~$ p3nfsd: exiting.
well that's it. Happy hacking :)
Comments
Excelent!
Excelent tutorial my friend, i had p3nfs a long time ago but i can't figure out how make it work... all tricky thing was in channel. I lost a big amount of time in test too... almost give up until found your how-to. Very useful
Cheers!