Skip to contentSkip to conversation

How to set link policy with Logitech diNovo dongle

DISCUSSION Thomas Liebetraut 3 participants 14 messages Dec 8, 2008 – Dec 13, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,

I recently got a used Logitech diNovo Media Desktop. It has a bluetooth hub and the Logitech MX900 bluetooth mouse. I first connected everything to my laptop with integrated Cambridge Silicon Bluetooth and everything worked fine. Then I plugged the Logitech hub to my desktop PC and used hid2hci to switch it over to HCI mode. I configured bluetooth for my system and connected to all the devices. Keyboard and Media Pad work fine, but the mouse is jumpy, as if some packets get buffered for some milliseconds before being send.
I googled around and found a message from 2004 [1] stating that the link policy has to be set correctly. As you can see from my output of hciconfig -a (see below), it is not. I have a correct lp line in my /etc/bluetooth/hcid.conf (see below) and the exact same configuration enables all lp flags on my laptop's internal bluetooth (plugging in the Logitech hub to my laptop doesn't set the hub to proper lp either, but the internal bluetooth works!).
Is there a way I can manually set the link policy? I understand that I can't use much of the tips from the thread refered to in [1], as the tools used there are outdated (I don't even have a hcid on my Ubuntu Intrepid Ibex 8.10 with bluez-utils 4.12 and kernel 2.6.27). Using another bluetooth mouse (Logitech Travel Mouse) on the Logitech hub connected to my PC works fine, the problem only occurs with the MX900.

Thanks in advance for any help.

Regards,
Thomas

[1] http://osdir.com/ml/linux.bluez.user/2004-03/msg00147.html

Output of hciconfig -a:
hci0: Type: USB

        BD Address: 00:07:61:19:49:79 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN
        RX bytes:688561 acl:44090 sco:0 events:194 errors:0
        TX bytes:3136 acl:107 sco:0 commands:60 errors:0
        Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: 'Majestix'
        Class: 0x0a0104
        Service Classes: Networking, Capturing
        Device Class: Computer, Desktop workstation
        HCI Ver: 1.1 (0x1) HCI Rev: 0x34e LMP Ver: 1.1 (0x1) LMP Subver:

0x34e
Manufacturer: Cambridge Silicon Radio (10)

/etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#

# HCId options
options {
# Automatically initialize new devices
autoinit yes;

# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security user;

# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;

# Default PIN code for incoming connections passkey "1234";
}

# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "%h-%d";

# Local device class
class 0x000100;

# Default packet type
#pkt_type DH1,DM1,HV1;

# Inquiry and Page scan
iscan enable; pscan enable;
discovto 0;

# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;

# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
}

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkk9cRAACgkQxVmZpTAq4IiPVQCfX92BhmnXfIDmQa2IYF3TA7YE fQMAn0I6DuSTcikL6UYgmfdyxkPbS7RQ
=0OVJ
-----END PGP SIGNATURE-----

maintainer
#1 lore raw

Hi Thomas,

Quoted 13 lines

I recently got a used Logitech diNovo Media Desktop. It has a bluetooth hub and the Logitech MX900 bluetooth mouse. I first connected everything to my laptop with integrated Cambridge Silicon Bluetooth and everything worked fine. Then I plugged the Logitech hub to my desktop PC and used hid2hci to switch it over to HCI mode. I configured bluetooth for my system and connected to all the devices. Keyboard and Media Pad work fine, but the mouse is jumpy, as if some packets get buffered for some milliseconds before being send.
I googled around and found a message from 2004 [1] stating that the link policy has to be set correctly. As you can see from my output of hciconfig -a (see below), it is not. I have a correct lp line in my /etc/bluetooth/hcid.conf (see below) and the exact same configuration enables all lp flags on my laptop's internal bluetooth (plugging in the

Quoted 8 lines

Logitech hub to my laptop doesn't set the hub to proper lp either, but the internal bluetooth works!).
Is there a way I can manually set the link policy? I understand that I can't use much of the tips from the thread refered to in [1], as the tools used there are outdated (I don't even have a hcid on my Ubuntu Intrepid Ibex 8.10 with bluez-utils 4.12 and kernel 2.6.27). Using another bluetooth mouse (Logitech Travel Mouse) on the Logitech hub connected to my PC works fine, the problem only occurs with the MX900.

for the 4.x series we removed the link policy setting and defaulted to everything enabled. That just makes sense. Also the 2.6.27 kernel uses the default link policy of Bluetooth and doesn't bother setting it on every connection attempt. Seems like there might be a bug in bluez-4.12, but to be honest I don't even bother debugging it since I just released bluez-4.22 and it works fine for me.

However to be sure what is going on you have to run "hcidump -X -V" and you can set the link policy manually via "hciconfig hci0 lp".

Regards

Marcel

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Marcel,

Quoted 2 lines · Marcel Holtmann

However to be sure what is going on you have to run "hcidump -X -V" and you can set the link policy manually via "hciconfig hci0 lp".

Using "hciconfig hci0 lp RSWITCH,SNIFF" results in | Can't set link policy on hci0: Connection timed out (110) And I get this output from hcidump when issuing this command:

| HCI sniffer - Bluetooth packet analyzer ver 1.42
| device: hci0 snap_len: 1028 filter: 0xffffffff
| < HCI Command: Write Default Link Policy Settings (0x02|0x000f) plen 2
|     policy 0x05
|     Link policy: RSWITCH SNIFF
| > HCI Event: Command Status (0x0f) plen 4
|     Write Default Link Policy Settings (0x02|0x000f) status 0x01 ncmd 1
|     Error: Unknown HCI Command

I hope I find some time tomorrow to play around with other versions of bluez-utils.

Regards,
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkk9nqQACgkQxVmZpTAq4Ij3xgCfZryUQ0LkvPvTiwcMdKEcSOdl RSAAn38IZwNpeLCQ0mF+Rn5o+i+UPP2N
=zpxU
-----END PGP SIGNATURE-----

#3 lore raw
Quoted 2 lines · Thomas Liebetraut

I hope I find some time tomorrow to play around with other versions of bluez-utils.

I just tried bluez 4.21 as a Debian package and 4.22 compiled by myself and neither worked. The problem is still the same, my MX900 is jumpy and
trying to set the link policy with hciconfig results in a "Connection
timed out (110)" error.

Anything else I could try?

Regards,
Thomas

maintainer
#4 lore raw
In reply to Thomas Liebetraut

Hi Thomas,

Quoted 14 lines
Quoted 2 lines

However to be sure what is going on you have to run "hcidump -X -V" and you can set the link policy manually via "hciconfig hci0 lp".

Using "hciconfig hci0 lp RSWITCH,SNIFF" results in | Can't set link policy on hci0: Connection timed out (110) And I get this output from hcidump when issuing this command:

| HCI sniffer - Bluetooth packet analyzer ver 1.42
| device: hci0 snap_len: 1028 filter: 0xffffffff
| < HCI Command: Write Default Link Policy Settings (0x02|0x000f) plen 2
|     policy 0x05
|     Link policy: RSWITCH SNIFF
| > HCI Event: Command Status (0x0f) plen 4
|     Write Default Link Policy Settings (0x02|0x000f) status 0x01 ncmd 1
|     Error: Unknown HCI Command
Quoted 2 lines

I hope I find some time tomorrow to play around with other versions of bluez-utils.

this is a serious problem. Please show me hciconfig -a of your dongle. I have never seen a dongle that doesn't support Default Link Policy.

Regards

Marcel

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Marcel,

Quoted 2 lines · Marcel Holtmann

this is a serious problem. Please show me hciconfig -a of your dongle. I have never seen a dongle that doesn't support Default Link Policy.

Here is the output from hciconfig -a:

| thomas@Majestix:~/src/bluez-4.22$ hciconfig -a
| hci0:   Type: USB
|         BD Address: 00:07:61:19:49:79 ACL MTU: 192:8 SCO MTU: 64:8
|         UP RUNNING PSCAN
|         RX bytes:27144 acl:1558 sco:0 events:162 errors:0
|         TX bytes:1935 acl:59 sco:0 commands:68 errors:0
|         Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
|         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
|         Link policy:
|         Link mode: SLAVE ACCEPT
|         Name: 'Majestix-0'
|         Class: 0x0a0104
|         Service Classes: Networking, Capturing
|         Device Class: Computer, Desktop workstation
|         HCI Ver: 1.1 (0x1) HCI Rev: 0x34e LMP Ver: 1.1 (0x1) LMP

Subver: 0x34e
| Manufacturer: Cambridge Silicon Radio (10)

And the output from lsusb to identify the dongle:

thomas@Majestix:~$ lsusb
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 046d:c707 Logitech, Inc. Bluetooth wireless hub
Bus 002 Device 005: ID 046d:c704 Logitech, Inc.
Bus 002 Device 004: ID 0451:2036 Texas Instruments, Inc. TUSB2036 Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The second Logitech device seems to be the USB HID adapter from the exact same dongle.

Regards,
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklCnt8ACgkQxVmZpTAq4IglkwCfT9LYAKU8t79FYsp/iPzFb7J3 eQAAn1somnyLbLGDSd7kdCRBJf14PAOs
=GOg8
-----END PGP SIGNATURE-----

maintainer
#6 lore raw

Hi Thomas,

Quoted 19 lines
Quoted 2 lines

this is a serious problem. Please show me hciconfig -a of your dongle. I have never seen a dongle that doesn't support Default Link Policy.

Here is the output from hciconfig -a:

| thomas@Majestix:~/src/bluez-4.22$ hciconfig -a
| hci0:   Type: USB
|         BD Address: 00:07:61:19:49:79 ACL MTU: 192:8 SCO MTU: 64:8
|         UP RUNNING PSCAN
|         RX bytes:27144 acl:1558 sco:0 events:162 errors:0
|         TX bytes:1935 acl:59 sco:0 commands:68 errors:0
|         Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
|         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
|         Link policy:
|         Link mode: SLAVE ACCEPT
|         Name: 'Majestix-0'
|         Class: 0x0a0104
|         Service Classes: Networking, Capturing
|         Device Class: Computer, Desktop workstation
|         HCI Ver: 1.1 (0x1) HCI Rev: 0x34e LMP Ver: 1.1 (0x1) LMP
Quoted 2 lines

Subver: 0x34e
| Manufacturer: Cambridge Silicon Radio (10)

this is a really old dongle. Check hciconfig hci0 revision (as root) if it is either a BlueCore01 or BlueCore02.

No idea why the Default Link Policy commands is not implemented here. That is really strange.

Regards

Marcel

#7 lore raw

Hi Marcel,

Quoted 1 line · Marcel Holtmann

this is a really old dongle.

Don't know exactly, about 4 years I guess. It's from the first DiNovo Media Desktop (neither Laser nor 2.0).

Quoted 2 lines

Check hciconfig hci0 revision (as root) if
it is either a BlueCore01 or BlueCore02.

| thomas@Majestix:~$ sudo hciconfig hci0 revision
| hci0:   Type: USB
|         BD Address: 00:07:61:19:49:79 ACL MTU: 192:8 SCO MTU: 64:8
|         Build 846
|         Chip version: BlueCore02-External
|         Max key size: 56 bit
|         SCO mapping:  HCI
Quoted 2 lines

No idea why the Default Link Policy commands is not implemented here. That is really strange.

Isn't there some other way to get smooth communication with my MX900? After all, the Bluetooth Travel Mouse works fine with the exact same dongle after just reconnecting it.

Regards,
Thomas

maintainer
#8 lore raw

Hi Thomas,

Quoted 14 lines
Quoted 1 line

this is a really old dongle.

Don't know exactly, about 4 years I guess. It's from the first DiNovo Media Desktop (neither Laser nor 2.0).

Quoted 2 lines

Check hciconfig hci0 revision (as root) if
it is either a BlueCore01 or BlueCore02.

| thomas@Majestix:~$ sudo hciconfig hci0 revision
| hci0:   Type: USB
|         BD Address: 00:07:61:19:49:79 ACL MTU: 192:8 SCO MTU: 64:8
|         Build 846
|         Chip version: BlueCore02-External
|         Max key size: 56 bit
|         SCO mapping:  HCI
Quoted 5 lines
Quoted 2 lines

No idea why the Default Link Policy commands is not implemented here. That is really strange.

Isn't there some other way to get smooth communication with my MX900? After all, the Bluetooth Travel Mouse works fine with the exact same dongle after just reconnecting it.

not really. It is tricky and I am not willing to go back to the per connection link policy setup, because that interferes with how with setup Bluetooth 2.1 devices.

Problem is that this particular firmware is a custom build for Logitech (or beta firmware) as it looks like. Also you have other problems with not having AFH enabled when you have WiFi around.

I think that I do have the exact same mouse and keyboard at home somewhere. But not supporting Default Link Policy is just pure stupid.

Regards

Marcel

#12 lore raw
In reply to Thomas Liebetraut
Quoted 35 lines · Thomas Liebetraut

Hi Marcel,

Quoted 2 lines · Marcel Holtmann

this is a serious problem. Please show me hciconfig -a of your dongle. I have never seen a dongle that doesn't support Default Link Policy.

Here is the output from hciconfig -a:

| thomas@Majestix:~/src/bluez-4.22$ hciconfig -a
| hci0:   Type: USB
|         BD Address: 00:07:61:19:49:79 ACL MTU: 192:8 SCO MTU: 64:8
|         UP RUNNING PSCAN
|         RX bytes:27144 acl:1558 sco:0 events:162 errors:0
|         TX bytes:1935 acl:59 sco:0 commands:68 errors:0
|         Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
|         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
|         Link policy:
|         Link mode: SLAVE ACCEPT
|         Name: 'Majestix-0'
|         Class: 0x0a0104
|         Service Classes: Networking, Capturing
|         Device Class: Computer, Desktop workstation
|         HCI Ver: 1.1 (0x1) HCI Rev: 0x34e LMP Ver: 1.1 (0x1) LMP

Subver: 0x34e
| Manufacturer: Cambridge Silicon Radio (10)

And the output from lsusb to identify the dongle:

thomas@Majestix:~$ lsusb
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 046d:c707 Logitech, Inc. Bluetooth wireless hub
Bus 002 Device 005: ID 046d:c704 Logitech, Inc.
Bus 002 Device 004: ID 0451:2036 Texas Instruments, Inc. TUSB2036 Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Quoted 3 lines

The second Logitech device seems to be the USB HID adapter from the exact same dongle.

Hi Thomas,

I got a few thoughts about this, I also have a few Logitech devices with Logitech bluetooth adapters, but they where kind of special and contain a button that must be used to connect the device I think its some kind of auto pairing button. Do your dongles contains such buttons?

Best regards,

Jelle

#9 lore raw
In reply to Marcel Holtmann

Hi Marcel,

Quoted 6 lines · Marcel Holtmann

Problem is that this particular firmware is a custom build for Logitech (or beta firmware) as it looks like. Also you have other problems with not having AFH enabled when you have WiFi around.

I think that I do have the exact same mouse and keyboard at home somewhere. But not supporting Default Link Policy is just pure stupid.

So I better go any buy a new dongle? Or do you see any chance to make this old one work?
Any recommendations for a new dongle? Are those small cheap noname dongles for 8 Euros (10 USD) any good? Or does quality have its price?

Regards,
Thomas

maintainer
#10 lore raw

Hi Thomas,

Quoted 10 lines
Quoted 6 lines

Problem is that this particular firmware is a custom build for Logitech (or beta firmware) as it looks like. Also you have other problems with not having AFH enabled when you have WiFi around.

I think that I do have the exact same mouse and keyboard at home somewhere. But not supporting Default Link Policy is just pure stupid.

So I better go any buy a new dongle? Or do you see any chance to make this old one work?
Any recommendations for a new dongle? Are those small cheap noname dongles for 8 Euros (10 USD) any good? Or does quality have its price?

as long as you get one with a CSR or Broadcom chip and Bluetooth 2.1 your are in a good position. The new ones are really really tiny and stick only out 1cm or so. Personally I prefer CSR based dongles.

Regards

Marcel

#13 lore raw
In reply to Jelle de Jong

Hi Jelle,

Quoted 4 lines

I got a few thoughts about this, I also have a few Logitech devices with Logitech bluetooth adapters, but they where kind of special and contain a button that must be used to connect the device I think its some kind of auto pairing button. Do your dongles contains such buttons?

Yes it has, but it seems to have no effect when in HCI mode. In HID mode, the button is used to connect to the mouse and keyboard, that's right.

Regards,
Thomas

#11 lore raw
In reply to Marcel Holtmann
Quoted 3 lines · Marcel Holtmann

as long as you get one with a CSR or Broadcom chip and Bluetooth 2.1 your are in a good position. The new ones are really really tiny and stick only out 1cm or so. Personally I prefer CSR based dongles.

Everything works now with a new CSR dongle. And it sticks out less than a centimeter ;-)

Thanks for all your help.

Regards,
Thomas