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