xref: /freebsd/usr.sbin/bluetooth/sdpd/sdpd.8 (revision 4db78cacdee1b6f3b7880eb8c5560e8edaf91698)
1.\" Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $Id: sdpd.8,v 1.1 2004/01/13 19:31:54 max Exp $
26.\" $FreeBSD$
27.\"
28.Dd January 13, 2004
29.Dt SDPD 8
30.Os
31.Sh NAME
32.Nm sdpd
33.Nd Bluetooth Service Discovery Protocol daemon
34.Sh SYNOPSIS
35.Nm
36.Op Fl dh
37.Op Fl c Ar path
38.Op Fl g Ar group
39.Op Fl u Ar user
40.Sh DESCRIPTION
41The
42.Nm
43daemon keeps track of the Bluetooth services registered on the host
44and responds to Service Discovery inquiries from the remote Bluetooth devices.
45.Pp
46In order to use any service remote Bluetooth device need to send Service
47Search and Service Attribute or Service Search Attribute request over
48Bluetooth L2CAP connection on SDP PSM (0x0001).
49The
50.Nm
51daemon will try to find matching Service Record in its Service Database
52and will send appropriate response back.
53The remote device then will process the response, extract all required
54information and will make a separate connection in order to use the service.
55.Pp
56Bluetooth applications, running on the host, register services with
57the local
58.Nm
59daemon.
60Operation like service registration, service removal and service change are
61performed over the control socket.
62It is possible to query entire content of the
63.Nm
64Service Database with
65.Xr sdpcontrol 8
66by issuing
67.Cm browse
68command on the control socket.
69.Pp
70The command line options are as follows:
71.Bl -tag -width indent
72.It Fl d
73Do not detach from the controlling terminal.
74.It Fl c Ar path
75Specify path to the control socket.
76The default path is
77.Pa /var/run/sdp .
78.It Fl g Ar group
79Specifies the group the
80.Nm
81should run as after it initializes.
82The value specified may be either a group name or a numeric group ID.
83This only works if
84.Nm
85was started as root.
86The default group name is
87.Dq Li nobody .
88.It Fl h
89Display usage message and exit.
90.It Fl u Ar user
91Specifies the user the
92.Nm
93should run as after it initializes.
94The value specified may be either a user name or a numeric user ID.
95This only works if
96.Nm
97was started as root.
98The default user name is
99.Dq Li nobody .
100.El
101.Sh CAVEAT
102The
103.Nm
104daemon
105will listen for incoming L2CAP connections on a wildcard BD_ADDR.
106.Pp
107In case of multiple Bluetooth devices connected to the same host it is
108possible to specify which services should be
109.Dq bound
110to which Bluetooth device.
111Such assignment should be done at service registration time.
112.Pp
113Requests to register, remove or change service can only be made via the
114control socket.
115The
116.Nm
117daemon will check peer's credentials and will only accept the request if
118the application has the same effective user ID as the
119.Dq Li root
120user ID.
121.Pp
122The
123.Nm
124daemon does not check for duplicated Service Records.
125It only performs minimal checking on the service data sent in the Service
126Register request.
127It is assumed that application must obtain all required resources such
128as RFCOMM channels etc., before registering the service.
129.Sh FILES
130.Bl -tag -width ".Pa /var/run/sdp" -compact
131.It Pa /var/run/sdp
132.El
133.Sh SEE ALSO
134.Xr sdp 3 ,
135.Xr sdpcontrol 8
136.Sh AUTHORS
137.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com
138.Sh BUGS
139Most likely.
140Please report if found.
141