← Back to team overview

desktop-packages team mailing list archive

[Bug 1535030] Re: Can't recieve files from phone over Bluetooth

 

I've spent some time looking into this.

When I run strace on the obexd process and toggle the "Receive files in
Downloads folder over Bluetooth" setting in Personal File Sharing
Preferences, I see the obexd process receiving messages as a result of
the toggle, so that setting seems to be propagated as expected to the
daemon.

In contrast, when I change the "Accept files" setting back and forth
between "Always" and "Only for set up devices", I do _not_ see the obexd
process receiving any messages as a result of that change. So it appears
to me that this setting is not being propagated from Personal File
Sharing Preferences to obexd. This is also true if I modify the setting
in dconf-editor.

Not only that, but changing that setting to "Always" and rebooting also
has no effect, so I'm fairly certain that this setting is simply being
ignored.

So, in short, "Receive files in Downloads folder over Bluetooth" can be
successfully being enabled, but "Accept files" always gets set to
"bonded", regardless of what Personal File Sharing Preferences says. So
why is it failing in that state?

Investigating further, I see that obexd is trying to save sent files in
the user's "Downloads" directory. I've tried, unsuccessfully, to figure
out where it's getting that directory path from. I _think_ it's coming
from DBus somehow, but I don't understand how any of that stuff works,
so I'm not certain.

Anyway, the problem is that obexd requires downloads to go underneath
the user's root path, and the user's root path is defaulting to
~/.cache/obexd, so since ~/Downloads isn't underneath ~/.cache/obexd,
it's rejecting the transfer.

Related bug: the "Require remote devices to bond with this computer"
setting is under "Share Files over Bluetooth" in Personal File Sharing
Preferences and is greyed out when "Share public files over bluetooth"
is disabled, but the description for this setting in dconf-editor is
"Whether Bluetooth clients need to pair with the computer to send
files," so I think this setting is in the wrong place, and should
actually be under "Receive Files over Bluetooth".

Related bug: The type of the bluetooth-accept-files setting within the
schema org.gnome.desktop.file-sharing should have a pop-up menu of
possible values in dconf-editor but does not.

In short, there are four different bugs that need to be fixed:

1. "Accept files" setting of "Always" vs. "Only for set up devices"
needs to be propagated correctly from Personal File Sharing Preferences
/ dconf to obexd.

2. Whatever is providing settings to obexd needs to set its root path to
~ rather than ~/.cache/obexd, so that file transfers into ~/Downloads
will work. Either that, or the download directory -- wherever that is
coming from, I can't figure it out exactly -- sent to obexd needs to be
~/.cache/obexd rather than ~/Downloads.

3. The "Require remote devices to bond with this computer" setting in
Personal File Sharing Preferences is in the wrong place and needs to be
moved.

4. The "bluetooth-accept-files" setting within the schema
org.gnome.desktop.file-sharing needs to have a menu of valid values.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to obexd in Ubuntu.
https://bugs.launchpad.net/bugs/1535030

Title:
  Can't recieve files from phone over Bluetooth

Status in obexd package in Ubuntu:
  Confirmed

Bug description:
  When I try to send files from my Android phone to my computer over
  Bluetooth, the phone connects successfully but then refuses to send
  the file with the error message "Transfer forbidden by target device".

  The following ends up in my /var/log/syslog:

  Jan 16 22:54:07 eristic obexd[2234]: CONNECT(0x0), (null)(0xffffffff)
  Jan 16 22:54:07 eristic obexd[2234]: CONNECT(0x0), (null)(0x0)
  Jan 16 22:54:07 eristic obexd[2234]: PUT(0x2), (null)(0xffffffff)
  Jan 16 22:54:07 eristic obexd[2234]: open(/home/sfreilich/Downloads/IMG_20160114
  _121340.jpg): Operation not permitted (1)
  Jan 16 22:54:07 eristic obexd[2234]: PUT(0x2), FORBIDDEN(0x43)
  Jan 16 22:54:07 eristic gnome-session[1610]: ** (zeitgeist-datahub:2255): WARNIN
  G **: zeitgeist-datahub.vala:212: Error during inserting events: GDBus.Error:org
  .gnome.zeitgeist.EngineError.InvalidArgument: Incomplete event: interpretation, 
  manifestation and actor are required
  Jan 16 22:54:07 eristic obexd[2234]: DISCONNECT(0x1), (null)(0xffffffff)
  Jan 16 22:54:07 eristic obexd[2234]: DISCONNECT(0x1), SUCCESS(0x20)
  Jan 16 22:54:07 eristic obexd[2234]: disconnected: Transport got disconnected
  Jan 16 22:54:07 eristic bluetoothd[664]: Unable to get io data for Object Push: 
  getpeername: Transport endpoint is not connected (107)

  Strangely, the expected file is create in my Downloads folder, but the
  file is empty:

  $ ls -l ~/Downloads/
  total 0
  -rw------- 1 sfreilich sfreilich 0 Jan 16 22:54 IMG_20160114_121340.jpg

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/obexd/+bug/1535030/+subscriptions


References