xref: /netbsd-src/usr.bin/sdpquery/sdpquery.1 (revision ce2c90c7c172d95d2402a5b3d96d8f8e6d138a21)
1.\"	$NetBSD: sdpquery.1,v 1.5 2006/08/23 20:39:48 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.\" $Id: sdpquery.1,v 1.5 2006/08/23 20:39:48 wiz Exp $
55.\" $FreeBSD: src/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8,v 1.6 2005/07/09 19:04:43 markus Exp $
56.\"
57.Dd August 17, 2006
58.Dt SDPQUERY 1
59.Os
60.Sh NAME
61.Nm sdpquery
62.Nd SDP query utility
63.Sh SYNOPSIS
64.Nm
65.Fl h
66.Nm
67.Op Fl d Ar device
68.Fl a Ar address
69.Ar command
70.Op Ar parameters ...
71.Nm
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 uses Service Search Attribute Requests and prints results to
86standard output and error messages to standard error.
87.Pp
88The options are as follows:
89.Bl -tag -width indent
90.It Fl a Ar address
91Connect to the remote device with the specified address.
92The address can be specified as BD_ADDR or a name.
93If a name was specified, the
94.Nm
95utility attempts to resolve the name via
96.Xr bt_gethostbyname 3 .
97If no remote address is given,
98.Nm
99attempts to contact a local SDP server via the control socket.
100.It Fl c Ar path
101Specify path to the control socket.
102The default path is
103.Pa /var/run/sdp .
104.It Fl d Ar device
105Connect from the local device with the specifed address.
106The device can be specified by BD_ADDR or device name.
107See
108.Xr btconfig 8
109for a list of devices available.
110If no device is specified, the
111.Nm
112utility will use the best available.
113.It Fl l
114Query the local SDP server via the control socket.
115.It Fl h
116Display usage message and exit.
117.It Ar command
118One of the supported commands (see below).
119.It Ar parameters
120One or more optional space separated command parameters.
121.El
122.Sh COMMANDS
123The currently supported commands in
124.Nm
125are:
126.Pp
127.Bl -tag -width indent -compact
128.It Cm Browse Op Ar group
129Browse for services.
130The
131.Ar group
132parameter is a 16-bit UUID of the group to browse.
133If omitted, the Public Browse Group. is used.
134.Pp
135.It Cm Search Ar service
136Search for the
137.Ar service .
138The
139.Ar service
140parameter is a 16-bit UUID of the service to search for.
141For the following services it is possible to use service name
142instead of service UUID:
143.Pp
144.Bl -tag -width OPUSHXX -compact
145.It Dv CIP
146Common ISDN Access
147.It Dv CTP
148Cordless Telephony
149.It Dv DUN
150DialUp Networking
151.It Dv FAX
152Fax
153.It Dv FTRN
154OBEX File Transfer
155.It Dv GN
156GN
157.It Dv HID
158Human Interface Device
159.It Dv HF
160Handsfree
161.It Dv HSET
162Headset
163.It Dv LAN
164LAN Access Using PPP
165.It Dv NAP
166Network Access Point
167.It Dv OPUSH
168OBEX Object Push
169.It Dv SP
170Serial Port
171.El
172.El
173.Sh EXIT STATUS
174.Ex -std
175.Sh SEE ALSO
176.Xr bluetooth 3 ,
177.Xr sdp 3 ,
178.Xr btconfig 8 ,
179.Xr sdpd 8
180.Sh HISTORY
181The
182.Nm
183command first appeared in
184.Fx 5.3
185as
186.Nm sdpcontrol .
187It was ported to
188.Nx 4.0
189under its present name by
190.An Iain Hibbert
191under the sponsorship of Itronix, Inc.
192.Sh AUTHORS
193.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
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