Bug 321560 - obexftp for Dolphin, Konqueror doesn't list device files anymore.
Summary: obexftp for Dolphin, Konqueror doesn't list device files anymore.
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Unmaintained
Component: bluetooth-kio-obex (show other bugs)
Version: 4.10.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Fiestas
URL: http://forum.kde.org/viewtopic.php?f=...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-24 13:50 UTC by firewalker
Modified: 2014-12-19 16:40 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
obexd -d output (10.80 KB, application/octet-stream)
2014-03-10 18:48 UTC, hamelg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description firewalker 2013-06-24 13:50:41 UTC
After my last update KDE, Dolphin and Konqueror can no longer browse bluetooth devices using obexftp.

It always stays at The device is busy, waiting....

This is the kioobexftp output:
kioobexftp(14922) KioFtp::setHost: setHost:  "00-23-45-0c-62-78"
kioobexftp(14922) KioFtp::setHost: Waiting to stablish the connection
kioobexftp(14922) KioFtp::sessionClosed: Session closed:  "00:xx:xx:xx:xx:78"
kioobexftp(14922) KioFtp::listDir: listdir:  KUrl("obexftp://00-xx-xx-xx-xx-78")
kioobexftp(14922) KioFtp::blockUntilNotBusy: Blocking, kded is busy
kioobexftp(14922) KioFtp::blockUntilNotBusy: Blocking, kded is busy
...
kioobexftp(14922) KioFtp::blockUntilNotBusy: Blocking, kded is busy
kioobexftp(14922) KioFtp::blockUntilNotBusy: Blocking, kded is busy
kioobexftp(14922) KioFtp::blockUntilNotBusy: Blocking, kded is busy
kioobexftp(14922) KioFtp::blockUntilNotBusy: Blocking, kded is busy
...

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin.
2. Click the Bluetooth icon.
3. Open a listed bluetooth device.
4. Select "Browse Files".
Actual Results:  
It always stays at "The device is busy, waiting...".

Expected Results:  
It should list the files of the device.

Obexftp command can access the same devices normally.

obexftp -b 00:xx:xx:xx:xx:78 -l

    Browsing 00:xx:xx:xx:xx:78 ...
    Connecting..\done
    Receiving "(null)"...|<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd">
    <!--
     XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB
    -->
    <folder-listing version="1.0"><folder name="Phone Memory"/>
    <folder name="Memory Stick"/>
    </folder-listing>
    done
    Disconnecting../done
Comment 1 firewalker 2013-06-25 11:25:49 UTC
Just tried with a fresh user. It's the same as before.
Comment 2 hamelg 2013-07-16 18:58:08 UTC
same issue here.
Putting obex-data-server in debug mode while dolphin stays at "The device is busy, waiting...", gives that in loop :

