After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 555531 - Receiving files over bluetooth does not work with bluez 4.x
Receiving files over bluetooth does not work with bluez 4.x
Status: RESOLVED NOTGNOME
Product: gnome-user-share
Classification: Core
Component: bluetooth
0.40
Other Linux
: Normal major
: ---
Assigned To: gnome-user-share maintainers
gnome-user-share maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-08 11:45 UTC by Michael Monreal
Modified: 2008-11-07 08:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for testing (1.09 KB, patch)
2008-10-23 22:21 UTC, Tadas Dailyda
none Details | Review
New Log (2.00 KB, text/plain)
2008-10-25 08:27 UTC, Michael Monreal
  Details

Description Michael Monreal 2008-10-08 11:45:07 UTC
I have bluez 4.12, obex-data-server trunk, bluez-gnome 1.8 (+fedora patch). I can peer and send files just fine to my phone. I cannot, however receive files using gnome-user-share's bluetooth support.

If I enable the bluetooth receive option in g-u-s I see a "obex-data-server --no-daemon" process, but sending a file from the mobile gets stuck at 0% and never does anything.

This used to work with bluez 3.x

I can make this work using obex-data-server's test server however, so if I 

perl ods-server-test.py opp ~/Download/

I can send just fine.
Comment 1 Baptiste Mille-Mathias 2008-10-08 11:52:33 UTC
Fine that someone can confirm that, when I packaged gnome-user-share 2 days ago for ubuntu I was not able to push files; I wasn't sure if it was due to my setup.
Comment 2 Michael Monreal 2008-10-08 11:58:30 UTC
I have to add that I am using ubuntu too, so it could be related to a bug in the bluez base packages, not sure. But the fact that the ods test server works totally fine indicates that not much can be wrong below in the stack, so my guess would be g-u-s not supporting the current bluez 4.12 or ods api correctly. 
Comment 3 Bastien Nocera 2008-10-08 12:23:17 UTC
You need to use the current trunk of gnome-user-share to start with. Is your phone a Nokia Series 40 phone?
Comment 4 Baptiste Mille-Mathias 2008-10-08 12:33:33 UTC
Micheal,

Could you try the version 0.40 in my ppa (https://launchpad.net/~bmillemathias/+archive), and get back to me?
Comment 5 Bastien Nocera 2008-10-08 12:38:01 UTC
0.40 won't work with bluez 4.x. You need gnome-user-share trunk.
Comment 6 Michael Monreal 2008-10-08 12:59:41 UTC
Yes I had g-u-s trunk (with "Port to the BlueZ 4.x API").

I tested with a nokia 6300 (s40, right). But I just also tested with my SE k750i. The phone seems to completely lock up when trying to establish the connection, even the off switch does no longer work
Comment 7 Bastien Nocera 2008-10-08 13:07:22 UTC
Could you test with obex-data-server's test program, like so:
./ods-server-test.py --ask-to-accept opp /tmp/

It should hang the same way...
Comment 8 Michael Monreal 2008-10-08 13:57:02 UTC
Right, hangs the same, like this:

$ ./ods-server-test.py --ask-to-accept opp /tmp/
Server object:  /org/openobex/server0
Started
Session created: /org/openobex/serversession0
Session Bluetooth address: 00:1C:D6:86:B1:4C

Without the --ask-to-accept it works fine.
Comment 9 Bastien Nocera 2008-10-08 14:11:53 UTC
Closing as a bug in obex-data-server:
http://bugs.muiline.com/view.php?id=140

Michael, as you can reproduce the issue, could you monitor the issue there as well, and eventually answer Tadas' questions?
Comment 10 Michael Monreal 2008-10-08 14:22:20 UTC
Sure. Thanks a lot.
Comment 11 Tadas Dailyda 2008-10-18 11:52:42 UTC
Since no one reacted to my comment in ods bug tracker, I'm just copying it here:

Sorry, but I can't make any sense from this bug. I need more information. The only code that acts differently according to auto_accept setting is just a few lines. Before that, there should be "suspending request" message in ods output. Without ods output I can't really do anything since this stuff works for me.

So what I need you to do is:
1) run ./obex-data-server --no-daemon
2) run ./ods-server-test.py --ask-to-accept opp /tmp
3) start sending file from phone
4) post me output of obex-data-server and ods-server-test.py when it hangs. Ideally, you could also run obex-data-server with gdb and see at which place in code it actually hangs.
Comment 12 Michael Monreal 2008-10-18 13:40:28 UTC
Logs attached to the ods bug now. Sorry, I did not get any status change mail so I didn't notice you replied.
Comment 13 Tadas Dailyda 2008-10-18 14:35:11 UTC
BTW, you have to choose "Monitor issue" to get updates in Mantis bug tracker.
Comment 14 Tadas Dailyda 2008-10-23 21:53:14 UTC
A fix for this bug is in ods svn rev 2102.

