Bug 180722 - [bluetooth] bluetooth takes 30-50 attempts to pair to keyboard and will not re-connect
Summary: [bluetooth] bluetooth takes 30-50 attempts to pair to keyboard and will not r...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bluetooth (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-21 16:30 UTC by Anil Gulati
Modified: 2018-08-19 20:50 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anil Gulati 2013-07-21 16:30:00 UTC
For a first time pair attempt Logitech K810 bluetooth keyboard
takes 30-50 attempts or more before it pairs and keystrokes work.
This takes up to 20 minutes or more to establish pair.

If keyboard paired and connected it is not recognised after reboot.
In order to pair / connect to keyboard again it is necessary to
delete /var/db/hcsecd.keys /var/db/bthidd.hids,
restart services bluetooth, hcsecd and bthidd,
then press the connect button on the keyboard
and then wait for another pair (20 minutes or so).

When keyboard switched off and on again it seems no reconnect happens.
"closed control connection" is logged in messages but nothing after that.
I type on keyboard and press the connect button again but no logging
and no re-connect - keystrokes not recognised.

Problem also experienced by sk8hardiefast on forums.
Description in this thread:
http://forums.freebsd.org/showthread.php?t=39679&page=3

I've configured no pin to simplify.

Pair attempts can be seen progressing in messages:
..
Jul 21 22:49:13 engine kernel: WARNING: attempt to domain_add(bluetooth) after domainfinalize()
Jul 21 22:49:13 engine kernel: WARNING: attempt to domain_add(netgraph) after domainfinalize()
..
Jul 21 22:55:28 engine bthidd[1999]: Got signal 15, total number of signals 1
Jul 21 22:55:28 engine bthidd[2322]: Opening outbound session for 00:1f:20:75:7c:75 (new_device=1, reconnect_initiate=1)
Jul 21 22:55:28 engine kernel: kbd3 at vkbd0
Jul 21 22:55:29 engine bthidd[2322]: Could not connect to 00:1f:20:75:7c:75. Connection reset by peer (54)
Jul 21 22:55:48 engine bthidd[2322]: Opening outbound session for 00:1f:20:75:7c:75 (new_device=1, reconnect_initiate=1)
Jul 21 22:55:48 engine kernel: kbd3 at vkbd1
Jul 21 22:55:51 engine bthidd[2322]: Could not connect to 00:1f:20:75:7c:75. Connection reset by peer (54)
..
Jul 21 23:04:48 engine bthidd[2322]: Opening outbound session for 00:1f:20:75:7c:75 (new_device=1, reconnect_initiate=1)
Jul 21 23:04:48 engine kernel: kbd3 at vkbd28
Jul 21 23:04:49 engine bthidd[2322]: Could not connect to 00:1f:20:75:7c:75. Connection reset by peer (54)
Jul 21 23:05:08 engine bthidd[2322]: Opening outbound session for 00:1f:20:75:7c:75 (new_device=1, reconnect_initiate=1)
Jul 21 23:05:08 engine kernel: kbd3 at vkbd29
Jul 21 23:05:09 engine bthidd[2322]: Could not connect to 00:1f:20:75:7c:75. Connection reset by peer (54)
Jul 21 23:05:28 engine bthidd[2322]: Opening outbound session for 00:1f:20:75:7c:75 (new_device=1, reconnect_initiate=1)
Jul 21 23:05:28 engine kernel: kbd3 at vkbd30
..
Jul 22 01:09:41 engine bthidd[2322]: Remote device 00:1f:20:75:7c:75 has closed control connection

Fix: 

Sorry, I don't know how.
How-To-Repeat: Assuming this is not restricted to the Logitech K810 keyboard
I guess the best way to reproduce is get ubt Broadcom Bluetooth adapter
and attempt to connect any bluetooth keyboard.
Note ubt driver is patched (see environment).
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-07-26 22:46:03 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:42:31 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 3 Anil Gulati 2018-05-30 14:44:29 UTC
I am the reporter but I don't have a working BSD install right now, sorry.
I guess I can say it won't affect me if you close the bug report.
Thanks
Comment 4 Steve Wills freebsd_committer freebsd_triage 2018-05-30 15:10:42 UTC
I can say that I don't have this issue on 12-CURRENT with my BT keyboard.
Comment 5 Steve Wills freebsd_committer freebsd_triage 2018-05-30 15:12:15 UTC
Also, not sure why this is assigned to net@ instead of bluetooth@. Reassigning...
Comment 6 Ivan 2018-08-19 20:50:28 UTC
@St(In reply to Steve Wills from comment #4)
Does FreeBSD require some special configuration? I've tried several Wifi/Bluetooth combo cards, but BT always failed for me.
https://forums.freebsd.org/threads/atheros-ar946x-ar948x-and-bluetooth.66488/