Skip to contentSkip to conversation

Several problems with bluez-utils 3.1, kbluetoothd and a Belkin dongle in Debian

Bluez-users Alastair Tse 2 participants 4 messages Jul 27, 2006 – Jul 29, 2006 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I'm also experiencing the same behaviour as Felix with a Belkin dongle (Broadcom) with bluez-libs-3.2, bluez-utils-3.2. This is where ISCAN is not set even though it is enabled in hcid.conf. I've compiled from source on a Gentoo Linux box.

One additional thing that I would like to add is that I see this in my syslog:

Jul 28 00:10:15 qoo hcid[23009]: HCI dev 0 registered
Jul 28 00:10:15 qoo hcid[23009]: Device hci0 has been added
Jul 28 00:10:15 qoo hcid[23009]: Register path:/org/bluez/hci0
fallback:0
Jul 28 00:10:15 qoo hcid[23009]: HCI dev 0 up
Jul 28 00:10:15 qoo hcid[23009]: Starting security manager 0
Jul 28 00:10:16 qoo hcid[23009]: Can't write inquiry mode for hci0:

Connection timed out (110)

If I use Felix's workaround by enabling ISCAN using 'hciconfig hci0 piscan' after the device is up, that error message about inquiry mode does not come up.

Here is my hciconfig -a before using the workaround 'hciconfig hci0 piscan':

liquidx@qoo /usr/portage $ hciconfig -a
hci0: Type: USB

        BD Address: 00:03:C9:2D:3E:8F ACL MTU: 377:10 SCO MTU: 16:0
        UP RUNNING PSCAN
        RX bytes:408 acl:0 sco:0 events:18 errors:0
        TX bytes:320 acl:0 sco:0 commands:18 errors:0
        Features: 0xff 0xfd 0x05 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'qoo'
        Class: 0x3e0100
        Service Classes: Networking, Rendering, Capturing, Object

Transfer, Audio
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x2 LMP Ver: 1.1 (0x1) LMP Subver:
0x1007
Manufacturer: Broadcom Corporation (15)

Hope this helps with nailing down the problem.

Cheers,

Alastair

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Alastair,

Quoted 8 lines

I'm also experiencing the same behaviour as Felix with a Belkin dongle (Broadcom) with bluez-libs-3.2, bluez-utils-3.2. This is where ISCAN is not set even though it is enabled in hcid.conf. I've compiled from source on a Gentoo Linux box.

One additional thing that I would like to add is that I see this in my syslog:

Quoted 8 lines
Jul 28 00:10:15 qoo hcid[23009]: HCI dev 0 registered
Jul 28 00:10:15 qoo hcid[23009]: Device hci0 has been added
Jul 28 00:10:15 qoo hcid[23009]: Register path:/org/bluez/hci0
fallback:0
Jul 28 00:10:15 qoo hcid[23009]: HCI dev 0 up
Jul 28 00:10:15 qoo hcid[23009]: Starting security manager 0
Jul 28 00:10:16 qoo hcid[23009]: Can't write inquiry mode for hci0:

Connection timed out (110)

the attached patch might help. If we have a Bluetooth 1.0b or 1.1 device without a quirk to enable inqmode, we shouldn't even try to change the inquiry mode. Seems that the Broadcom dongles are really sensible if you try to send a command they don't support.

Regards

Marcel

Index: hcid/device.c
===================================================================
RCS file: /cvsroot/bluez/utils/hcid/device.c,v
retrieving revision 1.14

device.c +6 -0
diff -u -r1.14 device.c
@@ -189,6 +189,7 @@
 	if (hci_read_local_version(dd, &ver, 1000) < 0) {
 		error("Can't read version info for hci%d: %s (%d)",
 					dev_id, strerror(errno), errno);
+		hci_close_dev(dd);
 		return -errno;
 	}
 
@@ -200,19 +201,24 @@
 	if (hci_read_local_features(dd, features, 1000) < 0) {
 		error("Can't read features for hci%d: %s (%d)",
 					dev_id, strerror(errno), errno);
+		hci_close_dev(dd);
 		return -errno;
 	}
 
 	memcpy(dev->features, features, 8);
 
 	inqmode = get_inquiry_mode(dev);
+	if (inqmode < 1)
+		goto done;
 
 	if (hci_write_inquiry_mode(dd, inqmode, 1000) < 0) {
 		error("Can't write inquiry mode for hci%d: %s (%d)",
 					dev_id, strerror(errno), errno);
+		hci_close_dev(dd);
 		return -errno;
 	}
 
+done:
 	hci_close_dev(dd);
 
 	info("Device hci%d has been activated", dev_id);

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

#2 lore raw
Quoted 7 lines · Marcel Holtmann
Quoted 2 lines
Jul 28 00:10:16 qoo hcid[23009]: Can't write inquiry mode for hci0:

Connection timed out (110)

the attached patch might help. If we have a Bluetooth 1.0b or 1.1 device without a quirk to enable inqmode, we shouldn't even try to change the inquiry mode. Seems that the Broadcom dongles are really sensible if you try to send a command they don't support.

Marcel,

Thanks for the patch. That does get rid of the connection timed out error in syslog. Although I'm still experiencing the fact that ISCAN is not enabled, although that seems to be another problem associated with the way 3.x works for detecting features (According to the another thread).

Thanks,

Alastair

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw

Hi Alastair,

Quoted 10 lines
Quoted 4 lines

the attached patch might help. If we have a Bluetooth 1.0b or 1.1 device without a quirk to enable inqmode, we shouldn't even try to change the inquiry mode. Seems that the Broadcom dongles are really sensible if you try to send a command they don't support.

Thanks for the patch. That does get rid of the connection timed out error in syslog. Although I'm still experiencing the fact that ISCAN is not enabled, although that seems to be another problem associated with the way 3.x works for detecting features (According to the another thread).

it really looks like a bug. Feel free to send in a patch to fix it.

Regards

Marcel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users