Comment 2 for bug 1535030

Revision history for this message
Jonathan Kamens (jik) wrote : 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.