* 3.19-rc1 refuse connection from bluetooth headset
@ 2014-12-24 17:15 Pali Rohár
2014-12-24 17:36 ` Johan Hedberg
0 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2014-12-24 17:15 UTC (permalink / raw)
To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, linux-bluetooth,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]
Hello,
now I installed 3.19-rc1 kernel and my bluetooth headset was refused to connect automatically. I need to start
connection manually from laptop (and then it working). Before when I started bluetooth headset it automatically
connected and I did not have to do anything. Now with 3.19-rc1 kernel I need to do connection manually and I see
error messages in hcidump:
$ sudo hcidump
HCI sniffer - Bluetooth packet analyzer ver 2.2
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> HCI Event: Connect Request (0x04) plen 10
bdaddr <HEADSET_ADDRESS> class 0x240404 type ACL
< HCI Command: Reject Connection Request (0x01|0x000a) plen 7
bdaddr <HEADSET_ADDRESS> reason 0x0f
Reason: Connection Rejected due to Unacceptable BD_ADDR
> HCI Event: Command Status (0x0f) plen 4
Reject Connection Request (0x01|0x000a) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x0f handle 34 bdaddr <HEADSET_ADDRESS> type ACL encrypt 0x00
Error: Connection Rejected due to Unacceptable BD_ADDR
> HCI Event: Connect Request (0x04) plen 10
bdaddr <HEADSET_ADDRESS> class 0x240404 type ACL
< HCI Command: Reject Connection Request (0x01|0x000a) plen 7
bdaddr <HEADSET_ADDRESS> reason 0x0f
Reason: Connection Rejected due to Unacceptable BD_ADDR
> HCI Event: Command Status (0x0f) plen 4
Reject Connection Request (0x01|0x000a) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x0f handle 35 bdaddr <HEADSET_ADDRESS> type ACL encrypt 0x00
Error: Connection Rejected due to Unacceptable BD_ADDR
(real address of my bluetooth headset was replaced by <HEADSET_ADDRESS>)
Can you inspect why new kernel refuse connection from my bluetooth headset?
I'm still using bluez 4.98 (which is in Ubuntu 12.04), I did not do any update.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 3.19-rc1 refuse connection from bluetooth headset
2014-12-24 17:15 3.19-rc1 refuse connection from bluetooth headset Pali Rohár
@ 2014-12-24 17:36 ` Johan Hedberg
2014-12-24 18:32 ` Pali Rohár
0 siblings, 1 reply; 7+ messages in thread
From: Johan Hedberg @ 2014-12-24 17:36 UTC (permalink / raw)
To: Pali Rohár
Cc: Marcel Holtmann, Gustavo Padovan, linux-bluetooth, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2159 bytes --]
Hi Pali,
On Wed, Dec 24, 2014, Pali Rohár wrote:
> now I installed 3.19-rc1 kernel and my bluetooth headset was refused
> to connect automatically. I need to start connection manually from
> laptop (and then it working). Before when I started bluetooth headset
> it automatically connected and I did not have to do anything. Now with
> 3.19-rc1 kernel I need to do connection manually and I see error
> messages in hcidump:
>
> $ sudo hcidump
> HCI sniffer - Bluetooth packet analyzer ver 2.2
> device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> > HCI Event: Connect Request (0x04) plen 10
> bdaddr <HEADSET_ADDRESS> class 0x240404 type ACL
> < HCI Command: Reject Connection Request (0x01|0x000a) plen 7
> bdaddr <HEADSET_ADDRESS> reason 0x0f
> Reason: Connection Rejected due to Unacceptable BD_ADDR
> > HCI Event: Command Status (0x0f) plen 4
> Reject Connection Request (0x01|0x000a) status 0x00 ncmd 1
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x0f handle 34 bdaddr <HEADSET_ADDRESS> type ACL encrypt 0x00
> Error: Connection Rejected due to Unacceptable BD_ADDR
> > HCI Event: Connect Request (0x04) plen 10
> bdaddr <HEADSET_ADDRESS> class 0x240404 type ACL
> < HCI Command: Reject Connection Request (0x01|0x000a) plen 7
> bdaddr <HEADSET_ADDRESS> reason 0x0f
> Reason: Connection Rejected due to Unacceptable BD_ADDR
> > HCI Event: Command Status (0x0f) plen 4
> Reject Connection Request (0x01|0x000a) status 0x00 ncmd 1
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x0f handle 35 bdaddr <HEADSET_ADDRESS> type ACL encrypt 0x00
> Error: Connection Rejected due to Unacceptable BD_ADDR
>
> (real address of my bluetooth headset was replaced by <HEADSET_ADDRESS>)
>
> Can you inspect why new kernel refuse connection from my bluetooth headset?
>
> I'm still using bluez 4.98 (which is in Ubuntu 12.04), I did not do any update.
Could you try the attached patch? I think the reason might be the
dependence on the HCI_CONNECTABLE flag that's only set if the page scan
was enabled through mgmt (which wouldn't be the case with BlueZ 4.98).
Johan
[-- Attachment #2: conn-reject.patch --]
[-- Type: text/plain, Size: 570 bytes --]
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c03d4b09caa3..898dfd7ceeee 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2197,7 +2197,8 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
return;
}
- if (!test_bit(HCI_CONNECTABLE, &hdev->dev_flags) &&
+ if (test_bit(HCI_MGMT, &hdev->dev_flags) &&
+ !test_bit(HCI_CONNECTABLE, &hdev->dev_flags) &&
!hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr,
BDADDR_BREDR)) {
hci_reject_conn(hdev, &ev->bdaddr);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: 3.19-rc1 refuse connection from bluetooth headset
2014-12-24 17:36 ` Johan Hedberg
@ 2014-12-24 18:32 ` Pali Rohár
2014-12-24 18:37 ` Johan Hedberg
0 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2014-12-24 18:32 UTC (permalink / raw)
To: Johan Hedberg
Cc: Marcel Holtmann, Gustavo Padovan, linux-bluetooth, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 2784 bytes --]
On Wednesday 24 December 2014 18:36:52 Johan Hedberg wrote:
> Hi Pali,
>
> On Wed, Dec 24, 2014, Pali Rohár wrote:
> > now I installed 3.19-rc1 kernel and my bluetooth headset was
> > refused to connect automatically. I need to start
> > connection manually from laptop (and then it working).
> > Before when I started bluetooth headset it automatically
> > connected and I did not have to do anything. Now with
> > 3.19-rc1 kernel I need to do connection manually and I see
> > error
> >
> > messages in hcidump:
> > $ sudo hcidump
> > HCI sniffer - Bluetooth packet analyzer ver 2.2
> > device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> >
> > > HCI Event: Connect Request (0x04) plen 10
> > >
> > bdaddr <HEADSET_ADDRESS> class 0x240404 type ACL
> >
> > < HCI Command: Reject Connection Request (0x01|0x000a) plen
> > 7
> >
> > bdaddr <HEADSET_ADDRESS> reason 0x0f
> > Reason: Connection Rejected due to Unacceptable BD_ADDR
> > >
> > > HCI Event: Command Status (0x0f) plen 4
> > >
> > Reject Connection Request (0x01|0x000a) status 0x00
> > ncmd 1
> > >
> > > HCI Event: Connect Complete (0x03) plen 11
> > >
> > status 0x0f handle 34 bdaddr <HEADSET_ADDRESS> type ACL
> > encrypt 0x00 Error: Connection Rejected due to
> > Unacceptable BD_ADDR
> > >
> > > HCI Event: Connect Request (0x04) plen 10
> > >
> > bdaddr <HEADSET_ADDRESS> class 0x240404 type ACL
> >
> > < HCI Command: Reject Connection Request (0x01|0x000a) plen
> > 7
> >
> > bdaddr <HEADSET_ADDRESS> reason 0x0f
> > Reason: Connection Rejected due to Unacceptable BD_ADDR
> > >
> > > HCI Event: Command Status (0x0f) plen 4
> > >
> > Reject Connection Request (0x01|0x000a) status 0x00
> > ncmd 1
> > >
> > > HCI Event: Connect Complete (0x03) plen 11
> > >
> > status 0x0f handle 35 bdaddr <HEADSET_ADDRESS> type ACL
> > encrypt 0x00 Error: Connection Rejected due to
> > Unacceptable BD_ADDR
> >
> > (real address of my bluetooth headset was replaced by
> > <HEADSET_ADDRESS>)
> >
> > Can you inspect why new kernel refuse connection from my
> > bluetooth headset?
> >
> > I'm still using bluez 4.98 (which is in Ubuntu 12.04), I did
> > not do any update.
>
> Could you try the attached patch? I think the reason might be
> the dependence on the HCI_CONNECTABLE flag that's only set if
> the page scan was enabled through mgmt (which wouldn't be the
> case with BlueZ 4.98).
>
> Johan
Hi Johan! Thanks for quick reply. Your patch fixes my problem and
auto-connection of my bluetooth headset is working again. Will
you forward patch to mainline kernel?
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 3.19-rc1 refuse connection from bluetooth headset
2014-12-24 18:32 ` Pali Rohár
@ 2014-12-24 18:37 ` Johan Hedberg
2014-12-24 18:41 ` Pali Rohár
0 siblings, 1 reply; 7+ messages in thread
From: Johan Hedberg @ 2014-12-24 18:37 UTC (permalink / raw)
To: Pali Rohár
Cc: Marcel Holtmann, Gustavo Padovan, linux-bluetooth, linux-kernel
Hi Pali,
On Wed, Dec 24, 2014, Pali Rohár wrote:
> > Could you try the attached patch? I think the reason might be
> > the dependence on the HCI_CONNECTABLE flag that's only set if
> > the page scan was enabled through mgmt (which wouldn't be the
> > case with BlueZ 4.98).
> >
> > Johan
>
> Hi Johan! Thanks for quick reply. Your patch fixes my problem and
> auto-connection of my bluetooth headset is working again. Will
> you forward patch to mainline kernel?
Yes, we'll tag it from 3.17.x onwards where this was introduced.
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 3.19-rc1 refuse connection from bluetooth headset
2014-12-24 18:37 ` Johan Hedberg
@ 2014-12-24 18:41 ` Pali Rohár
2015-02-12 11:22 ` Ethan
0 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2014-12-24 18:41 UTC (permalink / raw)
To: Johan Hedberg
Cc: Marcel Holtmann, Gustavo Padovan, linux-bluetooth, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 744 bytes --]
On Wednesday 24 December 2014 19:37:37 Johan Hedberg wrote:
> Hi Pali,
>
> On Wed, Dec 24, 2014, Pali Rohár wrote:
> > > Could you try the attached patch? I think the reason might
> > > be the dependence on the HCI_CONNECTABLE flag that's only
> > > set if the page scan was enabled through mgmt (which
> > > wouldn't be the case with BlueZ 4.98).
> > >
> > > Johan
> >
> > Hi Johan! Thanks for quick reply. Your patch fixes my
> > problem and auto-connection of my bluetooth headset is
> > working again. Will you forward patch to mainline kernel?
>
> Yes, we'll tag it from 3.17.x onwards where this was
> introduced.
>
> Johan
Ok, you can add my Tested-by line to patch.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 3.19-rc1 refuse connection from bluetooth headset
2014-12-24 18:41 ` Pali Rohár
@ 2015-02-12 11:22 ` Ethan
2015-02-12 11:34 ` Johan Hedberg
0 siblings, 1 reply; 7+ messages in thread
From: Ethan @ 2015-02-12 11:22 UTC (permalink / raw)
To: Pali Rohár
Cc: Johan Hedberg, Marcel Holtmann, Gustavo Padovan, linux-bluetooth,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 4464 bytes --]
Hi Johan,
I met similar issue in kernel 3.10 for Chromebook smart lock feature, I
have merged your patch but issue still happened.
Also, issue was unable to reproduce once I remove the code as below, thanks.
#if 0
/* Require HCI_CONNECTABLE or a whitelist entry to accept the
* connection. These features are only touched through mgmt so
* only do the checks if HCI_MGMT is set.
*/
if (test_bit(HCI_MGMT, &hdev->dev_flags) &&
!test_bit(HCI_CONNECTABLE, &hdev->dev_flags) &&
!hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr,
BDADDR_BREDR)) {
hci_reject_conn(hdev, &ev->bdaddr);
return;
}
#endif
> HCI Event: Connect Request (0x04) plen 10 [hci0] 109.033033
Address: BC:F5:AC:70:16:D3 (OUI BC-F5-AC)
Class: 0x5a020c
Major class: Phone (cellular, cordless, payphone, modem)
Minor class: Smart phone
Networking (LAN, Ad hoc)
Capturing (Scanner, Microphone)
Object Transfer (v-Inbox, v-Folder)
Telephony (Cordless telephony, Modem, Headset)
Link type: ACL (0x01)
< HCI Command: Reject Connection Request (0x01|0x000a) plen 7
[hci0]
109.033253
Address: BC:F5:AC:70:16:D3 (OUI BC-F5-AC)
Reason: Connection Rejected due to Unacceptable BD_ADDR (0x0f)
> HCI Event: Command Status (0x0f) plen 4 [hci0] 109.034026
Reject Connection Request (0x01|0x000a) ncmd 1
Status: Success (0x00)
> HCI Event: Connect Complete (0x03) plen 11 [hci0] 109.116034
Status: Connection Rejected due to Unacceptable BD_ADDR (0x0f)
Handle: 65535
Address: BC:F5:AC:70:16:D3 (OUI BC-F5-AC)
Link type: ACL (0x01)
Encryption: Disabled (0x00)
> HCI Event: Connect Request (0x04) plen 10 [hci0] 110.159024
Address: BC:F5:AC:70:16:D3 (OUI BC-F5-AC)
Class: 0x5a020c
Major class: Phone (cellular, cordless, payphone, modem)
Minor class: Smart phone
Networking (LAN, Ad hoc)
Capturing (Scanner, Microphone)
Object Transfer (v-Inbox, v-Folder)
Telephony (Cordless telephony, Modem, Headset)
Link type: ACL (0x01)
< HCI Command: Reject Connection Request (0x01|0x000a) plen 7
[hci0]
110.159079
Address: BC:F5:AC:70:16:D3 (OUI BC-F5-AC)
Reason: Connection Rejected due to Unacceptable BD_ADDR (0x0f)
> HCI Event: Command Status (0x0f) plen 4 [hci0] 110.160018
Reject Connection Request (0x01|0x000a) ncmd 1
Status: Success (0x00)
> HCI Event: Connect Complete (0x03) plen 11 [hci0] 110.248103
Status: Connection Rejected due to Unacceptable BD_ADDR (0x0f)
Handle: 65535
Address: BC:F5:AC:70:16:D3 (OUI BC-F5-AC)
Link type: ACL (0x01)
Encryption: Disabled (0x00)
Ethan
2014-12-25 2:41 GMT+08:00 Pali Rohár <pali.rohar@gmail.com>:
> On Wednesday 24 December 2014 19:37:37 Johan Hedberg wrote:
> > Hi Pali,
> >
> > On Wed, Dec 24, 2014, Pali Rohár wrote:
> > > > Could you try the attached patch? I think the reason might
> > > > be the dependence on the HCI_CONNECTABLE flag that's only
> > > > set if the page scan was enabled through mgmt (which
> > > > wouldn't be the case with BlueZ 4.98).
> > > >
> > > > Johan
> > >
> > > Hi Johan! Thanks for quick reply. Your patch fixes my
> > > problem and auto-connection of my bluetooth headset is
> > > working again. Will you forward patch to mainline kernel?
> >
> > Yes, we'll tag it from 3.17.x onwards where this was
> > introduced.
> >
> > Johan
>
> Ok, you can add my Tested-by line to patch.
>
> --
> Pali Rohár
> pali.rohar@gmail.com
>
[-- Attachment #2: Type: text/html, Size: 5422 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 3.19-rc1 refuse connection from bluetooth headset
2015-02-12 11:22 ` Ethan
@ 2015-02-12 11:34 ` Johan Hedberg
0 siblings, 0 replies; 7+ messages in thread
From: Johan Hedberg @ 2015-02-12 11:34 UTC (permalink / raw)
To: Ethan
Cc: Pali Rohár, Marcel Holtmann, Gustavo Padovan,
linux-bluetooth, linux-kernel
Hi Ethan,
On Thu, Feb 12, 2015, Ethan wrote:
> I met similar issue in kernel 3.10 for Chromebook smart lock feature, I
> have merged your patch but issue still happened.
The whole feature of checking the whitelist when HCI_CONNECTABLE is not
set was introduced only in kernel version 3.18. So it makes no sense to
try to backport my patch to 3.10. If you have issues with 3.10 without
my patch then it's something else that's going on and that deserves a
separate email thread.
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-02-12 11:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-24 17:15 3.19-rc1 refuse connection from bluetooth headset Pali Rohár
2014-12-24 17:36 ` Johan Hedberg
2014-12-24 18:32 ` Pali Rohár
2014-12-24 18:37 ` Johan Hedberg
2014-12-24 18:41 ` Pali Rohár
2015-02-12 11:22 ` Ethan
2015-02-12 11:34 ` Johan Hedberg
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).