kde4 bluetooth files open

Various KDE 1.-4. Improvements

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5.0
Description:

kde4 currently does not support directly open bluetooth devices in konqueror or dolphin , like it was in kde3.
There is a smal script for very powerfull gtk2 application blueman (let's not discuss here that kdebluetooth4 is far away from something working at a moment) , which allows you open bluetooth device in konqueror after you click "Browse Files on device" .See the screenshot

Dependencies:
1.blueman (which is gtk2 application , but can handle everything you need with bluetooth devices)
2.obexfs (fuse virtual file system for bluetooth devices) .It's VERY recomended to have latest version - at least obexfs-0.11 or better obexfs-0.12
3. konqueror (dolphin does not handle these shares yet.Sorry)

How to setup:
1.Copy attached script to /usr/local/bin and make it executable
2.In blueman options "Local Services->Advanced" point the command to open the files to the one provided by me on second screenshot:
/usr/local/bin/bluemankde4_open %d
3 Add user you are logged in kde to the group "fuse" .It's required to run obexfs as user

If all Ok You will see the same screen in konqueror as mine.And from that moment you are able to read and write to bluetooth device
If you have any problems , please send me the output of /var/log/messages .I will take a look and will help
Last changelog:

11 years ago

0.1
Initial version
0.2
changed path to cat : from /usr/bin/cat to cat
0.3
now script first checks and unmounts phone if it's already mounted.It's fix error when empty dir opens when phone was mounted first time long quite some time ago
improve code structure.Logical parts of code moved to functions
improved popup messages notifications

rayunix

11 years ago

how can I make obexfs more verbose ?

Report

C

sergeidanilov

11 years ago

create in advance /tmp/00:21:36:62:F7:28
and execute
obexfs -b 00:21:36:62:F7:28 -B 10 /tmp/00:21:36:62:F7:28

or

obexfs -b 00:21:36:62:F7:28 -B 5 -- -d -f /tmp/00:21:36:62:F7:28

Report

rayunix

11 years ago

yes,I already did it ,but there are no messages about obexfs in terminal or in var/log/messages
I compiled obexfs from sources,I try with another phone,but there are no results.

Report

rayunix

11 years ago

var/log/messages

Jul 22 22:04:03 rayunix bluemankde4_open[4247]: Create directory /tmp/00:21:36:62:F7:28 to mount the phone by bluetooth
Jul 22 22:04:03 rayunix bluemankde4_open[4251]: Mount phone 00:21:36:62:F7:28 to /tmp/00:21:36:62:F7:28 using obexfs
Jul 22 22:04:09 rayunix bluemankde4_open[4262]: Found 0 mounted /tmp/00:21:36:62:F7:28 inside /proc/mounts
Jul 22 22:04:20 rayunix bluemankde4_open[4275]: Create directory /tmp/00:21:36:62:F7:28 to mount the phone by bluetooth
Jul 22 22:04:20 rayunix bluemankde4_open[4279]: Mount phone 00:21:36:62:F7:28 to /tmp/00:21:36:62:F7:28 using obexfs
Jul 22 22:04:26 rayunix bluemankde4_open[4290]: Found 0 mounted /tmp/00:21:36:62:F7:28 inside /proc/mounts
Jul 22 22:04:35 rayunix bluemankde4_open[4303]: Create directory /tmp/00:21:36:62:F7:28 to mount the phone by bluetooth
Jul 22 22:04:35 rayunix bluemankde4_open[4307]: Mount phone 00:21:36:62:F7:28 to /tmp/00:21:36:62:F7:28 using obexfs
Jul 22 22:04:41 rayunix bluemankde4_open[4318]: Found 0 mounted /tmp/00:21:36:62:F7:28 inside /proc/mounts
Jul 22 22:05:05 rayunix kernel: [ 311.932081] usb 4-2: new full speed USB device using ohci_hcd and address 2
Jul 22 22:05:05 rayunix kernel: [ 312.101334] usb 4-2: configuration #1 chosen from 1 choice
Jul 22 22:05:05 rayunix kernel: [ 312.120565] scsi7 : SCSI emulation for USB Mass Storage devices
Jul 22 22:05:06 rayunix pppd[2382]: Timeout waiting for PADO packets
Jul 22 22:05:10 rayunix kernel: [ 317.590264] scsi 7:0:0:0: Direct-Access Motorola RAZRV3xx 2.31 PQ: 0 ANSI: 2
Jul 22 22:05:10 rayunix kernel: [ 317.604244] sd 7:0:0:0: [sdc] 1967104 512-byte hardware sectors: (1.00 GB/960 MiB)
Jul 22 22:05:10 rayunix kernel: [ 317.610187] sd 7:0:0:0: [sdc] Write Protect is off
Jul 22 22:05:10 rayunix kernel: [ 317.629191] sd 7:0:0:0: [sdc] 1967104 512-byte hardware sectors: (1.00 GB/960 MiB)
Jul 22 22:05:10 rayunix kernel: [ 317.635215] sd 7:0:0:0: [sdc] Write Protect is off
Jul 22 22:05:10 rayunix kernel: [ 317.635247] sdc: sdc1
Jul 22 22:05:10 rayunix kernel: [ 317.650538] sd 7:0:0:0: [sdc] Attached SCSI removable disk
Jul 22 22:05:10 rayunix kernel: [ 317.650712] sd 7:0:0:0: Attached scsi generic sg3 type 0
Jul 22 22:05:14 rayunix kernel: [ 321.600351] usb 4-2: USB disconnect, address 2
Jul 22 22:05:33 rayunix kernel: [ 340.520078] usb 4-2: new full speed USB device using ohci_hcd and address 3
Jul 22 22:05:33 rayunix kernel: [ 340.692237] usb 4-2: configuration #1 chosen from 1 choice
Jul 22 22:05:33 rayunix kernel: [ 340.764319] cdc_acm 4-2:1.0: ttyACM0: USB ACM device
Jul 22 22:05:33 rayunix kernel: [ 340.767347] usbcore: registered new interface driver cdc_acm
Jul 22 22:05:33 rayunix kernel: [ 340.767358] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Jul 22 22:06:09 rayunix kernel: [ 375.877922] usb 4-2: USB disconnect, address 3
Jul 22 22:06:11 rayunix pppd[2382]: Timeout waiting for PADO packets
Jul 22 22:06:12 rayunix kernel: [ 379.316079] usb 4-2: new full speed USB device using ohci_hcd and address 4
Jul 22 22:06:12 rayunix kernel: [ 379.485319] usb 4-2: configuration #1 chosen from 1 choice
Jul 22 22:06:12 rayunix kernel: [ 379.489292] cdc_acm 4-2:1.0: ttyACM0: USB ACM device
Jul 22 22:06:26 rayunix pppd[4483]: pppd 2.4.5 started by root, uid 0
Jul 22 22:06:26 rayunix pppd[4483]: Using interface ppp0
Jul 22 22:06:26 rayunix pppd[4483]: Connect: ppp0 <--> /dev/ttyACM0
Jul 22 22:06:26 rayunix pppd[4483]: PAP authentication succeeded
Jul 22 22:06:26 rayunix kernel: [ 393.520168] PPP BSD Compression module registered
Jul 22 22:06:26 rayunix kernel: [ 393.550148] PPP Deflate Compression module registered
Jul 22 22:06:29 rayunix pppd[4483]: local IP address 151.82.5.176
Jul 22 22:06:29 rayunix pppd[4483]: remote IP address 192.168.100.101
Jul 22 22:06:29 rayunix pppd[4483]: primary DNS address 193.70.152.25
Jul 22 22:06:29 rayunix pppd[4483]: secondary DNS address 193.70.192.25
Jul 22 22:06:29 rayunix kernel: [ 396.756215] ip_tables: (C) 2000-2006 Netfilter Core Team
Jul 22 22:07:16 rayunix pppd[2382]: Timeout waiting for PADO packets
Jul 22 22:08:21 rayunix pppd[2382]: Timeout waiting for PADO packets
Jul 22 22:09:26 rayunix pppd[2382]: Timeout waiting for PADO packets
Jul 22 22:10:32 rayunix pppd[2382]: Timeout waiting for PADO packets
Jul 22 22:10:32 rayunix pppd[2382]: Exit.

Report

C

sergeidanilov

11 years ago

ok, you log states that obexfs command was completed , but device was not mounted.
could you try to run by hand
obexfs -b 00:21:36:62:F7:28 /tmp/00:21:36:62:F7:28
and could you also tell , if it you was successfull earlier to mount this device in linux? (may be some extra drivers needed)

Report

rayunix

11 years ago

[email protected]:~$ sudo obexfs -b 00:21:36:62:F7:28 /tmp/00:21:36:62:F7:28
[sudo] password for enrico:
[email protected]:~$

but when I open the directory /tmp/00:21:36:62:F7:28 with konqueror
it says that not exists.
I cannot mount my phone.
May I forgot anything ?
My distro is kubuntu jaunty
My phone is motorola v3xx
Thanks ..

Report

C

sergeidanilov

11 years ago

don't use sudo , run obexfs as user.
and then open then try to open this dir as a user.
Otherwise using sudo you will be able to open this dir only as s root

Report

rayunix

11 years ago

the risults are the same

Report

rayunix

11 years ago

ok,now if I do obexfs -b 00:21:36:62:F7:28 /tmp/00:21:36:62:F7:28
,the directory will be created and I can open it with konqueror,but it's empty

Report

C

sergeidanilov

11 years ago

let's try to make obexfs more verbose , because problem belongs to it
try to
create under user dir /tmp/00:21:36:62:F7:28 , if it does not exist
And execute obexfs -b 00:21:36:62:F7:28 -B 10 /tmp/00:21:36:62:F7:28

it should generate more output to console ot to /var/log/messages.
Will see what it states

Report

C

sergeidanilov

11 years ago

ok ,
I just read from there
http://dev.zuckschwerdt.org/openobex/wiki/ObexFs
that your user should be in fuse group.
It might be the case ;)

Report

bigbrovar

11 years ago

Bluetooth is completely broken on kubuntu 9.04 and i had to use blueman which always worked for me when i was a gnomey :) .. your guide provided the missing link stoping me from using blueman to its potential on kde.. however i didnt everything you said and came with this error

[email protected]:/usr/bin# tail -f /var/log/messages
Jul 22 20:23:16 g33k-puN bluemankde4_open[480]: Mount phone 00:25:CF:57:9A:B5 to /tmp/00:25:CF:57:9A:B5 using obexfs
Jul 22 20:23:16 g33k-puN bluemankde4_open[483]: /usr/bin/bluemankde4_open: line 9: obexfs: command not found
Jul 22 20:23:16 g33k-puN bluemankde4_open[488]: Found 0 mounted /tmp/00:25:CF:57:9A:B5 inside /proc/mounts
Jul 22 20:23:35 g33k-puN bluemankde4_open[509]: Create directory /tmp/00:25:CF:57:9A:B5 to mount the phone by bluetooth
Jul 22 20:23:35 g33k-puN bluemankde4_open[513]: Mount phone 00:25:CF:57:9A:B5 to /tmp/00:25:CF:57:9A:B5 using obexfs
Jul 22 20:23:35 g33k-puN bluemankde4_open[516]: /usr/bin/bluemankde4_open: line 9: obexfs: command not found
Jul 22 20:23:35 g33k-puN bluemankde4_open[521]: Found 0 mounted /tmp/00:25:CF:57:9A:B5 inside /proc/mounts
Jul 22 20:25:33 g33k-puN bluemankde4_open[1058]: Create directory /tmp/00:25:CF:57:9A:B5 to mount the phone by bluetooth
Jul 22 20:25:33 g33k-puN bluemankde4_open[1062]: Mount phone 00:25:CF:57:9A:B5 to /tmp/00:25:CF:57:9A:B5 using obexfs
Jul 22 20:25:36 g33k-puN bluemankde4_open[1074]: Found 0 mounted /tmp/00:25:CF:57:9A:B5 inside /proc/mounts

what gives

Report

rayunix

11 years ago

have you already installed obexfs ?
#apt-get install obexfs

Report

bigbrovar

11 years ago

yeah i have obexfs installed already

Report

C

sergeidanilov

11 years ago

It seems that something wrong with obexfs installation, because log you send states that obexfs is not found

"/usr/bin/bluemankde4_open: line 9: obexfs: command not found"

could you try run in the console:
1. which obexfs
2. and if command is found
obexfs -b 00:25:CF:57:9A:B5 /tmp/00:25:CF:57:9A:B5

Report

11 years ago

0.1
Initial version
0.2
changed path to cat : from /usr/bin/cat to cat
0.3
now script first checks and unmounts phone if it's already mounted.It's fix error when empty dir opens when phone was mounted first time long quite some time ago
improve code structure.Logical parts of code moved to functions
improved popup messages notifications

12345678910
Be the first to comment
File (click to download) Version Description PackagetypeArchitecture Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.3
updated Aug 16 2009
added Jul 22 2009
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0