1.\" $NetBSD: sdpquery.1,v 1.15 2010/02/18 14:00:40 wiz Exp $ 2.\" 3.\" Copyright (c) 2006 Itronix Inc. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. The name of Itronix Inc. may not be used to endorse 15.\" or promote products derived from this software without specific 16.\" prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY 22.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25.\" ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.\" Copyright (c) 2009 The NetBSD Foundation, Inc. 31.\" Copyright (c) 2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 32.\" All rights reserved. 33.\" 34.\" Redistribution and use in source and binary forms, with or without 35.\" modification, are permitted provided that the following conditions 36.\" are met: 37.\" 1. Redistributions of source code must retain the above copyright 38.\" notice, this list of conditions and the following disclaimer. 39.\" 2. Redistributions in binary form must reproduce the above copyright 40.\" notice, this list of conditions and the following disclaimer in the 41.\" documentation and/or other materials provided with the distribution. 42.\" 43.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 44.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 45.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 46.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 47.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 48.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 49.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 50.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 51.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 52.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 53.\" SUCH DAMAGE. 54.\" 55.\" $FreeBSD: src/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8,v 1.6 2005/07/09 19:04:43 markus Exp $ 56.\" 57.Dd October 6, 2009 58.Dt SDPQUERY 1 59.Os 60.Sh NAME 61.Nm sdpquery 62.Nd Service Discovery Protocol query utility 63.Sh SYNOPSIS 64.Nm 65.Op Fl NRX 66.Op Fl d Ar device 67.Fl a Ar address 68.Ar command 69.Op Ar parameters ... 70.Nm 71.Op Fl NRX 72.Op Fl c Ar path 73.Fl l 74.Ar command 75.Op Ar parameters ... 76.Sh DESCRIPTION 77The 78.Nm 79utility attempts to query the specified Service Discovery Protocol 80(SDP) server. 81Remote SDP servers are identified by their address. 82Connection to the local SDP server is made via the control socket. 83The 84.Nm 85utility retrieves complete Service Records as directed and prints 86each record's attribute ID/value list to standard output and error 87messages to standard error. 88.Pp 89The options are as follows: 90.Bl -tag -width ".Fl a Ar address" 91.It Fl a Ar address 92Connect to the remote device with the specified address. 93The address can be specified as BD_ADDR or a name. 94If a name was specified, the 95.Nm 96utility attempts to resolve the name via 97.Xr bt_gethostbyname 3 . 98If no remote address is given, 99.Nm 100attempts to contact a local SDP server via the control socket. 101.It Fl c Ar path 102Specify path to the control socket. 103The default path is 104.Pa /var/run/sdp . 105.It Fl d Ar device 106Connect from the local device with the specified address. 107The device can be specified by BD_ADDR or device name. 108See 109.Xr btconfig 8 110for a list of devices available. 111If no device is specified, the 112.Nm 113utility will use the best available. 114.It Fl l 115Query the local SDP server via the control socket. 116.It Fl N 117Additionally display numerical values. 118.It Fl R 119Display service attributes in raw (uninterpreted) format. 120.It Fl X 121Display service attribute values in hex. 122.El 123.Pp 124The currently supported commands in 125.Nm 126are: 127.Pp 128.Bl -tag -width Browse -compact 129.It Cm Browse Op Ar group 130Browse for services. 131The 132.Ar group 133parameter is the UUID of the group to browse. 134If omitted, the "Public Browse Group" is used. 135.Pp 136.It Cm Record Ar handle Op Ar handle... 137Retrieve the Service Record with the given 138.Ar handle . 139Multiple handles can be given. 140.Pp 141.It Cm Search Ar uuid Op Ar uuid... 142Search for records matching the list of 143UUIDs which can be given in numerical form, or the 144following aliases are known: 145.Pp 146.Bl -tag -offset indent -compact -width RFCOMMxxx 147.It A2DP 148Advanced Audio Distribution Profile 149.It BNEP 150Bluetooth Network Encapsulation Protocol 151.It CIP 152Common ISDN Access Service 153.It CTP 154Cordless Telephony Service 155.It DUN 156Dialup Networking Service 157.It FAX 158Fax Service 159.It FTRN 160File Transfer Service 161.It GN 162Group ad-hoc Network Service 163.It HID 164Human Interface Device Service 165.It HF 166Handsfree Service 167.It HSET 168Headset Service 169.It L2CAP 170Logical Link Control and Adaptation Protocol 171.It LAN 172LAN Access Using PPP Service 173.It NAP 174Network Access Point Service 175.It OBEX 176Object Exchange Protocol 177.It OPUSH 178Object Push Service 179.It PANU 180Personal Area Networking User Service 181.It PNP 182Plug'n'Play Information Service 183.It RFCOMM 184RFCOMM Protocol 185.It SDP 186Service Discovery Protocol 187.It SP 188Serial Port Service 189.It SYNC 190IrMC Sync Client Service 191.El 192.Pp 193Note that in order for a record to match, it must contain all the 194UUIDs in the ServiceSearchPattern and the maximum number is 12. 195.El 196.Sh EXIT STATUS 197.Ex -std 198.Sh SEE ALSO 199.Xr bluetooth 3 , 200.Xr sdp 3 , 201.Xr btconfig 8 , 202.Xr sdpd 8 203.Sh HISTORY 204The 205.Nm 206command first appeared in 207.Fx 5.3 208as 209.Nm sdpcontrol . 210It was ported to 211.Nx 4.0 212under its present name by 213.An Iain Hibbert 214under the sponsorship of Itronix, Inc. 215.Sh AUTHORS 216.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 217.An Iain Hibbert 218for Itronix, Inc. 219