khvzak / bluez-tools

A set of tools to manage bluetooth devices for linux
GNU General Public License v2.0
176 stars 51 forks source link

bt-obex fails to send file correctly (with solution?) #11

Closed keaton-freude closed 7 years ago

keaton-freude commented 8 years ago

I've managed to track down the exact issue I think: https://github.com/khvzak/bluez-tools/blob/master/src/lib/bluez/obex/obex_client.c#L147

I was debugging this issue and that line jumped out at me. I changed to ==, rebuilt and OPP file sending was working.

I can repro using the following: Raspbian, Bluez 5.23

I tested with Nexus 5X as Bluetooth Other End.

Commands used: bt-obex -p BD_ADDR /path/to/file

Unpatched fails with asserts like so: (bt-obex:3830): GLib-CRITICAL **: g_variant_is_object_path: assertion 'string != NULL' failed

(bt-obex:3830): GLib-GIO-CRITICAL **: g_dbus_proxy_new_sync: assertion 'g_variant_is_object_path (object_path)' failed

ERROR:lib/bluez/obex/obex_session.c:166:obex_session_get_dbus_object_path: assertion failed: (self->priv->proxy != NULL)

I thought I'd bring this to your attention and hopefully I didn't misunderstand how that particular function or line worked. I can prepare a small patch to fix this issue and submit a PR, though I'd like to make sure this is an actual issue (I have not spent very long working with bluez-tools).

Thanks, Keaton