xref: /netbsd-src/usr.bin/sdpquery/sdpquery.1 (revision fad4c9f71477ae11cea2ee75ec82151ac770a534)
1.\"	$NetBSD: sdpquery.1,v 1.1 2006/06/19 15:44:56 gdamore 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.1 2006/06/19 15:44:56 gdamore Exp $
55.\" $FreeBSD: src/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8,v 1.6 2005/07/09 19:04:43 markus Exp $
56.\"
57.Dd May 9, 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 (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 indent
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 specifed address. The device can
105be specified by BD_ADDR or device name. See
106.Xr btconfig 8
107for a list of devices available. If no device is specified, the
108.Nm
109utility will use the best available.
110.It Fl l
111Query the local SDP server via the control socket.
112.It Fl h
113Display usage message and exit.
114.It Ar command
115One of the supported commands (see below).
116.It Ar parameters
117One or more optional space separated command parameters.
118.El
119.Sh COMMANDS
120The currently supported commands in
121.Nm
122are:
123.Pp
124.Bl -tag -width indent -compact
125.It Cm Browse Op Ar group
126Browse for services. The
127.Ar group
128parameter is a 16-bit UUID of the group to browse. If omitted,
129the Public Browse Group. is used.
130.Pp
131.It Cm Search Ar service
132Search for the
133.Ar service .
134The
135.Ar service
136parameter is a 16-bit UUID of the service to search for. For the following
137services it is possible to use service name instead of service UUID:
138.Pp
139.Bl -tag -width OPUSHXX -compact
140.It Dv CIP
141Common ISDN Access
142.It Dv CTP
143Cordless Telephony
144.It Dv DUN
145DialUp Networking
146.It Dv FAX
147Fax
148.It Dv FTRN
149OBEX File Transfer
150.It Dv GN
151GN
152.It Dv HID
153Human Interface Device
154.It Dv HSET
155Headset
156.It Dv LAN
157LAN Access Using PPP
158.It Dv NAP
159Network Access Point
160.It Dv OPUSH
161OBEX Object Push
162.It Dv SP
163Serial Port
164.El
165.Pp
166.It Cm Config Ar type
167Query the device and print a configuration entry in a format suitable for inclusion
168in the
169.Xr bluetooth.conf 5
170file for a device of the given
171.Ar type .
172The following types are recognised:
173.Pp
174.Bl -tag -width OPUSHXX -compact
175.It Dv HID
176Human Interface Device. See
177.Xr bthidev 4 .
178.It Dv HSET
179Headset. See
180.Xr bthset 4 .
181.El
182.Pp
183.El
184.Sh CAVEATS
185The
186.Nm
187utility only requests the following attributes from the SDP server:
188.Pp
189.Bl -enum -offset indent -compact
190.It
191Service Record Handle
192.It
193Service Class ID List
194.It
195Protocol Descriptor List
196.It
197Bluetooth Profile Descriptor List
198.El
199.Sh EXIT STATUS
200.Ex -std
201.Sh SEE ALSO
202.Xr bluetooth 3 ,
203.Xr bluetooth.conf 5 ,
204.Xr btconfig 8 ,
205.Xr sdp 3 ,
206.Xr sdpd 8
207.Sh AUTHORS
208.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
209.An Iain Hibbert for Itronix, Inc.
210.Sh HISTORY
211The
212.Nm
213command first appeared in
214.Fx 5.3
215as
216.Nm sdpcontrol .
217It was ported to
218.Nx 4.0
219under its present name and extended by
220.An Iain Hibbert
221under the sponsorship of Itronix, Inc.
222