xref: /freebsd/usr.sbin/bluetooth/sdpd/sdpd.8 (revision b2c76c41be32f904179efed29c0ca04d53f3996c)
107be7a6cSMaksim Yevmenkin.\" Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com>
207be7a6cSMaksim Yevmenkin.\" All rights reserved.
307be7a6cSMaksim Yevmenkin.\"
407be7a6cSMaksim Yevmenkin.\" Redistribution and use in source and binary forms, with or without
507be7a6cSMaksim Yevmenkin.\" modification, are permitted provided that the following conditions
607be7a6cSMaksim Yevmenkin.\" are met:
707be7a6cSMaksim Yevmenkin.\" 1. Redistributions of source code must retain the above copyright
807be7a6cSMaksim Yevmenkin.\"    notice, this list of conditions and the following disclaimer.
907be7a6cSMaksim Yevmenkin.\" 2. Redistributions in binary form must reproduce the above copyright
1007be7a6cSMaksim Yevmenkin.\"    notice, this list of conditions and the following disclaimer in the
1107be7a6cSMaksim Yevmenkin.\"    documentation and/or other materials provided with the distribution.
1207be7a6cSMaksim Yevmenkin.\"
1307be7a6cSMaksim Yevmenkin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1407be7a6cSMaksim Yevmenkin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1507be7a6cSMaksim Yevmenkin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1607be7a6cSMaksim Yevmenkin.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1707be7a6cSMaksim Yevmenkin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1807be7a6cSMaksim Yevmenkin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1907be7a6cSMaksim Yevmenkin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2007be7a6cSMaksim Yevmenkin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2107be7a6cSMaksim Yevmenkin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2207be7a6cSMaksim Yevmenkin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2307be7a6cSMaksim Yevmenkin.\" SUCH DAMAGE.
2407be7a6cSMaksim Yevmenkin.\"
2507be7a6cSMaksim Yevmenkin.\" $Id: sdpd.8,v 1.1 2004/01/13 19:31:54 max Exp $
2607be7a6cSMaksim Yevmenkin.\"
2707be7a6cSMaksim Yevmenkin.Dd January 13, 2004
2807be7a6cSMaksim Yevmenkin.Dt SDPD 8
2907be7a6cSMaksim Yevmenkin.Os
3007be7a6cSMaksim Yevmenkin.Sh NAME
3107be7a6cSMaksim Yevmenkin.Nm sdpd
3207be7a6cSMaksim Yevmenkin.Nd Bluetooth Service Discovery Protocol daemon
3307be7a6cSMaksim Yevmenkin.Sh SYNOPSIS
3407be7a6cSMaksim Yevmenkin.Nm
3507be7a6cSMaksim Yevmenkin.Op Fl dh
3607be7a6cSMaksim Yevmenkin.Op Fl c Ar path
3707be7a6cSMaksim Yevmenkin.Op Fl g Ar group
3807be7a6cSMaksim Yevmenkin.Op Fl u Ar user
3907be7a6cSMaksim Yevmenkin.Sh DESCRIPTION
4007be7a6cSMaksim YevmenkinThe
4107be7a6cSMaksim Yevmenkin.Nm
4207be7a6cSMaksim Yevmenkindaemon keeps track of the Bluetooth services registered on the host
4307be7a6cSMaksim Yevmenkinand responds to Service Discovery inquiries from the remote Bluetooth devices.
4407be7a6cSMaksim Yevmenkin.Pp
456fb9b618SGiorgos KeramidasIn order to use any service remote Bluetooth device need to send Service
4607be7a6cSMaksim YevmenkinSearch and Service Attribute or Service Search Attribute request over
4707be7a6cSMaksim YevmenkinBluetooth L2CAP connection on SDP PSM (0x0001).
4807be7a6cSMaksim YevmenkinThe
4907be7a6cSMaksim Yevmenkin.Nm
5007be7a6cSMaksim Yevmenkindaemon will try to find matching Service Record in its Service Database
5107be7a6cSMaksim Yevmenkinand will send appropriate response back.
5207be7a6cSMaksim YevmenkinThe remote device then will process the response, extract all required
5307be7a6cSMaksim Yevmenkininformation and will make a separate connection in order to use the service.
5407be7a6cSMaksim Yevmenkin.Pp
5507be7a6cSMaksim YevmenkinBluetooth applications, running on the host, register services with
5607be7a6cSMaksim Yevmenkinthe local
5707be7a6cSMaksim Yevmenkin.Nm
5807be7a6cSMaksim Yevmenkindaemon.
5907be7a6cSMaksim YevmenkinOperation like service registration, service removal and service change are
6007be7a6cSMaksim Yevmenkinperformed over the control socket.
6107be7a6cSMaksim YevmenkinIt is possible to query entire content of the
6207be7a6cSMaksim Yevmenkin.Nm
6307be7a6cSMaksim YevmenkinService Database with
6407be7a6cSMaksim Yevmenkin.Xr sdpcontrol 8
6507be7a6cSMaksim Yevmenkinby issuing
6607be7a6cSMaksim Yevmenkin.Cm browse
6707be7a6cSMaksim Yevmenkincommand on the control socket.
6807be7a6cSMaksim Yevmenkin.Pp
6907be7a6cSMaksim YevmenkinThe command line options are as follows:
7007be7a6cSMaksim Yevmenkin.Bl -tag -width indent
7107be7a6cSMaksim Yevmenkin.It Fl d
7207be7a6cSMaksim YevmenkinDo not detach from the controlling terminal.
7307be7a6cSMaksim Yevmenkin.It Fl c Ar path
7407be7a6cSMaksim YevmenkinSpecify path to the control socket.
7507be7a6cSMaksim YevmenkinThe default path is
7607be7a6cSMaksim Yevmenkin.Pa /var/run/sdp .
7707be7a6cSMaksim Yevmenkin.It Fl g Ar group
7807be7a6cSMaksim YevmenkinSpecifies the group the
7907be7a6cSMaksim Yevmenkin.Nm
8007be7a6cSMaksim Yevmenkinshould run as after it initializes.
819cdb6ee1SRuslan ErmilovThe value specified may be either a group name or a numeric group ID.
8207be7a6cSMaksim YevmenkinThis only works if
8307be7a6cSMaksim Yevmenkin.Nm
8407be7a6cSMaksim Yevmenkinwas started as root.
8507be7a6cSMaksim YevmenkinThe default group name is
869cdb6ee1SRuslan Ermilov.Dq Li nobody .
8707be7a6cSMaksim Yevmenkin.It Fl h
8807be7a6cSMaksim YevmenkinDisplay usage message and exit.
8907be7a6cSMaksim Yevmenkin.It Fl u Ar user
9007be7a6cSMaksim YevmenkinSpecifies the user the
9107be7a6cSMaksim Yevmenkin.Nm
9207be7a6cSMaksim Yevmenkinshould run as after it initializes.
939cdb6ee1SRuslan ErmilovThe value specified may be either a user name or a numeric user ID.
9407be7a6cSMaksim YevmenkinThis only works if
9507be7a6cSMaksim Yevmenkin.Nm
9607be7a6cSMaksim Yevmenkinwas started as root.
9707be7a6cSMaksim YevmenkinThe default user name is
989cdb6ee1SRuslan Ermilov.Dq Li nobody .
9907be7a6cSMaksim Yevmenkin.El
100*60ee05dbSGordon Bergling.Sh FILES
101*60ee05dbSGordon Bergling.Bl -tag -width ".Pa /var/run/sdp" -compact
102*60ee05dbSGordon Bergling.It Pa /var/run/sdp
103*60ee05dbSGordon Bergling.El
104*60ee05dbSGordon Bergling.Sh SEE ALSO
105*60ee05dbSGordon Bergling.Xr sdp 3 ,
106*60ee05dbSGordon Bergling.Xr sdpcontrol 8
107*60ee05dbSGordon Bergling.Sh AUTHORS
108*60ee05dbSGordon Bergling.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com
109*60ee05dbSGordon Bergling.Sh CAVEATS
11007be7a6cSMaksim YevmenkinThe
11107be7a6cSMaksim Yevmenkin.Nm
11207be7a6cSMaksim Yevmenkindaemon
11307be7a6cSMaksim Yevmenkinwill listen for incoming L2CAP connections on a wildcard BD_ADDR.
11407be7a6cSMaksim Yevmenkin.Pp
11507be7a6cSMaksim YevmenkinIn case of multiple Bluetooth devices connected to the same host it is
11607be7a6cSMaksim Yevmenkinpossible to specify which services should be
11707be7a6cSMaksim Yevmenkin.Dq bound
1189cdb6ee1SRuslan Ermilovto which Bluetooth device.
1196fb9b618SGiorgos KeramidasSuch assignment should be done at service registration time.
12007be7a6cSMaksim Yevmenkin.Pp
121d1c004f7SMaksim YevmenkinRequests to register, remove or change service can only be made via the
122d1c004f7SMaksim Yevmenkincontrol socket.
123d1c004f7SMaksim YevmenkinThe
124d1c004f7SMaksim Yevmenkin.Nm
125d1c004f7SMaksim Yevmenkindaemon will check peer's credentials and will only accept the request if
126d1c004f7SMaksim Yevmenkinthe application has the same effective user ID as the
127d1c004f7SMaksim Yevmenkin.Dq Li root
128d1c004f7SMaksim Yevmenkinuser ID.
12907be7a6cSMaksim Yevmenkin.Pp
13007be7a6cSMaksim YevmenkinThe
13107be7a6cSMaksim Yevmenkin.Nm
1329cdb6ee1SRuslan Ermilovdaemon does not check for duplicated Service Records.
1339cdb6ee1SRuslan ErmilovIt only performs minimal checking on the service data sent in the Service
13407be7a6cSMaksim YevmenkinRegister request.
13507be7a6cSMaksim YevmenkinIt is assumed that application must obtain all required resources such
1369cdb6ee1SRuslan Ermilovas RFCOMM channels etc., before registering the service.
13759a3c79dSRuslan Ermilov.Sh BUGS
13859a3c79dSRuslan ErmilovMost likely.
13959a3c79dSRuslan ErmilovPlease report if found.
140