Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476784 - =net-wireless/bluez-4.101-r5 - PAN networking only works with compat/pand, not with the new DBUS interface.
Summary: =net-wireless/bluez-4.101-r5 - PAN networking only works with compat/pand, no...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-07-13 23:52 UTC by cnu
Modified: 2014-02-09 09:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cnu 2013-07-13 23:52:57 UTC
When using pand networking using the DBUS interface with my k610i phone it immediately disconnects:

Jul 13 23:28:37 [bluetoothd] bnep0 connected
Jul 13 23:28:37 [bluetoothd] bnep0 disconnected
Jul 13 23:28:37 [bluetoothd] Could not bring down bnep0

When using compat/pand (which is no longer built on Gentoo), it works!

Reproducible: Always

Steps to Reproduce:
BTADDR=<my-phones-address>

ADAPTER="$(dbus-send --system --dest=org.bluez --print-reply=literal / org.bluez.Manager.DefaultAdapter | sed 's/\s//g')"
echo "Adapter: $ADAPTER"

DEVICE="$(dbus-send --system --dest=org.bluez --print-reply=literal "${ADAPTER}" org.bluez.Adapter.FindDevice string:"${BTADDR}" | sed 's/\s//g')"
echo "Device:  $DEVICE"

dbus-send --system --dest=org.bluez --print-reply "${DEVICE}" org.bluez.Network.Connect string:nap



I added a gdb breakpoint on connection_destroy. It was called from the watch stuff. Since the old pand didn't seem to have this, I just tried removing it and it worked!

--- a/network/connection.c
+++ b/network/connection.c
@@ -429,10 +429,6 @@
 
 	nc->state = CONNECTING;
 	nc->msg = dbus_message_ref(msg);
-	nc->watch = g_dbus_add_disconnect_watch(conn,
-						dbus_message_get_sender(msg),
-						connection_destroy,
-						nc, NULL);
 
 	return NULL;
 }
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-14 10:20:25 UTC
I wonder if removing that call would break something else though...
Comment 2 Pacho Ramos gentoo-dev 2013-08-20 17:56:38 UTC
It should be reported to upstream to ensure they are aware of the problem and it's the correct fix
Comment 3 cnu 2013-08-20 18:48:46 UTC
It's more of a workaround since it completely disabled whatever this code did. My guess is that it requests some kinda feature that my old phone doesn't have, and disconnects when it can't find it.
It looked like the Gentoo package had many patches in for the network stuff, so it may be diverging from upstream a bit.
My kernel crashes all the time when doing bluetooth now, so I stopped using bluetooth now. On lkml they said they're rewriting lots of it.
Comment 4 Pacho Ramos gentoo-dev 2014-02-09 09:10:41 UTC
Try with bluez-5.14, upstream won't ever fix it for bluez-4