LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices


By Hammett at 2004-06-08 05:18
After many many months of trying almost everything, finally I managed to get file transfers between my Linux box and my mobile phone (Nokia 3650), although it will work also on other mobile phones with bluetooth. Take a look at p3nfs for all compatible mobiles. Here are the steps:

The things you're gonna need are: bluez, bluez libs, bluez apps, and p3nfs.

First of all, load rfcomm module, and run it. If you get an error such as "rfcomm: can"t get device list: operation not supported" you need to do the following:
Go to the kernel source directory and do "make menuconfig", save the config to a file, after that, edit that file and look for CONFIG_BLUEZ_RFCOMM_TTY=m and substitute the "m" for a "y", so you end up with CONFIG_BLUEZ_RFCOMM_TTY=y. This is a kernel bug, as this cannot be build up as a module, but in the config appears as, that's why you get the error.
This error has been seen in kernels 2.4.22 to 2.4.25 (the ones I tried). Seems that with kernel 2.6 the bug has been fixed (at least in 2.6.6).
Once changed this, save the file, run kernel configuration and load the new config. Now compile it.

OK, now is time to pair the mobile with the dongle:

First of all, activate the dongle by doing "hciconfig up"
In your mobile, enable bluetooth and make it discoverable to all devices, once that is done, run "hcitool scan", for seeing your mobile

Code:
[root][/etc/bluetooth]$ hcitool scan
Scanning ...
        00:60:57:75:7C:36       Hammett
Keep that address (your mobile phone), as you will need it later on.

OK, now ping you phone to see that there's connection, for doing that type:

