Skip to contentSkip to conversation

CreateBonding while periodic scanning

Bluez-devel Manuel Naranjo 1 participant 3 messages Feb 11, 2008 – Mar 3, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello List,

As I asked in the forums I'm trying to create a bonding to a device while I'm running a periodic scanning.

Thing is that for some reason hcid is blocking me to do this, and Marcel suggested removing the periodic inquiry check. But as he said, and I think the same, that check was created for a reason.

The line that makes the conflict is this one (utils/hcid/adapter.c:

static DBusHandlerResult adapter_create_bonding(DBusConnection *conn,
DBusMessage *msg, void
*data)
.....

if (adapter->discov_active || (adapter->pdiscov_active && !adapter->pinq_idle))
return error_discover_in_progress(conn, msg)

pinq_idle is 0 in my case, so then I get a discovery in progress exception.

Marcel suggested that I change the code to "if (adapter->discov_active )" but still we would like to know what that check is made, so we can get a better solution.

Thanks,
Manuel Naranjo
Wireless Cables Inc.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#1 lore raw

Sorry I forgot the patch.

I confirmed the patch worked for an old Broadcom based dongle (D-Link BT122) and for a CSR Bluecore 4 based dongle (AIRcable Host XR).

The patch should apply against the bluez-utils-3.26 vanilla package

Quoted 22 lines

Hello List,

As I asked in the forums I'm trying to create a bonding to a device while I'm running a periodic scanning.

Thing is that for some reason hcid is blocking me to do this, and Marcel suggested removing the periodic inquiry check. But as he said, and I think the same, that check was created for a reason.

The line that makes the conflict is this one (utils/hcid/adapter.c:

static DBusHandlerResult adapter_create_bonding(DBusConnection *conn,
DBusMessage *msg, void
*data)
.....

if (adapter->discov_active || (adapter->pdiscov_active && !adapter->pinq_idle))
return error_discover_in_progress(conn, msg)

pinq_idle is 0 in my case, so then I get a discovery in progress exception.

Quoted 10 lines

Marcel suggested that I change the code to "if (adapter->discov_active )" but still we would like to know what that check is made, so we can get a better solution.

Thanks,
Manuel Naranjo
Wireless Cables Inc.

adapter.c renamed from adapter.c.orig +1 -1
@@ -2216,7 +2216,7 @@
 	str2ba(peer_addr, &peer_bdaddr);
 
 	/* check if there is a pending discover: requested by D-Bus/non clients */
-	if (adapter->discov_active || (adapter->pdiscov_active && !adapter->pinq_idle))
+	if (adapter->discov_active)
 		return error_discover_in_progress(conn, msg);
 
 	pending_remote_name_cancel(adapter);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw

It's me or this mail passed through the list without much glory :S.

Quoted 42 lines

Sorry I forgot the patch.

I confirmed the patch worked for an old Broadcom based dongle (D-Link BT122) and for a CSR Bluecore 4 based dongle (AIRcable Host XR).

The patch should apply against the bluez-utils-3.26 vanilla package

Quoted 33 lines

Hello List,

As I asked in the forums I'm trying to create a bonding to a device while I'm running a periodic scanning.

Thing is that for some reason hcid is blocking me to do this, and Marcel suggested removing the periodic inquiry check. But as he said, and I think the same, that check was created for a reason.

The line that makes the conflict is this one (utils/hcid/adapter.c:

static DBusHandlerResult adapter_create_bonding(DBusConnection *conn,
DBusMessage *msg, void
*data)
.....

if (adapter->discov_active || (adapter->pdiscov_active && !adapter->pinq_idle))
return error_discover_in_progress(conn, msg)

pinq_idle is 0 in my case, so then I get a discovery in progress exception.

Marcel suggested that I change the code to "if (adapter->discov_active )" but still we would like to know what that check is made, so we can get a better solution.

Thanks,
Manuel Naranjo
Wireless Cables Inc.

adapter.c renamed from adapter.c.orig +1 -1
@@ -2216,7 +2216,7 @@
 	str2ba(peer_addr, &peer_bdaddr);
 
 	/* check if there is a pending discover: requested by D-Bus/non clients */
-	if (adapter->discov_active || (adapter->pdiscov_active && !adapter->pinq_idle))
+	if (adapter->discov_active)
 		return error_discover_in_progress(conn, msg);
 
 	pending_remote_name_cancel(adapter);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel