PDA

View Full Version : File transfer with Bluetooth


tbox
2006-10-17, 03:21 AM CDT
Firstly, transfering a file from a bluetooth device to Linux Fedora Core 5 is easy. The FC5 kernel is 2.6.18-1.2200 on a 32 bit machine.
I have the following: A Motorola V360 with Bluetooth. My PC is connected to a bluetooth doggle (blue thunder). My desktop is on the default GNOME 2.14.3.

[OPTIONAL]
Install usbutils-0.71-2 as it helps to detect the USB bluetooth doggle.
As root
yum install usbutils
1. Ensure that the bluetooth clients are installed:
gnome-bluetooth
gnome-bluetooth-libs
yum -y install gnome-bluetooth gnome-bluetooth-libs Dependency: libbtctl-0.6.0-5 and openobex-1.1-1
2. Ensure the Bluetooth service is running. Since my PC does not have Bluetooth, I need to plugin the bluetooth doggle now. Display the end of the log file.
As root
cat /var/log/messagesThis will display some HCI device messages. Mine shows the following:
Oct 29 14:20:27 xcitebox hcid[27885]: HCI dev 0 registered
Oct 29 14:20:27 xcitebox kernel: hci_cmd_task: hci0 command tx timeout
Oct 29 14:20:27 xcitebox hcid[1630]: HCI dev 0 registered
Oct 29 14:20:28 xcitebox hcid[27885]: HCI dev 0 up
Oct 29 14:20:28 xcitebox hcid[27885]: Starting security manager 0
Oct 29 14:20:28 xcitebox hcid[1630]: HCI dev 0 up
Oct 29 14:20:28 xcitebox hcid[1630]: Starting security manager 0


As root
service bluetooth start
3. Test the connection by the following command:
As user
hcitool scan
4. At the phone
Select bluetooth link menu
->Set up ->Find Me

You should see that the hcitool scanning is able to find the phone.

5. Start the bluetooth client.

Application -> System tools -> Bluetooth File Sharing

On the phone send the image or any other data via bluetooth.
Example: On the phone select the Picture
-> menu -> copy -> bluetooth -> [Look for devices]
Select the Bluetooth doggle device

6. On the PC
When the bluetooth request is received a pop up box will appear
"Accept a file from <......your phone name...> "

Click "Accept"

Finally, you should be able to find the file in your home directory. Hope it works for you as simple as I have found it.

fdr
2006-11-01, 01:29 AM CST
Thanks for your guide. Could you tell me how to transfer files from FC5 PC to mobile by bluetooth

tbox
2006-11-01, 08:39 AM CST
This is continuation from the previous Howto I wrote. This assumes that you have manged to successfully transfer files from the bluetooth (phone) to PC. So now you want a file transfered to the bluetooth phone. Lets try this the simple way and that you have a standard setting on the bluetooth phone.
Before you start, check the following packages are installed:
gnome-utils-2.14.0-5.
gnome-bluetooth-0.7.0-2
gnome-bluetooth-libs-0.7.0-2
libbtctl-0.6.0-5
openobex-1.1-1

1. Ensure bluetooth service is running and detect services your phone provides

service bluetooth start
hcitool scan

Scanning ...
00:16:75:85:82:12 Moto V360 Nicholas

sdptool browse 00:16:75:85:82:12
2. On the FC5 PC.
As normal user.
Right click "Panel bar" -> "Add to panel" -> "Create a new launcher"
Click "Add" button and fillin as follows:

Name: Send via bluetooth
Generic name: gnome-obex
Command: gnome-obex-send %f
Type: Application
Icon: <Select the bluetooth symbol..looks like two arrow pointing to right on a blue pebble>

Click "Close"
Then Click "Close" button

3. Start bluetooth on the phone (I am using Motorola V360)
Menu -> bluetooth -> Setup -> Find Me

On the FC5 open Nautilus and search for a file type that the phone recognise. I am using JPEG file. Drag the file to the bluetooth icon on the panel.

Wait until a Window "Choose Bluetooth device" appears with your phone name. Click on the phone name and click "OK". On the phone you should see it is connecting and an "Incoming transfer" box appear". Click on "Accept" and wait for the file to be sent to the phone. Then click on "Save"

I hope that you find this information easy to follow. Please do let me know if there are problems with my explanation/steps. Also do let me know if it is successful for you and your environment.

Currently I am packaging the moto4lin for FC5. This package allows you to browse the phone directory to perform backups and to use as a modem. Its not fully completed/tested but you can test and let me know what needs to be fixed and how (be very detailed). Download the test as follows wget http://xcitebox.homelinux.net/moto4lin-0.3-0.FC5.i386.rpm

tbox
2006-11-01, 08:43 AM CST
Thanks for your guide. Could you tell me how to transfer files from FC5 PC to mobile by bluetooth
Welcome fdr, do let me know how it worked for you.

The whole purpose here is to try to have less command lines or manual editing of files. You cannot get everything done this way, but the basic or standard stuff should be fine.

fdr
2006-11-05, 10:29 PM CST
Dear Mr.tbox
My mobile is O2 and it use Windows Mobile 5. I can transfer files from mobile to PC as your guide. But when I try to send files from PC to mobile, the FC5 show message "Remote divide cannot support receving files". I try to fix the problem but until now it does not solve.
Thanks for your help any away.

coyoteboy
2006-12-11, 04:37 AM CST
Cant seem to get this to work:
/var/log/messages/:
Dec 11 12:24:13 localhost kernel: usb 4-2: new full speed USB device using uhci_ hcd and address 3
Dec 11 12:24:13 localhost kernel: usb 4-2: configuration #1 chosen from 1 choice
Dec 11 12:24:13 localhost hcid[4017]: HCI dev 0 registered
Dec 11 12:24:13 localhost hcid[4017]: HCI dev 0 up
Dec 11 12:24:13 localhost hcid[4017]: Starting security manager 0
Dec 11 12:24:38 localhost hcid[4173]: Bluetooth HCI daemon
Dec 11 12:24:38 localhost sdpd[4176]: init_server: opening L2CAP socket: Protoco l not supported
Dec 11 12:24:38 localhost sdpd[4176]: main: Server initialization failed
Dec 11 12:24:38 localhost hcid[4173]: Starting security manager 0
Dec 11 12:26:05 localhost kernel: audit(1165839965.104:13): avc: denied { crea te } for pid=4173 comm="hcid" name="bluetooth" scontext=root:system_r:bluetooth _t:s0 tcontext=root:object_r:var_lib_t:s0 tclass=dir

SELinux is in permissive mode so just warning i think.
I can HCI scan and find my phone but I cant seem to connect and the phone cant find the computer. All I need is for the computer to be able to accept files sent from the phone.

Any idea what the L2CAP issue is - is it my dongle not being compatible??

arirushan
2008-09-12, 11:56 PM CDT
I'm running FC9 and can send files to phone from pc just fine, but not from phone to pc.
It able to see the BT device but when I try to send it always says "sending failed".
Can somebody tell me why ?
TIA.