obex-data-server[17260]: Parsed[0]: ftp
obex-data-server[17260]: FTP uuid selected, first checking for Nokia OBEX PC Suite Services uuid
obex-data-server[17260]: Connected SDP session
obex-data-server[17260]: SDP search process
obex-data-server[17260]: SDP search completed
obex-data-server[17260]: getting RFCOMM channel
obex-data-server[17260]: Connect in progress
obex-data-server[17260]: Connected
obex-data-server[17260]: Session created by: :1.5
obex-data-server[17260]: Used MTUs: RX=8192, TX=8192
obex-data-server[17260]: Request timeout (15s), session considered dead
obex-data-server[17260]: ##DEBUG: /org/openobex/session0 OBEX event: REQDONE(0x3), CONNECT(0x0), REQUEST_TIME_OUT(0x48)
obex-data-server[17260]: /org/openobex/session0: obex_request_done: command 0, response 72 (Unknown response)
obex-data-server[17260]: session_connect_result_cb
obex-data-server[17260]: session closed
obex-data-server[17260]: Removing listened DBUS name :1.5 (object: /org/openobex/session0)
obex-data-server[17260]: Removed from listened DBUS names list
obex-data-server[17260]: /org/openobex/session0: closing connection
Comment 3 firewalker 2013-08-19 15:37:21 UTC
The bug is still pressent with KDE 4.11.0.
Comment 4 hamelg 2013-09-22 18:55:47 UTC
still here in 4.11.1 :(
Comment 5 firewalker 2013-11-17 14:23:20 UTC
Still present in KDE 4.11.3
Comment 6 firewalker 2013-12-30 16:06:28 UTC
It seems to be fixed with KDE 4.12.0.
Comment 7 hamelg 2013-12-30 17:40:39 UTC
Unfortunately, it still doesn't work here.
The behaviour has changed. Now, dolphin displays an empty directory : 0 Folders, 0 Files.

kioobexftp says :
ioobexftp(3819) KioFtp::stat: Stat:  "obexftp://00-1a-89-0b-58-de"
kioobexftp(3819) KioFtp::stat: Stat Dir:  ""
kioobexftp(3819) KioFtp::stat: Stat File:  ""
kioobexftp(3819) KioFtp::stat: Empty Dir:  true
kioobexftp(3819) KioFtp::statHelper: KUrl("obexftp://00-1a-89-0b-58-de")
kioobexftp(3819) KioFtp::statHelper: statMap contains the url
kioobexftp(3819) KioFtp::stat: Finished

On CLI, obexftp works fine.
Comment 8 Alex Fiestas 2014-03-09 02:15:32 UTC
Min that what matters is NOT the version of KDE, but the version of BlueDevil.

Can you test this with BlueDevil 2.0-rc1?

Thanks!
Comment 9 hamelg 2014-03-09 18:44:44 UTC
bluedevil 2.0rc1 is installed on my system, and unfortunately the behaviour is the same.
Comment 10 Alex Fiestas 2014-03-10 15:14:20 UTC
obex-data-server is not used in bluedevil 2.0, if you have 2.0 with bluez4+obex-data-server your environment is really messed up :/

If you are indeed running bluez5 now, can you give debug information again?
Also provide the output from obexd -d -i

Thanks !
(In reply to comment #9)
> bluedevil 2.0rc1 is installed on my system, and unfortunately the behaviour
> is the same.
Comment 11 hamelg 2014-03-10 18:48:16 UTC
Created attachment 85515 [details]
obexd -d output

obexd -d output when browsing my nokia N70 via bluedevil.
Comment 12 Christoph Feck 2014-04-21 11:24:17 UTC
Alex, does comment #11 provide the requested information? Please set the bug status.
Comment 13 Christoph Feck 2014-05-04 17:19:23 UTC
No response, changing status.
Comment 14 stakanov.s 2014-10-30 10:04:52 UTC
I have here opensuse 13.1 with KDE 4.14.2

I  can confirm that here bluetooth is still broken. Wile devices connect well and can be paired, if you try to browse a Samsung GT-E2152 you will see the folders, you will see the only file that was originaly placed by samsung (a ringtone). All other files that were memorized after are not shown, just empty folders. The folder structure is shown. 
When sending a file from the phone to the PC: pairing is fine. Then it tries to send but no authorization request opens. Process dies after a timeout. No file transmitted. 
If you try to "accept files from paired devices" automaticly: does not work. Nothing is received and process times out.

With the J-21 Hazel (an older UMTS cell phone from sony-erisson) it is worse. Process dies immediately with following line shown in dolphin:  process died unexpectedly. But this is unstable. I had now a connect with showing files and it was possible to transfer and browse. 
It seems that the BT collaboration with obex and dolphin is not constant. Happy to provide you with output if you tell me how to produce it.
Comment 15 hamelg 2014-10-30 17:22:41 UTC
Hello,
Here, It can send/receive files, but only from/to phone message folder.
I'm unable to browse phones directories. 
I have gave up and now I use obexftp on CLI to transfer files.
It seems kio-obexftp doesn't well support old phones. My own is a Nokia N70.
Comment 16 alancio 2014-11-05 02:45:51 UTC
Same problem here with a Nokia N900.
obexftp works fine.
Comment 17 caryoscelus 2014-11-26 21:55:57 UTC
I have debian testing, KDE 4.14.2, bluedevil 2.0~rc1 (-44-gb7697a7-2) and cannot see or send files with Dolphin (using blueman/nautilus works however). Obexftp is only working with manually setting channel to 10 ("-B 10"), otherwise fails.
Comment 18 David Rosca 2014-12-14 08:48:28 UTC
Can you please test it with 2.0 release?
Comment 19 stakanov.s 2014-12-14 09:30:02 UTC
I tried here with blue-devil 2.0-23-1 (if this is the 2.0 version you referred to). 
Result on Sony Ericsson Hazel is:
Dolphin
Connect to device fine.
Listing of directories on the memory card: fine
Listing of content: FAIL
Remark: after the listing of content fails, the very phone is not able to find its own directories on the card any more. Switching it off and on doesn't help. Talking off the memory card resets to normal operation (on the phone). 

So connecting with BT to a standard gsm/umts phone of elder generation is still not possible in KDE and appears to trouble the normal function of the device. I do not get any specific output for BT when running e.g. dolphin from the CLI. If you tell me how to provide desired output I can provide the desired output.

Note: when trying with konqueror:
See the device: fomerly paired devices are listed
Try to connect : FAIL to connect. Bluetooth not aktive (although in dolphin it works and although the device is connected in BT). So BT funktion in Konqueror does not work at all with me.
Comment 20 stakanov.s 2014-12-14 09:40:26 UTC
Oh, now I see. Sorry for having to join this. Apparently this interaction not only cripples the card function of the phone. It leaves BT also "not activated" in KDE althoug it shows activated. With other words it crashes, but does remain "activated" in the tray. If you swith off and on in the tray it works again.  This is radom as it seams. Sometimes happens sometimes not. 

However the you do not have the possibility to list folder content neither in Konqueror nor in Dolphin.  This is stable and repeatable and reliable to reproduce. And from time to time  you have to switch on and off the server. 

P.S. do not get frustrated. One bigger step forward did however come with the 2.0 release. You can now deactivate bluetooth and KDE remembers it after the restart. This is in deed very useful, at least one does not have BT activated all the time. Thanks for that.
Comment 21 David Rosca 2014-12-14 10:25:15 UTC
(In reply to stakanov from comment #20)
> Oh, now I see. Sorry for having to join this. Apparently this interaction
> not only cripples the card function of the phone. 
First of all, this is not what KDE Bluetooth integration (Bluedevil) is able to do. This indicates issue in Bluez.

> It leaves BT also "not activated" in KDE althoug it shows activated. 
What do you mean "not activated" in KDE? Where do you see it?


> However the you do not have the possibility to list folder content neither
> in Konqueror nor in Dolphin.  This is stable and repeatable and reliable to
> reproduce. And from time to time  you have to switch on and off the server. 
That's correct. If the obexftp connection is lost by any case, reconnecting is quite problematic.

> 
> P.S. do not get frustrated. One bigger step forward did however come with
> the 2.0 release. You can now deactivate bluetooth and KDE remembers it after
> the restart. This is in deed very useful, at least one does not have BT
> activated all the time. Thanks for that.
Oh I am not frustrated, don't worry :) I know that obexftp is pretty buggy. I did actually fix it in qbluez branch of Bluedevil (but this is only for frameworks and qbluez is not yet officialy released). I will try to backport this fix to KDE4 branch.

And last thing, thanks a lot for your testing and feedback. Please don't hesitate to open new bug if you find any issue!
Comment 22 David Rosca 2014-12-19 16:40:17 UTC
Git commit d51b01e6e9e79d3b5d64dd6f8a7f6f1347dabd4f by David Rosca.
Committed on 19/12/2014 at 14:22.
Pushed by drosca into branch 'master'.

kio_obexftp: Rewrite to better handle errors and disconnects

Correctly handle errors and attempt to reconnect when connection
fails by any means.
Also add icons for memory storage types (phone memory, memory card)
in root directory.

M  +244  -103  src/kio/obexftp/kio_obexftp.cpp
M  +17   -9    src/kio/obexftp/kio_obexftp.h
M  +2    -9    src/kio/obexftp/transferfilejob.cpp
M  +1    -2    src/kio/obexftp/transferfilejob.h

http://commits.kde.org/bluedevil/d51b01e6e9e79d3b5d64dd6f8a7f6f1347dabd4f