I added a timeout between emitting Server.SessionCreated and ServerSession.TransferStarted. The current timeout is set to 250 milliseconds. Please check if this is sufficient.
Comment 15 Michael Monreal 2008-10-23 22:08:41 UTC
I just tested r2103 and it's still the same for me (stuck at 11%)
Comment 16 Bastien Nocera 2008-10-23 22:14:24 UTC
I'd certainly rather see a proper fix that requires API changes rather than a hack with a timeout...
Comment 17 Tadas Dailyda 2008-10-23 22:21:18 UTC
Created attachment 121225 [details] [review]
patch for testing

Apply this patch and post ods output again.
I hope this timeout hack is temporary until I figure out how to properly update API. Feel free to suggest a solution.
Comment 18 Michael Monreal 2008-10-24 06:34:23 UTC
Tested... going up to 16% but not further, even after waiting a very long time, sorry.
Comment 19 Tadas Dailyda 2008-10-24 09:15:52 UTC
Please post ods output when running with that patch applied.
Comment 20 Michael Monreal 2008-10-25 08:27:53 UTC
Created attachment 121329 [details]
New Log

Here's a log where it hangs at 14%. Seems to depend on the file size but for photos it always seems to be the 10%-15% region.
Comment 21 Tadas Dailyda 2008-10-25 14:15:30 UTC
Check if it works with newest ods svn. I think I found why TransferStarted signal wasn't emitted correctly.
Comment 22 Michael Monreal 2008-10-25 14:27:51 UTC
>>/org/openobex/serversession0<<  -- RemoteFilename = Image001.jpg
Accept file? Type 'a' to accept, 'r' to reject:
>>> a
Accepting
>>/org/openobex/serversession0<<  Progress: 0 %
>>/org/openobex/serversession0<<  Progress: 16 %
>>/org/openobex/serversession0<<  Progress: 33 %
>>/org/openobex/serversession0<<  Progress: 49 %
>>/org/openobex/serversession0<<  Progress: 66 %
>>/org/openobex/serversession0<<  Progress: 82 %
>>/org/openobex/serversession0<<  Progress: 99 %
>>/org/openobex/serversession0<<  Transfer completed
>>/org/openobex/serversession0<<  Disconnected

It now asks if I want to accept (phone hangs at 16%) but completes the transfer as soon as I hit a! :)

Trying again with gnome-user-share, my phone does not detect the "server". Perhaps the g-u-s needs to be adapted to the newest o-d-s?
Comment 23 Tadas Dailyda 2008-10-25 14:30:30 UTC
This means that it finally works ! Yay. You can try running ods with --no-daemon and look if g-u-s actually starts the server.
Comment 24 Michael Monreal 2008-10-25 14:45:46 UTC
Heh strange... If I kill all obs processes, start gnome-file-share-properties, enable the checkbox and close the window it starts an obs process but the phone does not find anything. If I now start gnome-file-share-properties again, turn the checkbox off and on again it works fine.

