Public bug reported:

Binary package hint: bluez-utils

When entry 'class' exists in /var/lib/bluetooth/<BD address>/config it
takes precedence over class settings in /etc/bluetooth/hcid.conf. When
starting/restarting bluetooth, regardless of changes in
/etc/bluetooth/hcid.conf hci class remains as saved in
/var/lib/bluetooth/<BD address>/config.

I discovered it when trying to install the newest version of bluez-utils 
(3.19). It has "class 0x000100;" set in the default hcid.conf.  After 
installation hciconfig -a showed:
        Class: 0x000100
        Service Classes: Unspecified
        Device Class: Computer, Uncategorized
 I adjusted the "class" entry in etc/bluetooth/hcid.conf and restarted 
bluetooth services, but nothing changed. I spent some time on it, and gave up, 
reverting to my old version of bluez-utils, which are in ubuntu feisty 
repository (3.9). Then i found out, that the problem persists, and I had no 
services on the device available!
I found out  that removing the file /var/lib/bluetooth/<BD address>/config 
resolves the problem, as new file is created with no class entry, and data from 
 /etc/bluetooth/hcid.conf are processed.

Steps to recreate the condition:
-----------------------------------------------------------------------------------------------
[EMAIL PROTECTED]:~# cat /var/lib/bluetooth/00\:08\:1B\:02\:3B\:67/config       
        
mode discoverable                             
 
(this is the only line in my properly working file)

[EMAIL PROTECTED]:~# hciconfig -a
hci0:   Type: USB
        BD Address: 00:08:1B:02:3B:67 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN 
        RX bytes:2750 acl:0 sco:0 events:57 errors:0
        TX bytes:1210 acl:0 sco:0 commands:56 errors:0
        Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: HOLD SNIFF PARK 
        Link mode: ACCEPT MASTER 
        Name: 'JL-DESKTOP_(0)'
        Class: 0x3e0104
        Service Classes: Networking, Rendering, Capturing, Object Transfer, 
Audio
        Device Class: Computer, Desktop workstation
        HCI Ver: 1.1 (0x1) HCI Rev: 0x33d LMP Ver: 1.1 (0x1) LMP Subver: 0x33d
        Manufacturer: Cambridge Silicon Radio (10)

[EMAIL PROTECTED]:~# echo class 0x000100 >> 
/var/lib/bluetooth/00\:08\:1B\:02\:3B\:67/config
[EMAIL PROTECTED]:~# /etc/init.d/bluetooth restart
 * Restarting Bluetooth services                                         [ OK ] 
[EMAIL PROTECTED]:~# hciconfig -a
hci0:   Type: USB
        BD Address: 00:08:1B:02:3B:67 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN 
        RX bytes:3344 acl:0 sco:0 events:68 errors:0
        TX bytes:1502 acl:0 sco:0 commands:67 errors:0
        Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: HOLD SNIFF PARK 
        Link mode: ACCEPT MASTER 
        Name: 'JL-DESKTOP_(0)'
        Class: 0x000100
        Service Classes: Unspecified
        Device Class: Computer, Uncategorized
        HCI Ver: 1.1 (0x1) HCI Rev: 0x33d LMP Ver: 1.1 (0x1) LMP Subver: 0x33d
        Manufacturer: Cambridge Silicon Radio (10)

[EMAIL PROTECTED]:~# gedit /var/lib/bluetooth/00\:08\:1B\:02\:3B\:67/config
(I manually deleted the previously inserted line with class 0x000100)
[EMAIL PROTECTED]:~# /etc/init.d/bluetooth restart
 * Restarting Bluetooth services                                         [ OK ] 
[EMAIL PROTECTED]:~# hciconfig -a
hci0:   Type: USB
        BD Address: 00:08:1B:02:3B:67 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN 
        RX bytes:3938 acl:0 sco:0 events:79 errors:0
        TX bytes:1794 acl:0 sco:0 commands:78 errors:0
        Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: HOLD SNIFF PARK 
        Link mode: ACCEPT MASTER 
        Name: 'JL-DESKTOP_(0)'
        Class: 0x3e0104
        Service Classes: Networking, Rendering, Capturing, Object Transfer, 
Audio
        Device Class: Computer, Desktop workstation
        HCI Ver: 1.1 (0x1) HCI Rev: 0x33d LMP Ver: 1.1 (0x1) LMP Subver: 0x33d
        Manufacturer: Cambridge Silicon Radio (10)
---------------------------------------------------------------------

I could not find any references to /var/lib/bluetooth/<BD
address>/config, and tracking it down took me some time,  so I file this
as a bug.

** Affects: bluez-utils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Wrong /var/lib/bluetooth/<BD address>/config prevents setting correct hci class
https://bugs.launchpad.net/bugs/144544
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to