Saturday, March 14, 2009

How to Transfer files from your ubuntu machine to your mobile phone ?

Straight away Lets kickstart this blog post by installing a couple of new packages. Nokia phones mostly support Obex protocol. The most important packages for transferring data through the USB cable are
1. obexftp 2.openobex-apps.
These can be installed from the synaptic package manager *system*->strong>Administration*->strong>Synaptic Package manager*
or from the terminal using
sudo apt-get install obexftp
sudo apt-get install openobex-apps
Now you need a front end for this file transfer application. The front end can be downloaded from softpedia. Now we need to add the mobile phone to the list of recognized devices.
Go to terminal and type
lsusb.
This gives you the list of usb devices connected to your system.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 011: ID 0421:0061 Nokia Mobile Phones
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 004: ID 0a5c:2110 Broadcom Corp. Bluetooth Controller
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
This is the output from your system. It has recognized the nokia phone connected to my machine. Here the *Vendor ID * is 0421 and *Product Id* is 0061.
Copy paste the following into the terminal.
sudo gedit /etc/udev/rules.d/40-permissions.rules
Add the following line to the end of the file
BUS=="usb", SYSFS{idVendor}=="VendorID", SYSFS{idProduct}=="ProductID", GROUP="plugdev", USER="yourUserName"
add VendorID and ProductID from the lsusb listing and the username of your machine in place of “yourUserName”.
BUS=="usb", SYSFS{idVendor}=="0421", SYSFS{idProduct}=="0061", GROUP="plugdev", USER="juggernaut"
Now create a launcher on the desktop. In the command field, add the following code java -jar /home/USER/path_to_obex_ftp_from_softpedia/OBEXFTPFrontend.jar
Double click the launcher. A configure dialog will appear. Enter */usr/bin/obexftp* in the obexFTP path field. Select USB as the transfer option and set the value field to either 000 or 001 or 002. For every option, test if the connection can be established. If a connection cannot be established, try plugging in the mobile phone to a different usb port. This should help. This video is a tutorial in using ObexFTP to transfer files.

Thanks to maurice and ashlakim.

No comments: