* Pairing fails on kernel 2.6.39 with "Command Disallowed" error, while on 2.6.26 it works fine
@ 2011-06-10 11:41 Takeshi Hamasaki
2011-06-10 17:57 ` Gustavo F. Padovan
2011-06-13 15:48 ` Takeshi Hamasaki
0 siblings, 2 replies; 4+ messages in thread
From: Takeshi Hamasaki @ 2011-06-10 11:41 UTC (permalink / raw)
To: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 3784 bytes --]
Hello list,
I'm trying to pair Bluetooth USB dongle and Bluetooth headset
and facing a trouble.
Detail of devices are described below.
The problems happens on kernel 2.6.39,
while on kernel 2.6.26 it works fine.
I know that after 2.6.26 bluetooth driver in kernel source tree changed,
especially hci_usb changed to btusb.
To let my USB dongle work on 2.6.39, what should I do?
I'll dig into source code if it is necessary, but I don't know
where is the good place to start.
Does anybody have idea? Suggestions, hints are also welcome.
I already enabled dynamic debug facility in kernel, and
set +p to some files.
echo -n 'file hci_core.c +p' > /sys/kernel/debug/dynamic_debug/control
echo -n 'file hci_event.c +p' > /sys/kernel/debug/dynamic_debug/control
echo -n 'file hci_conn.c +p' > /sys/kernel/debug/dynamic_debug/control
echo -n 'file l2cap.c +p' > /sys/kernel/debug/dynamic_debug/control
echo -n 'file hci_sock.c +p' > /sys/kernel/debug/dynamic_debug/control
echo -n 'file af_bluetooth.c +p' > /sys/kernel/debug/dynamic_debug/control
Followings are information related to the USB dongle.
$ modinfo btusb
filename: /lib/modules/2.6.39/kernel/drivers/bluetooth/btusb.ko
license: GPL
version: 0.6
description: Generic Bluetooth USB driver ver 0.6
author: Marcel Holtmann <marcel@holtmann.org>
srcversion: 7BA5480215E4B8ADB9DFB5B
alias: usb:v0C10p0000d*dc*dsc*dp*ic*isc*ip*
(snip)
$ hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 2C:3D:4F:04:08:5F ACL MTU: 339:6 SCO MTU: 180:1
UP RUNNING
RX bytes:457 acl:0 sco:0 events:18 errors:0
TX bytes:81 acl:0 sco:0 commands:17 errors:0
Features: 0xef 0x3e 0x09 0x70 0x08 0x08 0x00 0x80
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: SLAVE ACCEPT
Name: 'Accel-OB1'
Class: 0x240404
Service Classes: Rendering, Audio
Device Class: Audio/Video, Device conforms to the Headset profile
HCI Version: 1.2 (0x2) Revision: 0x2
LMP Version: 1.2 (0x2) Subversion: 0x2
Manufacturer: Accel Semiconductor Ltd. (74)
$ lsusb -d 0c10:0000
Bus 006 Device 005: ID 0c10:0000
I also tried:
# lsusb -v -d 0c10:0000
and the result is attached as lsusb-v.txt.
# hcitool scan
Scanning ...
00:1A:7D:60:4A:AA MM-BTSH24
# hcitool info 00:1A:7D:60:4A:AA
Requesting information ...
BD Address: 00:1A:7D:60:4A:AA
Device Name: MM-BTSH24
Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
It shows failure to get Supproted features.
During that, hcidump
(snip)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:1A:7D:60:4A:AA mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:1A:7D:60:4A:AA name 'MM-BTSH24'
< HCI Command: Read Remote Version Information (0x01|0x001d) plen 2
handle 0
> HCI Event: Command Status (0x0f) plen 4
Read Remote Version Information (0x01|0x001d) status 0x0c ncmd 1
Error: Command Disallowed
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 0
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x0c ncmd 1
Error: Command Disallowed
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 0 reason 0x13
Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x0c ncmd 1
Error: Command Disallowed
Got remote name, but couldn't get remote version with errors "Command
Disallowed."
thanks in advance,
--
Takeshi Hamasaki
[-- Attachment #2: lsusb-v.txt --]
[-- Type: text/plain, Size: 9744 bytes --]
Bus 006 Device 005: ID 0c10:0000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 224 Wireless
bDeviceSubClass 1 Radio Frequency
bDeviceProtocol 1 Bluetooth
bMaxPacketSize0 64
idVendor 0x0c10
idProduct 0x0000
bcdDevice 19.15
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 193
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0009 1x 9 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0009 1x 9 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0011 1x 17 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0011 1x 17 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0019 1x 25 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0019 1x 25 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0021 1x 33 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0021 1x 33 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0031 1x 49 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0031 1x 49 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 0
iInterface 0
Device Firmware Upgrade Interface Descriptor:
bLength 7
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 5000 milliseconds
wTransferSize 1023 bytes
Device Status: 0x0000
(Bus Powered)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pairing fails on kernel 2.6.39 with "Command Disallowed" error, while on 2.6.26 it works fine
2011-06-10 11:41 Pairing fails on kernel 2.6.39 with "Command Disallowed" error, while on 2.6.26 it works fine Takeshi Hamasaki
@ 2011-06-10 17:57 ` Gustavo F. Padovan
2011-06-11 2:15 ` Takeshi Hamasaki
2011-06-13 15:48 ` Takeshi Hamasaki
1 sibling, 1 reply; 4+ messages in thread
From: Gustavo F. Padovan @ 2011-06-10 17:57 UTC (permalink / raw)
To: Takeshi Hamasaki; +Cc: linux-bluetooth
Hi Takeshi,
* Takeshi Hamasaki <hmatrjp@users.sourceforge.jp> [2011-06-10 20:41:10 +0900]:
> Hello list,
>
> I'm trying to pair Bluetooth USB dongle and Bluetooth headset
> and facing a trouble.
> Detail of devices are described below.
>
> The problems happens on kernel 2.6.39,
> while on kernel 2.6.26 it works fine.
What about 2.6.38? 2.6.26 is quite old to compare.
Gustavo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pairing fails on kernel 2.6.39 with "Command Disallowed" error, while on 2.6.26 it works fine
2011-06-10 17:57 ` Gustavo F. Padovan
@ 2011-06-11 2:15 ` Takeshi Hamasaki
0 siblings, 0 replies; 4+ messages in thread
From: Takeshi Hamasaki @ 2011-06-11 2:15 UTC (permalink / raw)
To: padovan; +Cc: linux-bluetooth
Hi Gustavo,
2011/6/11 Gustavo F. Padovan <padovan@profusion.mobi>:
>> I'm trying to pair Bluetooth USB dongle and Bluetooth headset
>> and facing a trouble.
>> Detail of devices are described below.
>>
>> The problems happens on kernel 2.6.39,
>> while on kernel 2.6.26 it works fine.
>
> What about 2.6.38? 2.6.26 is quite old to compare.
2.6.38 shows same trouble as 2.6.39.
After 2.6.26 I tried following kernel versions, and got same trouble.
2.6.29
2.6.30
2.6.31
2.6.32
2.6.35
2.6.36
2.6.37
2.6.38
2.6.39
--
Takeshi Hamasaki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pairing fails on kernel 2.6.39 with "Command Disallowed" error, while on 2.6.26 it works fine
2011-06-10 11:41 Pairing fails on kernel 2.6.39 with "Command Disallowed" error, while on 2.6.26 it works fine Takeshi Hamasaki
2011-06-10 17:57 ` Gustavo F. Padovan
@ 2011-06-13 15:48 ` Takeshi Hamasaki
1 sibling, 0 replies; 4+ messages in thread
From: Takeshi Hamasaki @ 2011-06-13 15:48 UTC (permalink / raw)
To: linux-bluetooth
Hi,
2011/6/10 Takeshi Hamasaki <hmatrjp@users.sourceforge.jp>:
> # hcitool info 00:1A:7D:60:4A:AA
> Requesting information ...
> BD Address: 00:1A:7D:60:4A:AA
> Device Name: MM-BTSH24
> Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
This result changed after I added some lines in function
hci_conn_check_pending() in net/bluetooth/hci_conn.c in kernel 2.6.39,
following change make ACL connection and it lets succeed the command:
# hcitool info 00:1A:7D:60:4A:AA
Requesting information ...
BD Address: 00:1A:7D:60:4A:AA
Device Name: MM-BTSH24
LMP Version: 2.1 (0x4) LMP Subversion: 0x14fa
Manufacturer: Cambridge Silicon Radio (10)
Features page 0: 0xff 0xfe 0x0f 0xc6 0x8b 0xef 0x59 0x83
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<RSSI> <channel quality> <SCO link> <HV2 packets>
<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
<power control> <transparent SCO> <EDR ACL 2 Mbps>
<EDR ACL 3 Mbps> <inquiry with RSSI> <extended SCO>
<EV4 packets> <EV5 packets> <AFH cap. slave> <3-slot EDR ACL>
<5-slot EDR ACL> <sniff subrating> <pause encryption>
<AFH cap. master> <EDR eSCO 2 Mbps> <EDR eSCO 3 Mbps>
<3-slot EDR eSCO> <extended inquiry> <simple pairing>
<encapsulated PDU> <non-flush flag> <LSTO> <inquiry TX power>
<extended features>
Features page 1: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
------------------- changes in hci_conn.c -----------from here
void hci_conn_check_pending(struct hci_dev *hdev)
{
struct hci_conn *conn;
BT_DBG("hdev %s", hdev->name);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_state(hdev, ACL_LINK, BT_CONNECT2);
if (conn)
hci_acl_connect(conn);
+ else {
+ conn = hci_conn_hash_lookup_state(hdev, ACL_LINK, BT_CONFIG);
+ if (conn) {
+ BT_DBG("I couldn't find BT_CONNECT2 but
BT_CONFIG: address %s", batostr( &(hdev->bdaddr) ) );
+ hci_acl_connect(conn);
+ }
+ }
hci_dev_unlock(hdev);
}
------------------- changes in hci_conn.c -----------to here
>From enum definition in bluetooth.h:
BT_CONNECT2 = 6
and
BT_CONFIG = 7
Why the status was BT_CONFIG and was not BT_CONNECT2?
Anyway, it doesn't help to create connection to the headset device:
# hcitool cc 00:1A:7D:60:4A:AA
hcidump shows:
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:1A:7D:60:4A:AA ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x0b ncmd 1
Error: ACL Connection Already Exists
So I'm not sure the change is right or not.
Any suggestions?
--
Takeshi Hamasaki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-13 15:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10 11:41 Pairing fails on kernel 2.6.39 with "Command Disallowed" error, while on 2.6.26 it works fine Takeshi Hamasaki
2011-06-10 17:57 ` Gustavo F. Padovan
2011-06-11 2:15 ` Takeshi Hamasaki
2011-06-13 15:48 ` Takeshi Hamasaki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).