10fc0faf8SLars Engels.\" Copyright (c) 2019 Dirk Engling 20fc0faf8SLars Engels.\" All rights reserved. 30fc0faf8SLars Engels.\" 40fc0faf8SLars Engels.\" Redistribution and use in source and binary forms, with or without 50fc0faf8SLars Engels.\" modification, are permitted provided that the following conditions 60fc0faf8SLars Engels.\" are met: 70fc0faf8SLars Engels.\" 1. Redistributions of source code must retain the above copyright 80fc0faf8SLars Engels.\" notice, this list of conditions and the following disclaimer. 90fc0faf8SLars Engels.\" 2. Redistributions in binary form must reproduce the above copyright 100fc0faf8SLars Engels.\" notice, this list of conditions and the following disclaimer in the 110fc0faf8SLars Engels.\" documentation and/or other materials provided with the distribution. 120fc0faf8SLars Engels.\" 130fc0faf8SLars Engels.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 140fc0faf8SLars Engels.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 150fc0faf8SLars Engels.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 160fc0faf8SLars Engels.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 170fc0faf8SLars Engels.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 180fc0faf8SLars Engels.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 190fc0faf8SLars Engels.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 200fc0faf8SLars Engels.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 210fc0faf8SLars Engels.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 220fc0faf8SLars Engels.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 230fc0faf8SLars Engels.\" SUCH DAMAGE. 240fc0faf8SLars Engels.\" 250fc0faf8SLars Engels.Dd January 7, 2019 260fc0faf8SLars Engels.Dt BLUETOOTH-CONFIG 8 270fc0faf8SLars Engels.Os 280fc0faf8SLars Engels.Sh NAME 290fc0faf8SLars Engels.Nm bluetooth-config 300fc0faf8SLars Engels.Nd a script to manage config files for the bluetooth sub system 310fc0faf8SLars Engels.Sh SYNOPSIS 320fc0faf8SLars Engels.Nm 330fc0faf8SLars Engels.Ar scan 340fc0faf8SLars Engels.Op Fl d Ar device 350fc0faf8SLars Engels.Op Fl n Ar node 360fc0faf8SLars Engels.Sh DESCRIPTION 370fc0faf8SLars EngelsThe 380fc0faf8SLars Engels.Nm 390fc0faf8SLars Engelsutility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. 400fc0faf8SLars Engels.Pp 410fc0faf8SLars EngelsThe following options are available: 420fc0faf8SLars Engels.Bl -tag -width indent+ 430fc0faf8SLars Engels.It Fl d 440fc0faf8SLars EngelsScan for a specific bluetooth device address. 450fc0faf8SLars Engels.It Fl n 46*60ee05dbSGordon BerglingLimit scan to a specific host controller. 47*60ee05dbSGordon BerglingHint: List all netgraph nodes with 480fc0faf8SLars Engels.Ql /usr/sbin/ngctl list . 490fc0faf8SLars Engels.El 500fc0faf8SLars Engels.Pp 510fc0faf8SLars Engels.Nm 520fc0faf8SLars Engelswill help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in 530fc0faf8SLars Engelspairing mode, lookup their names, allow mapping to friendly names in 540fc0faf8SLars Engels.Pa /etc/bluetooth/hosts , 550fc0faf8SLars Engelsask for the paring PIN, instrument 560fc0faf8SLars Engels.Xr hcsecd 8 570fc0faf8SLars Engelsto securely pair with new devices and, if the device offers HID endpoints such as mice or 580fc0faf8SLars Engelskeyboards, configure and restart 590fc0faf8SLars Engels.Xr bthidd 8 . 600fc0faf8SLars Engels.Pp 610fc0faf8SLars Engels.Nm 620fc0faf8SLars Engelscan bring up any interface and daemon necessary for operation and, if a node is provided on 630fc0faf8SLars Engelscommand line, will do so automatically for that interface. 640fc0faf8SLars Engels.Sh FILES 650fc0faf8SLars Engels.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact 660fc0faf8SLars Engels.It Pa /etc/bluetooth/hosts 670fc0faf8SLars Engels.It Pa sysrc -n bthidd_config 680fc0faf8SLars Engels.It Pa sysrc -n hcsecd_config 690fc0faf8SLars Engels.El 700fc0faf8SLars Engels.Sh EXAMPLES 710fc0faf8SLars Engels.Nm 720fc0faf8SLars Engelsscan -n ubt0 -a 00:26:bb:7a:58:95 730fc0faf8SLars Engels.Bd -ragged -offset indent 740fc0faf8SLars EngelsThis will scan the bluetooth controller ubt0hci for a bluetooth device with the address 750fc0faf8SLars Engels00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the 76*60ee05dbSGordon Berglingnew device. 77*60ee05dbSGordon BerglingSince in this example a mouse is paired, 780fc0faf8SLars Engels.Nm 790fc0faf8SLars Engelswill interact with 800fc0faf8SLars Engels.Xr bthidd 8 , 810fc0faf8SLars Engelsenabling it if necessary and then write an HID descriptor to its config. 820fc0faf8SLars Engels.Ed 830fc0faf8SLars Engels.Pp 840fc0faf8SLars Engels.Nm 850fc0faf8SLars Engelsscan 860fc0faf8SLars Engels.Bd -ragged -offset indent 870fc0faf8SLars EngelsThis will scan all bluetooth controllers on the systems for bluetooth devices, prompting 880fc0faf8SLars Engelsto bring up controllers or daemons along the way. 890fc0faf8SLars Engels.Ed 900fc0faf8SLars Engels.Sh SEE ALSO 91*60ee05dbSGordon Bergling.Xr bthost 1 , 920fc0faf8SLars Engels.Xr bthidcontrol 8 , 930fc0faf8SLars Engels.Xr bthidd 8 , 940fc0faf8SLars Engels.Xr hccontrol 8 , 950fc0faf8SLars Engels.Xr hcsecd 8 , 960fc0faf8SLars Engels.Xr sdpcontrol 8 , 970fc0faf8SLars Engels.Xr sysrc 8 980fc0faf8SLars Engels.Sh HISTORY 990fc0faf8SLars EngelsA 1000fc0faf8SLars Engels.Nm 1010fc0faf8SLars Engelsutility first appeared in 1020fc0faf8SLars Engels.Fx 12.1 . 1030fc0faf8SLars Engels.Sh AUTHORS 1040fc0faf8SLars Engels.An Dirk Engling Aq Mt erdgeist@erdgeist.org 105*60ee05dbSGordon Bergling.Sh CAVEATS 106*60ee05dbSGordon Bergling.Nm 107*60ee05dbSGordon Berglingcan not parse entries in 108*60ee05dbSGordon Bergling.Xr hcsecd 8 109*60ee05dbSGordon Berglingconfig file and thus will ask the user to manually modify existing pairing PIN entries. 1100fc0faf8SLars Engels.Sh THANKS TO 1110fc0faf8SLars EngelsLars Engels and Warren Block for suggestions, help, and testing. 112