1.\" $NetBSD: btconfig.8,v 1.7 2007/09/07 18:40:01 plunky Exp $ 2.\" 3.\" Copyright (c) 2006 Itronix Inc. 4.\" All rights reserved. 5.\" 6.\" Written by Iain Hibbert for Itronix Inc. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. The name of Itronix Inc. may not be used to endorse 17.\" or promote products derived from this software without specific 18.\" prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY 24.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27.\" ON ANY THEORY OF LIABILITY, WHETHER IN 28.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30.\" POSSIBILITY OF SUCH DAMAGE. 31.\" 32.Dd September 7, 2007 33.Dt BTCONFIG 8 34.Os 35.Sh NAME 36.Nm btconfig 37.Nd configure bluetooth devices 38.Sh SYNOPSIS 39.Nm 40.Op Fl svz 41.Oo 42.Ar device 43.Op Ar parameters 44.Oc 45.Nm 46.Op Fl l 47.Sh DESCRIPTION 48.Nm 49is used to configure Bluetooth devices. 50If the 51.Ar device 52is given, but no parameters, then 53.Nm 54will print information about the device. 55If no 56.Ar device 57is given, a basic list of devices will be printed. 58.Pp 59When the 60.Fl l 61flag is used, just the device names will be printed. 62.Sh COMMANDS 63The following parameters may be specified with 64.Nm : 65.Bl -tag -width xxxxxxxxxxx 66.It Cm up 67Enable Bluetooth Device. 68.It Cm down 69Disable Bluetooth Device. 70.It Cm pscan 71Enable Page Scan. 72This enables incoming connections to the device. 73.It Cm -pscan 74Disable Page Scan. 75.It Cm iscan 76Enable Inquiry Scan. 77This puts the device in Discoverable mode. 78.It Cm -iscan 79Disable Inquiry Scan. 80.It Cm encrypt 81Enable encryption. 82This will cause the device to request encryption on all baseband 83connections, and will only work if authentication is also enabled. 84.It Cm -encrypt 85Disable encryption. 86.It Cm auth 87Enable authentication. 88This will cause the device to request authentication 89for all baseband connections. 90.It Cm -auth 91Disable authentication. 92.It Cm switch 93Enable Role Switching. 94.It Cm -switch 95Disable Role Switching. 96.It Cm hold 97Enable Hold Mode. 98.It Cm -hold 99Disable Hold Mode. 100.It Cm sniff 101Enable Sniff Mode. 102.It Cm -sniff 103Disable Sniff Mode. 104.It Cm park 105Enable Park Mode. 106.It Cm -park 107Disable Park Mode. 108.It Cm name Ar name 109Set human readable name of device. 110.It Cm ptype Ar type 111Set packet types. 112.Ar type 113is a 16 bit hex value specifying packet types that will be requested 114by outgoing ACL connections. 115By default, all packet types that the device supports are enabled, 116see bluetooth specifications for more information if you want to change this. 117.It Cm class Ar class 118Set class of device. 119.Ar class 120is a 3 byte hex value the value of which declares the device capabilities. 121See Bluetooth Assigned Numbers documents at 122.Dv https://www.bluetooth.org/ 123for details 124of constructing a "Class of Device" value. 125As a starter, 0x020104 means Desktop Computer, with Networking 126available. 127.It Cm fixed 128Set fixed pin type. 129.It Cm variable 130Set variable pin type. 131.It Cm inquiry 132Perform device Discovery from the specified device and print details. 133.It Cm rssi 134Enable Remote Signal Strength Indicator (RSSI) in inquiry results. 135This will only work if the device features indicate 136.Aq RSSI with inquiry result . 137.It Cm -rssi 138Disable Remote Signal Strength Indicator (RSSI) in inquiry results. 139.It Cm reset 140Perform a hard reset on the device and re-initialise system state. 141.It Cm voice 142Set Voice Setting. 143[This should be 0x0060 for now] 144.It Cm pto 145Set Page Timeout value. 146This is a decimal value in milliseconds. 147.It Cm scomtu 148Change SCO mtu value. 149This is a decimal value, see 150.Xr ubt 4 151for reasons why you may need to do this. 152.El 153.Pp 154All parameters are parsed before any device operations take place. 155Each time the 156.Fl v 157flag is given, verbosity levels will be increased. 158.Pp 159Super-user privileges are required to change device configurations. 160.Sh DIAGNOSTICS 161Messages indicating the specified device does not exist, the 162requested address is unknown, or the user is not privileged and 163tried to alter an device's configuration. 164.Sh SEE ALSO 165.Xr bluetooth 4 , 166.Xr bt3c 4 , 167.Xr btuart 4 , 168.Xr ubt 4 169.Sh HISTORY 170The 171.Nm 172command was written for 173.Nx 4.0 174by 175.An Iain Hibbert 176under the sponsorship of Itronix, Inc. 177.Sh BUGS 178The output is very messy. 179