Also, enabling the pref if I have started obs manually works right away.
Comment 25 Tadas Dailyda 2008-10-25 14:54:57 UTC
Do you have ods svn installed in you system? because when g-u-s auto-starts ods, it starts /usr/bin/obex-data-server. You might have some older ods version installed in you system. Just guessing here..
Comment 26 Michael Monreal 2008-10-25 15:02:33 UTC
No, I already checked this. My obs trunk is installed in /opt/gnome2.24 alongside the rest of GNOME and there's no distribution-supplied old version in /usr.
Comment 27 Bastien Nocera 2008-10-25 16:51:13 UTC
Tadas, will you be making a new release, or should I extract the patch from SVN?
Comment 28 Tadas Dailyda 2008-10-25 18:14:18 UTC
I will make release today or tommorow.
Comment 29 Valent Turkovic 2008-10-25 19:09:38 UTC
Hi, I'm testing Fedora 10 and I have probably the same issue.

I have LG KU990 mobile phone and I try to send picture over bluetooth to my laptop running Fedora 10 and it fails. I have bonded the LG KU990 to laptop over bluetooth but I still can't send files over BT to laptop.

I tried to send files with Sony Ericsson K750 and that works ok even if the phone isn't bonded.

How can I troubleshoot this more? Is there some list of which mobile phones work and which don't work with bluez?

hope these additional information help:

# rpm -qa "*bluez*" obex-data-server gnome-user-share
obex-data-server-0.4-1.fc10.i386
gnome-user-share-0.40-3.fc10.i386
bluez-gnome-1.8-7.fc10.i386
bluez-libs-4.16-1.fc10.i386
bluez-cups-4.16-1.fc10.i386
bluez-alsa-4.16-1.fc10.i386
bluez-4.16-1.fc10.i386


$ gconftool-2 -R /desktop/gnome/file_sharing
 bluetooth_obexpush_enabled = true
 require_password = never
 bluetooth_accept_files = always
 bluetooth_enabled = false
 bluetooth_notify = true
 enabled = false
 bluetooth_allow_write = false
 bluetooth_require_pairing = true
Comment 30 Tadas Dailyda 2008-10-25 19:11:41 UTC
Released obex-data-server 0.4.1 which fixes this problem.
Comment 31 Valent Turkovic 2008-10-25 19:22:38 UTC
I killed obex-data-server and then started it with "obex-data-server -n"
Then I started obex test server with:
python /usr/share/doc/obex-data-server-0.4/ods-server-test.py --ask-to-accept opp /tmp/

Then I tried to send the image again from LG phone to laptop

obex-data-server showed this as output:

** Message: obex-data-server 0.4
** Message: Using Session bus
** Message: server socket created
** Message: Server created by: :1.92

** (obex-data-server:3504): WARNING **: Server path: /tmp/
** Message: Client connecting
** Message: Creating server session

** (obex-data-server:3504): WARNING **: Session path: /tmp/
** Message: Bluetooth address: 00:1E:75:00:00:00
** Message: io callback
** Message: event: 1
** Message: event: 2
** Message: CMD_CONNECT requested
** Message: Version: 0x10. Flags: 0x00  OBEX packet length: 4266

** Message: Resizing stream chunks to 4066

** Message: event: 3
** Message: io callback
** Message: event: 1
** Message: event: 11
** Message: CMD_PUT requested at REQCHECK
** Message: header: 195
** Message: HDR_LENGTH: 469059
** Message: header: 1
** Message: HDR_NAME: P050908_23.11[01].JPG
** Message: path: /tmp/
** Message: ret=0
** Message: event: 0
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: io callback
** Message: event: 9
** Message: suspending request
Comment 32 Valent Turkovic 2008-10-25 19:23:41 UTC
Great news Tadas, I'll test it as soon as it comes to Fedora 10.
Comment 33 Valent Turkovic 2008-11-07 08:21:15 UTC
Works great! Thank you.