1.\" $NetBSD: sdpquery.1,v 1.8 2007/02/17 09:39:11 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) 2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 31.\" All rights reserved. 32.\" 33.\" Redistribution and use in source and binary forms, with or without 34.\" modification, are permitted provided that the following conditions 35.\" are met: 36.\" 1. Redistributions of source code must retain the above copyright 37.\" notice, this list of conditions and the following disclaimer. 38.\" 2. Redistributions in binary form must reproduce the above copyright 39.\" notice, this list of conditions and the following disclaimer in the 40.\" documentation and/or other materials provided with the distribution. 41.\" 42.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 43.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 44.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 45.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 46.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 47.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 48.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 49.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 50.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 51.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 52.\" SUCH DAMAGE. 53.\" 54.\" $FreeBSD: src/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8,v 1.6 2005/07/09 19:04:43 markus Exp $ 55.\" 56.Dd February 17, 2007 57.Dt SDPQUERY 1 58.Os 59.Sh NAME 60.Nm sdpquery 61.Nd SDP query utility 62.Sh SYNOPSIS 63.Nm 64.Fl h 65.Nm 66.Op Fl d Ar device 67.Fl a Ar address 68.Ar command 69.Op Ar parameters ... 70.Nm 71.Op Fl c Ar path 72.Fl l 73.Ar command 74.Op Ar parameters ... 75.Sh DESCRIPTION 76The 77.Nm 78utility attempts to query the specified Service Discovery Protocol 79(SDP) server. 80Remote SDP servers are identified by their address. 81Connection to the local SDP server is made via the control socket. 82The 83.Nm 84utility uses Service Search Attribute Requests and prints results to 85standard output and error messages to standard error. 86.Pp 87The options are as follows: 88.Bl -tag -width ".Fl a Ar address" 89.It Fl a Ar address 90Connect to the remote device with the specified address. 91The address can be specified as BD_ADDR or a name. 92If a name was specified, the 93.Nm 94utility attempts to resolve the name via 95.Xr bt_gethostbyname 3 . 96If no remote address is given, 97.Nm 98attempts to contact a local SDP server via the control socket. 99.It Fl c Ar path 100Specify path to the control socket. 101The default path is 102.Pa /var/run/sdp . 103.It Fl d Ar device 104Connect from the local device with the specified address. 105The device can be specified by BD_ADDR or device name. 106See 107.Xr btconfig 8 108for a list of devices available. 109If no device is specified, the 110.Nm 111utility will use the best available. 112.It Fl l 113Query the local SDP server via the control socket. 114.It Fl h 115Display usage message and exit. 116.El 117.Pp 118The currently supported commands in 119.Nm 120are: 121.Pp 122.Bl -tag -width ".Cm search Ar service" -compact 123.It Cm Browse Op Ar group 124Browse for services. 125The 126.Ar group 127parameter is a 16-bit UUID of the group to browse. 128If omitted, the Public Browse Group. is used. 129.Pp 130.It Cm Search Ar service 131Search for the 132.Ar service . 133The 134.Ar service 135parameter is a 16-bit UUID of the service to search for. 136For the following services it is possible to use service name 137instead of service UUID: 138.Pp 139.Bl -tag -compact -width "OPUSH" 140.It CIP 141Common ISDN Access 142.It CTP 143Cordless Telephony 144.It DUN 145DialUp Networking 146.It FAX 147Fax 148.It FTRN 149OBEX File Transfer 150.It GN 151Group ad-hoc Network 152.It HID 153Human Interface Device 154.It HF 155Handsfree 156.It HSET 157Headset 158.It LAN 159LAN Access Using PPP 160.It NAP 161Network Access Point 162.It OPUSH 163OBEX Object Push 164.It PANU 165Personal Area Networking User 166.It SP 167Serial Port 168.El 169.El 170.Sh EXIT STATUS 171.Ex -std 172.Sh SEE ALSO 173.Xr bluetooth 3 , 174.Xr sdp 3 , 175.Xr btconfig 8 , 176.Xr sdpd 8 177.Sh HISTORY 178The 179.Nm 180command first appeared in 181.Fx 5.3 182as 183.Nm sdpcontrol . 184It was ported to 185.Nx 4.0 186under its present name by 187.An Iain Hibbert 188under the sponsorship of Itronix, Inc and imported into 189.Dx 1.11 . 190.Sh AUTHORS 191.An -nosplit 192.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com 193and 194.An Iain Hibbert 195for Itronix, Inc. 196.Sh CAVEATS 197The 198.Nm 199utility only requests the following attributes from the SDP server: 200.Pp 201.Bl -enum -offset indent -compact 202.It 203Service Record Handle 204.It 205Service Class ID List 206.It 207Protocol Descriptor List 208.It 209Bluetooth Profile Descriptor List 210.El 211