Note. This page is slightly outdated. Modern Linux distributions typically have Bluetooth support out-of-the-box. Infrared is becoming a rarity.
This page describes how to exchange data between Nokia 3650 and a computer running Linux. This tutorial also applies to such phones like 7650 or 9210. 3650 is a camera phone, like 7650. It supports file transfers over infrared and bluetooth.
A supported infrared adapter and OpenOBEX
First, you must have infrared support in your kernel. Go to your kernel sources and type make xconfig (or whatever you use). Go to IrDA (infrared) support menu.
Compile IrDA subsystem support in to the kernel. Now you must choose a driver for your IR port. Go to Infrared-port device drivers menu. Select the driver for your IR port and either IrTTY or IrPORT.
I have an Actisys IR-220L IR Port, so I selected IrTTY, Serial dongle support and ACTiSYS IR-220L and IR220L+ dongle drivers.
After you have made your selections, recompile the kernel, install the modules and reboot if necessary. You also need to download and configure IrDA tools. (Under debian you can just apt-get irda-tools)
You need OpenOBEX in order to exchange files with your phone. Go to OpenOBEX homepage and download the latest version. (Remember to get the openobex-apps as well!)
Compiling them should be rather straightforward, just unpack, configure, make and make install. When you have installed everything, its time to test the connection with your phone. Enable infrared from your phone and place it next to your computers IR port. Then try uploading something to the phone like this:
irobex_palm3 test.jpg
If everything went right, the file should appear in the phone's inbox. Cool, so now we can upload things to the phone. So how can I get stuff from the phone ? First on your computer, just run irobex_palm3 without any arguments. Then select a file from your phone and send it using infrared.
This page describes how to get Bluetooth working under Linux and exchange data with your phone with OBEX over Bluetooth. You can see also the bluetooth tutorial contributed by Heiko Thede.
Many distributions support Bluetooth out of the box now, so I have removed the OBEX part of this tutorial as it was a bit out of date. More user friendly tools are now available. If you use KDE, I recommend kbluetooth.
See also Bluetooth tutorial contributed by Heiko Thede.
The first thing you need is the Bluetooth adapter. I have a Epox Bluetooth Dongle BT-DG03 which I bought from Verkkokauppa.com. Check the device compatability list here to see which one to buy. (Most USB dongles are supported) If you have a kernel older than 2.4.21, you must download the appropriate patch from the BlueZ homepage (see link above). To apply the patch go to your kernel sources (eg. /usr/src/linux/) and type patch -p1 <filename>.
Now configure your kernel. You must enable the following:
And from Bluetooth device drivers, select the appropriate driver for you adapter. If you have a USB dongle, use HCI USB driver. Recompile your kernel and modules. After installing the new kernel and modules, you need the userspace utilities. Download and install bluez-utils. When you have the drivers loaded in memory and the utilities installed, it is time to set up the programs.
First, from your phone, enable Bluetooth support, give the device a name and set it to be seen to all. Now, from your computer, run hcitool scan. Your phone's name and bluetooth address should appear. You will need this address from now on. Since we wan't to send and receive data to the phone with OBEX, we should configure that now. Edit /etc/bluetooth/rfcomm.conf and add this:
rfcomm0 {
device <your bluetooth address>
channel 10;
comment "3650 OBEX Push";
}
This is needed so you can upload things to your phone. To be able to receive object pushes, run the following command:
sdptool add --channel=10 OPUSH
Place this somewhere in the startup scripts so it is run after sdpd is started.
The Nokia 3650 stores videos in H.263 format. It is possible to watch them on a linux box. In this example, we use MPlayer.
First download MPlayer and install it. (Note that mplayer should have support for ffmpeg). If you try to watch a video from your cellphone with mplayer now, it will most likely fail with an error message something like this:
Cannot find codec matching selected -vo and video format 0x33363273.
This is easily fixed though. Copy the codecs.conf file from mplayer sources etc/ directory to ~/.mplayer/ . Then add the following line under the videocodec ffh263 section:
format 0x33363273
Watching videos should now work. You can download this sample video I took with my 3650 to see if your MPlayer setup works.
You probably want to convert the videos to some other format so you can use them with other apps as well. Luckily, this is very easy as mplayer includes a video conversion tool mencoder. Here are some important parameters to mencoder.
mencoder [options] [ file | URL | - ] [-o file]
Output video format: -ovc
Use -ovc help to get a list of supported output formats.
Example: -ovc divx4 encode a DIVX4 avi.
Output audio format: -oac
Use -oac help to get a list of supported output formats.
Example: -oac pcm use raw PCM.
Audio:
Since the 3650 doesn't record audio with the video,
sometimes you might want to splice in seperate audio.
This can be done with mencoder's -audiofile parameter.
Example: -oac pcm -audiofile soundtrack.wav
Seeking:
You can set the starting position with -ss or -sb.
with -sb, you can set the starting byte position
and with -ss the position in seconds. For example -ss 2.5
would start at 2.5 seconds or -ss 01:05:00 would start at 65 seconds.
You can send the end position with -endpos. For example -endpos 10 would stop at 10 seconds.
See the mencoder man page for more info.