Code:
[root][/etc/bluetooth]$ l2ping 00:60:57:75:7C:36 (Mobile's address)
Ping: 00:60:57:75:7C:36 from 00:01:53:00:0D:08 (data size 20) ...
0 bytes from 00:60:57:75:7C:36 id 200 time 27.89ms
0 bytes from 00:60:57:75:7C:36 id 201 time 29.96ms
0 bytes from 00:60:57:75:7C:36 id 202 time 16.25ms
0 bytes from 00:60:57:75:7C:36 id 203 time 16.18ms
0 bytes from 00:60:57:75:7C:36 id 204 time 15.80ms
5 sent, 5 received, 0% loss
(Note that lower L, not 1 in l2ping). You should get something like that.

So far so good. Now it's time to configure RFCOMM. If you don't have a rfcomm0 device (most probably you won't), do:
Code:
cd /dev && mknod --mode 666 /dev/rfcomm0 c 216 0
Now, go to /etc/bluetooth directory, there are 3 files: hci.config, pin and rfcomm.config
Edit pin file and enter there the pin code you wish.
In your mobile phone, try to discover the PC, when PIN code is prompted, put the same PIN as in the file, you should pair the phone.

Edit rfcomm.config file and put the relevant information there (basically phone's address and port to use, which p3nfs use is port 4).
After that, you must bind /dev/rfcomm to that service, for doing that:
Code:
rfcomm bind /dev/rfcomm0 00:60:57:75:7C:36 4
(Substitute address by your's and note the 4 at the end, is the port we use). It is also advisable that you put this line also in a rc.d file, so you will bind the device at boot time.


Now is time to configure p3nfs. It is very easy to compile and install. What does p3nfs is to mount mobile's filesystem in the PC, so you can browse it as it was another part of your Linux box, so:
1.- create a mount point for the mobile
2.- Download the client p3nfs for the mobile at http://www.daimi.au.dk/~kbn/nfsapp-2.7-series60.sis , the only problem here is that you must install that SIS file on the phone by uploading it from windows (for example).
3.- Once client is installed on the phone, run it, and within 30seconds you must run:
Code:
p3nfsd -series60 -tty /dev/rfcomm0 -dir /mnt/mobil/
Where /mnt/mobil is the mount point we created before (make any changes you need)
If you are using other mobile that is not Nokia, or compatible with series60, you have to change that as well. In p3nfs website you have a description of each "series" and which mobiles work with them.

And woot!! Now you can go to the mobile's mount point and start browsing.
For transferring pictures from the phone to the mobile, just copy them!! Like if it was another HDD, the other way round also works (Transfers from PC to MOBILE).

I suggest you to make a script to connect to the phone, it's more easy than writing all this command.

Well, that's how i managed to get working File transfers between Linux and Nokia 3650. I don't know how to make it for calendar synchronization or anything else, this is just file transfer (pictures and tunes basically).

Hope this will be useful to somebody, if so, please let me know. Also if there's any mistake or something is not working, I'll try to manage what's wrong.

I apologize in advance if there's any errors on the process, but I don't think i missed any part.

by Hammett on Mon, 2004-11-29 12:41
IMPORTANT UPDATE!!!!!

As KiyuKo find out, p3nfs client version 5.15 and above uses rfcomm port 11. Port 4 is not used anymore to make connections.

by earcam on Wed, 2004-12-01 19:40
Hi,

Found i had to run /usr/sbin/hcid and /usr/sbin/sdpd otherwise i couldn't bind properly (could l2ping phone but phone failed recognise PIN code).

Good article Hammett Had the USB dongle and phone set up & fully connected in about 5 minutes, and transfer speeds are excellent (took ~ 2hours to transfer 5meg via infra-red, now takes ~ 30secs)

I didn't opt for mount the phone (p3nfs seems quite buggy and doesn't list k700i as supported). Instead used kde-bluetooth, sending to phone with 'rightClick->Actions->Send With Bluetooth'. When data is sent from the phone a kde notifcation pops up.

Question: With p3nfs what happens if battery dies or move out of range during transfer?


See also http://www.westmaster.com/zidek/p900/bluetooth/ for details to complement the article under discussion in this thread.

Details:
distro: Suse 9.1
dongle: no brand cheapo (uk £12) SCR widcomm?
phone: SonyEricsson k700i

by Hammett on Wed, 2004-12-15 07:40
Yes, hcid has to be running for sure, but you don't need sdpd in order to mount the phone (no binding is requiered) and you are right, p3nfs is quite buggy at the moment (I experienced myself some hangings), but since I was unable to pair the mobile (mainly because I didn't know I needed sdpd running) and due to the lack of information on the net about Bluetooth and mobile phones, I found out mounting the mobile was a quite good solution (actually the only one).

Mounting the filesystem has some benefits though, for example knowing exactly what's on your mobile, or delete some apps that mobile's OS refuse to do (due to errors or whatever). Also is easy to transfer by doing "cp Image* /home/images" than having to select them one by one and transfer them.

Recently I changed from Nokia 3650 to Sony Ericsson T630, and I cannot mount the phone anymore, so I had to "dive" into the net for a solution, and it was sdpd and obexserver.

The fact that k700i (and t630) are not listed in p3nfs website, does not mean it will not work. This software works (or should) in all Symbian mobiles. If you find out k700i is running Symbian, sure you'll be able to mount it. As for myself, I haven't been able to discover which OS runs T630, but now I really don't care that much since I've been able to use "regular" bluetooth transfers.

Anyway, I'm glad my post helped you out connecting your mobile

by earcam on Wed, 2004-12-15 16:34
For a wealth of Sony Ericsson stuff try;

http://developer.sonyericsson.com/

You'll need to sign up to access downloads and whitepapers (you can join for free under Community Membership).

Like most SE phones, the T630 uses Symbian

When you mount the FS does it include the firmware OS portion? If so it may be possible to perform firmware updates without docking station...

cheers

by Hammett on Wed, 2004-12-15 18:57
Mmmmmm, interesting question that one about the firmware....I really cannot tell, as I never thought of upgrading mobile's firmware. Even though T630 uses Symbian, I cannot install any app on the phone (just games, tunes and pictures) so p3nfs client won't run.

What I can tell is that when I mounted the Nokia, it had 4 drives, c, d, e and z. E was where pictures and sounds where stored. C was more like /boot partition, D I cannot tell, really, and Z was some kind of "where the base system is stored". It is by far, the biggest partition. I guess all Symbian SO is in there, but it's quite dangerous to play over there, as you can damage the device.

PS: Thanks for the link, though

by pukington on Sat, 2005-03-12 10:42
hi, i'm pretty new to the world of linux as anything other than an end user, now i'm running fc2 and really getting into it, so i'm sat here thinkin what can i do next and see my Sony K700i sat beside me, do a google and your topic comes up!

So, i'm playing around, i check the P3nfs page and they say its all Sony Ericson compat. i've done a locate and found that i have the bluez type things you say i do and a lot comes up, i need to instal the P3nfs and bear in mind i'm a relative newb, so could you please help me out.

I've downloaded the relative file, but as i'm not 100% with linux file structure, where should i place it. You say "First of all, load rfcomm module, and run it" is this part of the P3nfs as i dont believe i have this is on my system as it stands.

Looking forward to getting this working, thanks for any help, as always

by kevmania on Tue, 2006-05-09 07:32
Hi

Please excuse any silly mistakes in what I'm about to describe - be gentle

I've unpacked p3nfs on SuSE Pro 9 and have started to work through the README to install and configure it.

When I try and run the pre-built binary I get a shared library error saying it can't find librfcomm.so.1

I'm guessing that I need to find that and add it to my path so I'm trying that as Plan A.

I've also tried building the source but have also hit problems. The 'configure' utility works OK now I've installed gcc but I get compile errors when I run 'make' - telling me that commands have been deprecated and so fort (3 errors I think).

Anyone any suggestions?

Cheers

Kevin


  



All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration