HOWTO: ic902 OBEX File Transfer

From HowardForums Wiki

Jump to: navigation, search

Contents

HOWTO: ic902 OBEX File Transfer

This is a HOWTO article on how to use bluetooth to transfer a file to your ic902. The directions can be used for other phones but the ic902 will be the focus of this article.

What is OBEX?

OBEX which is short for OBject EXchange is a bluetooth protocol for transferring files such as ringtones, pictures, music files, and other kinds of files to a bluetooth enabled mobile device.

What is needed?

To use OBEX with your PC and ic902, you need the following:

  • Your IC902 (or a mobile device with an OBEX File Transfer profile)
  • A bluetooth adapter for your PC.
  • An OBEX File Transfer program.
  • Files to transfer.
  • A beer charged to martinj_001's credit card I couldn't resist.

So how are we going to do it?

There are several platforms which have bluetooth support. I am well versed in Linux, and if I really wanted to, I could reboot into Windows and figure it out for you. I will not get into how to setup your bluetooth adapter as there are too many different kinds to cover here, but I will tell you the general requirements that you need to use yours successfully.

Linux


Linux has several options to do this. I personally run Gentoo Linux and used some of the bluetooth HOWTO's at Gentoo-Wiki to get my bluetooth running. In general you need to have the following:

  • A propperly configured linux kernel
    • Kernel|Bluetooth support
Networking -->
  <M> Bluetooth subsystem support -->
    <M> L2CAP protocol support
    <M> RFCOMM protocol support
    [*]   RFCOMM TTY support
        Bluetooth device drivers --->
          <M> HCI USB driver
RFCOMM is not necessary but you may want to enable it, however, if you get the following error message "Can't create device: Operation not permitted" or to prevent it.
You also need to enable any modules that will support your bluetooth adapter.
  • BlueZ The Official Linux Bluetooth Stack
    • Consult BlueZ documentation and that of your distribution for installing and running BlueZ
  • OpenOBEX A free and open source implementation of the OBEX stack.
    • Consult OpenOBEX documentation and that of your distribution for installing and running OpenOBEX
  • KDE Bluetooth Framework For those who like KDE
    • Consult KDE Bluetooth documentation and that of your distribution for installing and running KDE Bluetooth, limited instructions will be provided.
  • GNOME Bluetooth Subsystem For those who like GNOME
    • Consult GNOME Bluetooth Subsystem documentation and that of your distribution for installing and running GNOME Bluetooth Subsystem, limited instructions will be provided.

Once you have your kernel configured and have installed BlueZ and OpenOBEX, plug your adapter in and the required modules will load automatically, or if your if you have an internal adapter, modprobe the bluetooth module (you may need to be root for this). Then check with lsmod to see that the module is loaded. Run dmesg|tail -n 10 to make sure the kernel recognized your adapter. You can also use lsusb to see if your adapter is listed or lspci for internal adapters. Here is what mine looks like.

Loading Bluetooth on my Linux rig.

         deported1@phoenix ~ $ sudo modprobe bluetooth
         
         deported1@phoenix ~ $ lsmod| grep bluetooth
         bluetooth              60580  7 hci_usb,rfcomm,l2cap
         
         deported1@phoenix ~ $ dmesg | tail -n 10
         typesconfig[5920]: segfault at 0 rip 4010ab rsp 7fffc7d98450 error 6
         usb 3-3: USB disconnect, address 3
         usb 3-3: new full speed USB device using ohci_hcd and address 4
         usb 3-3: configuration #1 chosen from 1 choice
         usb 3-3: USB disconnect, address 4
         usbcore: deregistering interface driver hci_usb
         usb 3-3: new full speed USB device using ohci_hcd and address 5
         usb 3-3: configuration #1 chosen from 1 choice
         Bluetooth: HCI USB driver ver 2.9
         usbcore: registered new interface driver hci_usb
         
         deported1@phoenix ~ $ sudo lsusb 
         Bus 002 Device 002: ID 058f:9360 Alcor Micro Corp. 8-in-1 Media Card Reader
         Bus 002 Device 001: ID 0000:0000
         Bus 004 Device 001: ID 0000:0000
         Bus 003 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
         Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
         Bus 003 Device 001: ID 0000:0000
         Bus 001 Device 002: ID 04b8:0813 Seiko Epson Corp.
         Bus 001 Device 001: ID 0000:0000

If you have problems here, go back and check your connections, BIOS configuration (for internal adapters), and your kernel configuration.

Once it is all good you may have to load the bluetooth daemon. generally speaking if there is a script in /etc/init.d or a similar directory, called bluetooth or something bluetooth related, you need to run it passing start on the command line as root. On my rig it goes a little something like this.

    deported1@phoenix ~ $ sudo /etc/init.d/bluetooth start
     * Starting Bluetooth ...
     *     Starting hcid ...                                                                                                                   [ ok ]
     *     Starting rfcomm ...                                                                                                                 [ ok ]

If you can't get it started consult your distribution's documentation and the documentation for BlueZ. Once it's running, proceed.

Now we start getting into the fun. When you install the bluez package (on gentoo net-wireless/bluez-utils and net-wireless/bluez-libs), you have an utility called hcitool. This is a tool that allows you to manually manipulate your bluetooth adapter.

hcitool help listing

    deported1@phoenix ~ $ hcitool --help
    hcitool - HCI Tool ver 3.28
    Usage:
            hcitool [options] <command> [command parameters]
    Options:
            --help  Display help
            -i dev  HCI device
    Commands:
            dev     Display local devices
            inq     Inquire remote devices
            scan    Scan for remote devices
            name    Get name from remote device
            info    Get information from remote device
            spinq   Start periodic inquiry
            epinq   Exit periodic inquiry
            cmd     Submit arbitrary HCI commands
            con     Display active connections
            cc      Create connection to remote device
            dc      Disconnect from remote device
            sr      Switch master/slave role
            cpt     Change connection packet type
            rssi    Display connection RSSI
            lq      Display link quality
            tpl     Display transmit power level
            afh     Display AFH channel map
            lst     Set/display link supervision timeout
            auth    Request authentication
            enc     Set connection encryption
            key     Change connection link key
            clkoff  Read clock offset
            clock   Read local or remote clock
    
    For more information on the usage of each command use:
            hcitool <command> --help

The first thing is testing our adapter and this is done simply by running hcitool dev. The command should return the device name that your adpter is on, for example hci0 and the MAC (Media Access Control) Address of your adapter.

My hcitool dev results

    deported1@phoenix ~ $ hcitool dev
    Devices:
            hci0    00:17:9A:2B:0E:DF

If you can't get this, then you need to go back and check your kernel modules, connections, and bios settings. Also read the BlueZ documentation to make sure the bluetooth service is configured properly (it should run out of the box once it is installed though).

Now that we know that our adapter is running it's time to find our phone. So prepare your phone by going to Menu>Settings/Tools>Tools>Bluetooth. And either select "Find Me" or press the left softkey for options>settings and set device visibility to "Always Visible", then press the right softkey to save the settings.

Now back on your Linux rig, on the command line, run hcitool scan. It will take about a minute to complete, but when it is done, it will list the MAC address of your phone's bluetooth, and your phones bluetooth name. It will also list any other discoverable bluetooth devices as well. This is what I get when I run hcitool scan.

My hcitool scan results

    deported1@phoenix ~ $ hcitool scan
    Scanning ...
            00:1E:8D:B1:06:D6       UBIX ic902

If you see something like this, then you are golden, otherwise, go back and check everything.

Now your ready to begin transferring your files.

KDE

Ok so you have your bluetooth adapter running at this point and you can use hcitool to scan for and find your phone. Now, as a KDE user, you want to find your phone and transfer files to your phone. At this point I only have copying to the phone working, and so far, I can only do it on the KDE 3.5.x series KDE system. But if you want to get your ringtones and wallpapers on there. This works well enough for now. I will include screenshots as I go where I can.

So first lets start out by getting kdebluetooth running, by going into the KMenu>Settings>kbluetooth, or just run kbluetooth in the run dialog . This will put an icon in your system tray similar to the bluetooth logo. Instead of a stick figure B on a blue ellipse, it is a stick figure K on a gray ellipse, it turns blue and red as data is transfered and an active connection is present.

Once kdebluetooth is running, you will want to right click the kdebluetooth icon, and select devices under configuration.

When the devices dialog opens, you will be presented with a tab for each adapter you have installed (if you are really geeky) or just one for the one that you have like me. Here you can set the name of your computer, if it can be discovered by other bluetooth devices and for how long.

Once you set your computer to be discoverable, go to you your phone. Go to Menu>Settings/Tools>Tools>Bluetooth. Select "Add New", and wait for your phone to find your computer. Select your computer's name, enter a PIN (any number that is at least 4 digits long is fine), and press OK.

Your computer will then respond by presenting the kdebluetooth PIN request dialog. Enter the same PIN you entered on your phone and click OK or press enter.

Once you complete the pairing, confirm that the phone and PC are paired by going to Menu>Settings/Tools>Tools>Bluetooth and seeing that your PC is listed, and on your PC, right click on the kdebluetooth icon, go to devices and "Paired/Trusted Devices" and check to see that your phone is listed.

After you do this, your phone will list your computer as a paired device. Highlight your computer in the device list, and press the right softkey for options. Select "Security" from the menu and set the security level to "Automatic" and press the left soft key to save the settings. This will make the file transfers easier as your phone will not prompt you to approve the incoming connection from your computer.

Now left click the kdebluetooth icon. This will open the KDE Konqueror file manager and point it to the bluetooth:/ network browser. Here you will find all discoverable bluetooth devices. So make sure your phone is discoverable, like we discussed in the previous section. Click on your phone and it will show you the available services for you to use on your phone.

Now the two profiles listed here are "OBEX File Transfer" and "OBEX Push Transfer" the profile of interest is "OBEX File Transfer". The push profile is used by the phone to recieve contact information "pushed" from another phone. So go ahead and click on "OBEX File Transfer" and you will be taken to a directory listing on your phones root folder (well apparent root).

Once you are here, open another konqueror window and point it to the files you wand to transfer. Rename the files you want to transfer to short names, I would recommend no more than 15 characters for ease of use.

Select the files you want to transfer and drag them to the other konqueror window that is pointed to your cell phone. Do not try to to drop them on any of the directroies that are listed on your phone. Just drop them right there in the root of the phone, and the phone will automatically move the files to the appropriate folder. If a menu asking to copy or move appears, just select copy.

Konqueror will not display the files on your phone and for some reason it can not directly access the directories.

Now to confirm that the the files transfered. wait for the copy dialog to close. Then on your phone, go to Menu>Settings/Tools>File Manager and look for your ringtones under "Sounds" and wallpapers under pictures. These sounds and pictures will not show up in my content, but can be assigned as a ringtone, or wallpaper from with in the phones file manager. If you made it this far through the HOWTO, then you should know how to that ;).

So once you are done, you can close konqueror, and sit back and enjoy that beer you bought with martinj_001's credit card.

I really need to get screen shots of the rest of the process and of the phone so you can see what I'm talking about
I will get them as soon as I can, and I will try to get some other platforms and methods done too.
I know we all aren't Linux/KDE users, so I will try to accommodate, but I am giving power to the geeks first ;).
As soon as I can get this to work with KDE 4 I will add that as well.
GNOME

Ok, so how's my friends of the GNU Network Object Module Environment doing? I got my GNOME desktop fired up and manipulating files on my ic902 over bluetooth with GNOME was far easier than what I could do with KDE, and I was able to do a lot more. First lets review the required software needed to do what we want to do.

So here's what we need:

  1. A linux kernel with proper modules.
  2. The BlueZ Linux bluetooth stack.
  3. OpenOBEX A free and open source implementation of the OBEX stack.
  4. GNOME Bluetooth Subsystem
  5. The GNOME VFS OBEXFTP plugin for the GNOME VFS system.
On gentoo linux for example the packages needed to be merged are:
*net-wireless/bluez-libs
*net-wireless/bluez-utils
*net-wireless/bluez-gnome
*app-mobilephone/openobex
*gnome-extra/gnome-vfs-obexftp

Be sure to check with your distributions documentation for the exact packages you need, how to install them and if they are available from them, or if you need to roll your own.

So once you have the software installed, GNOME will automatically launch it's bluetooth subsystem once your adapter is found. So make sure it's plugged in, and if you need to, under System>Preferences>Bluetooth, you can configure GNOME's bluetooth options. You can tell that the bluetooth system is up and running when you see the GNOME bluetooth icon in your system tray.

Now you have to pair your phone for the sake of making this easy. So you need to go to your phone and go to Menu>Settings/Tools>Tools>Bluetooth>Add New. This will scan for your computer, so select your computer's name, and your phone will ask for a PIN. Again, any 4 digit number will do. Once you enter your PIN on the phone and hit OK, a DBUS notification will pop up asking you to enter the PIN for pairing with your phone. So click on "Enter Passkey", in the window that pops up, enter the PIN you entered on your phone, and click OK or hit enter. Another DBUS notification will let you know it was successful.

Once you get the devices paired, you can go back into the preferences dialog and see that it is listed as a paired device. You can access the preferences dialog through the GNOME menu as I described earlier or you can right click the bluetooth icon in the system tray and select preferences.

If your phone is listed here then you are good to go, if not go back and start again.

Now I want to browse my phone in Nautilus so I can transfer files, to do this, I right click on the bluetooth icon and select browse device. A dialog will appear asking you to choose what device you want to browse, all you need to do is select your phone and click ok, and a nautilus window will open to the root of your phones accessible file system.

Now to copy files to the phone, you can do it the same way as the KDE section. You just need to drag the files into the nautilus window that has your phone's files displayed. Just drag them to any white space in the window, and the phone will automatically move the files into the appropriate folder.

In my example I have a ringtone called "CAN'T STOP LOVING YOU.mp3" (the song as performed by Van Halen) that I want to use when my girlfriend calls me. So I have the file on my desktop and I just drag it into the nautilus window with my phones files displayed in it.

Now nautilus will also alow you to copy files to a specific folder, unlike Konqueror in KDE. Now I only recommend doing this if you want to copy files to your external memory card which is the folder called "MMC(Removable)". Just drag the file you want to copy and drop right on the folder you want to copy to.

Since you can copy files to a specific folder you can also browse the other folders on your phone as well. Just double click the folder and a nautilus window with it's contents will open up for you to look at. This is great for confirming that the files you copied are on your phone.

Now you can also manipulate the files on your phone the same way you would manipulate any file on your computer with nautilus. To copy files from the phone to the computer just drag and drop to your desktop or to another nautilus window with the folder you want the files in open. The only thing is when you delete a file from your phone, it will not go to the gnome trash can, but be deleted directly. It will prompt you for approval before deleting the file.

So I am going to delete the file I just copied by right clicking it, selecting move to trash in the context menu, then click OK in the warning dialog.

Now I hope this helps you Linux/GNOME freaks manage the files on your phone. Give a shot, and play around with the different things.

And like the KDE section, it's time to kick back and enjoy that beer you charged to martinj_001's credit card.

Command Line

!!COMING SOON!!

Windows


~Needed materials~ -bluetooth usb adapter or a built in bluetooth adapter i know some computers come with it.(i am using a usb adapter iogear) -A IC902 Cell Phone with bluetooth enabled -A computer -Computer Knowledge -And last windows xp home edition or xp pro(I don't know if vista will work try it and report back)


~Table of contents~ 1.How To Install Bluetooth On Your computer 2.How To Enable Bluetooth On Your Phone 3.How to Tell Which OS You Have(windows xp home,Pro,ect.) 4.How to Use The OBEX File Transfer 5.F.A.Q


1.How To Install Bluetooth On Your computer

Ok First of you have to buy or get a bluetooth adapter im using iogear here is a pic

Image:Bluetooth adapter.jpeg

ok after you get the bluetooth adapter take out the cd and install the drivers

Image:Cd.jpeg

This is what my disk looks like

Image:Cd disk.jpeg

Ok when you are done installing drivers you need to setup your bluetooth go down to the bluetooth icon on your computer and right click it and press advanced configuration set the coputer name to what ever you want and the type of computer you have is what you have pretty easy

congratulations you now have bluetooth on your computer!!

2.How To Enable Bluetooth On Your Phone

Ok firt goto menu then settings/tools next goto tools after goto bluetooth now press options then settings make bluetooth power say on also you may want to change the device name default it is motorola phone u can change that to ic902 now press save ok there you go there should be a little bluetooth sign at the top blinking

3.How to Tell Which OS You Have(windows xp home,Pro,ect.)

ok this is easy if your screen sorta looks like this you have windows xp

Image:Windows xp.jpeg

if not u probably have vista(if your computer is new u have most likely vista

4.How to Use The OBEX File Transfer

ok first open your phone goto menu/setting&tools/tools/bluetooth/ then press find me now press add new then press ok on the name you put before for your computer enter 123456789 and press ok then on your cmputer a sign should come up and say bluetooth pin required press it next type in 123456789 again and press ok it should bring you back to trusted devices scroll over the coputer u just added and press connect then an note should pop up press it and then press accept then right click on the green bluetooth icon on the bottom right go to quick connect and then file transfer and click other devices wait and press your phone(ic902 if u did what i said before) and press ok the your phone should beep and press yes and go back to my bluetooth places there you go

Made By Tvs1230 Copyright Tvs1230 email:Tvssull@aol.com Youtube.com/tvs12301 do not repost without permission and do not edit this unless it is for good reasons email me before you edit to ask sellingcheap.co.nr

MacOS X


!!COMING MUCH MUCH LATER IF NEVER!!



Sager58 11:48, 15 March 2008 (CDT)

This article was originally written by Francis Sager, this work is copyrighted, and I give permission for people to modify and reproduce this article for non-commercial use, providing that all contributing authors are attributed and credited propperly.

Personal tools