Skip to contentSkip to conversation

hcid.conf: device section with specific bt address is ignored

Bluez-devel Till Dörges 2 participants 4 messages May 20, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello everybody,

in hcid.conf a device section with a bluetooth address specified apparently is ignored. The following should work according to the man-page:

Quoted 4 lines

# *not* working

device 00:09:DD:10:42:C4 {
       name "%h (dongle 1)";

[...]

The default device section is working as expected.

Things were working fine with bluez-libs-2.24 and bluez-utils-2.24 (from openSUSE 10.1).

After the upgrade to openSUSE 10.2 with bluez-libs-3.7 and bluez-utils-3.7 the problem occurred. (I did adapt to the new config file format.)

I briefly tried the latest versions (bluez-libs-3.10 bluez-utils-3.10.1) but I ran into a dbus problem (hcid complains with "Unable to get on D-Bus") and I didn't want to dig any further.

Following is a recording from starting hcid and attached is the configuration file in question.
(Note that in the recording the names given to the devices are wrong.)

If you need more information, just let me know.

Thanks -- Till

----------------------------------------------------------------------

# cat /etc/SuSE-release
openSUSE 10.2 (i586)
VERSION = 10.2
# rpm -qa | grep 'blue\|dbus' | sort
bluez-hcidump-1.33-8
bluez-libs-3.7-14.1
bluez-utils-3.7-29.2
dbus-1-1.0.0-7
dbus-1-devel-1.0.0-7
dbus-1-glib-0.71-26
dbus-1-glib-devel-0.71-26
dbus-1-qt3-0.62-38
dbus-1-qt3-devel-0.62-38
dbus-1-x11-1.0.0-7
kdebluetooth-0.99.0svn576598-38
libqt4-dbus-1-4.2.1-18
yast2-bluetooth-2.14.0-33
# lsmod | grep 'l2cap\|rfcomm\|bnep\|blue'
bluetooth              57188  1 hci_usb
# /etc/init.d/bluetooth start
Starting bluetooth:  hcid sdpd hidd                                   done
# tail -20 /var/log/messages
May 20 15:47:50 myhost hcid[9828]: Bluetooth HCI daemon
May 20 15:47:50 myhost kernel: Bluetooth: L2CAP ver 2.8
May 20 15:47:50 myhost kernel: Bluetooth: L2CAP socket layer initialized
May 20 15:47:50 myhost sdpd[9831]: Bluetooth SDP daemon
May 20 15:47:50 myhost kernel: Bluetooth: HIDP (Human Interface Emulation) ver 1.1
May 20 15:47:50 myhost hcid[9828]: Register path:/org/bluez fallback:1
May 20 15:47:50 myhost hcid[9828]: HCI dev 0 registered
May 20 15:47:50 myhost hcid[9828]: Register path:/org/bluez/hci0 fallback:0
May 20 15:47:50 myhost hcid[9828]: HCI dev 0 already up
May 20 15:47:50 myhost hcid[9828]: Device hci0 has been added
May 20 15:47:50 myhost hidd[9842]: Bluetooth HID daemon
May 20 15:47:50 myhost hcid[9828]: Starting security manager 0
May 20 15:47:50 myhost hcid[9828]: Device hci0 has been activated
May 20 15:47:50 myhost hcid[9828]: HCI dev 1 registered
May 20 15:47:50 myhost hcid[9828]: Register path:/org/bluez/hci1 fallback:0
May 20 15:47:50 myhost hcid[9828]: HCI dev 1 already up
May 20 15:47:50 myhost hcid[9828]: Device hci1 has been added
May 20 15:47:50 myhost hcid[9828]: Starting security manager 1
May 20 15:47:50 myhost hcid[9828]: Device hci1 has been activated
# hciconfig -a
hci0:   Type: USB
        BD Address: 00:09:DD:10:42:C4 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN
        RX bytes:4238 acl:0 sco:0 events:89 errors:0
        TX bytes:1571 acl:0 sco:0 commands:85 errors:0
        Features: 0xff 0xff 0x0f 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: 'bzdefault myhost (0)'
        Class: 0x100100
        Service Classes: Object Transfer
        Device Class: Computer, Uncategorized
        HCI Ver: 1.1 (0x1) HCI Rev: 0x175 LMP Ver: 1.1 (0x1) LMP Subver: 0x175
        Manufacturer: Cambridge Silicon Radio (10)

hci1: Type: USB
BD Address: 00:80:98:34:D0:CA ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN
RX bytes:1591 acl:0 sco:0 events:40 errors:0
TX bytes:903 acl:0 sco:0 commands:40 errors:0
Features: 0xff 0xff 0x0f 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: 'bzdefault myhost (1)'
Class: 0x100100
Service Classes: Object Transfer
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x136 LMP Ver: 1.1 (0x1) LMP Subver: 0x136
Manufacturer: Cambridge Silicon Radio (10)

# lsmod | grep 'l2cap\|rfcomm\|bnep\|blue'
l2cap                  31104  7 hidp
bluetooth              57188  9 hidp,l2cap,hci_usb

# HCI daemon configuration file.
#
##########################################################################
# Till Dörges -- Oct 15, 2005 -- different names for ext. and int. bt dongle # Till Dörges -- May 18, 2007 -- adapted to openSUSE 10.2
##########################################################################

# currently there seems to be a bug: only the default device section is respected
options {
	autoinit yes;
	security user;
	pairing multi;
}
#  bt address  00:80:98:34:D0:CA
#  usb id      ID 04bf:0310 TDK Corp.
device 00:80:98:34:D0:CA {
	name "%h (internal)";
	class 0x100100;
	iscan enable;
	pscan enable;
	lm accept;
	lp rswitch,hold,sniff,park;
}

# bt address 00:09:DD:10:42:C4
# usb id ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

device 00:09:DD:10:42:C4 {
	name "%h (external)";
	class 0x100100;
	iscan enable;
	pscan enable;
	lm accept;
	lp rswitch,hold,sniff,park;
}
# defaults for any other device
device {
	name "bzdefault %h (%d)";
	class 0x100100;
	iscan enable;
	pscan enable;
	lm accept;
	lp rswitch,hold,sniff,park;
}

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

maintainer
#1 lore raw

Hi Till,

Quoted 9 lines

in hcid.conf a device section with a bluetooth address specified apparently is ignored. The following should work according to the man-page:

Quoted 4 lines

# *not* working

device 00:09:DD:10:42:C4 {
       name "%h (dongle 1)";

[...]

The default device section is working as expected.

should be solved with bluez-utils-3.10.1.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann
Quoted 8 lines

in hcid.conf a device section with a bluetooth address specified apparently is ignored. The following should work according to the man-page:

Quoted 4 lines

# *not* working

device 00:09:DD:10:42:C4 {
       name "%h (dongle 1)";

[...]

The default device section is working as expected.

should be solved with bluez-utils-3.10.1.

That's nice to hear. :-)

Then out of curiosity: For bluez-utils-3.10.1 I get this for hcid:

--- snip ---

May 19 18:33:38 myhost hcid[1942]: Can't open system message bus connection: Failed
to connect to socket /var/run/ dbus/system_bus_socket: No such file or directory
May 19 18:33:38 myhost hcid[1942]: Unable to get on D-Bus

--- snip ---

Was there a dbus related change? Or is it due to a missing bluez-hcid.conf file (present in 3.7 but not in 3.10.1)?

Thanks -- Till

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#3 lore raw

Hi Till,

Quoted 15 lines
Quoted 10 lines
Quoted 8 lines

in hcid.conf a device section with a bluetooth address specified apparently is ignored. The following should work according to the man-page:

Quoted 4 lines

# *not* working

device 00:09:DD:10:42:C4 {
       name "%h (dongle 1)";

[...]

The default device section is working as expected.

should be solved with bluez-utils-3.10.1.

That's nice to hear. :-)

Then out of curiosity: For bluez-utils-3.10.1 I get this for hcid:

Quoted 8 lines

--- snip ---

May 19 18:33:38 myhost hcid[1942]: Can't open system message bus connection: Failed
to connect to socket /var/run/ dbus/system_bus_socket: No such file or directory
May 19 18:33:38 myhost hcid[1942]: Unable to get on D-Bus

--- snip ---

Was there a dbus related change? Or is it due to a missing bluez-hcid.conf file (present in 3.7 but not in 3.10.1)?

the file is called bluetooth.conf now.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel