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.\" $FreeBSD$ 2707be7a6cSMaksim Yevmenkin.\" 2807be7a6cSMaksim Yevmenkin.Dd January 13, 2004 2907be7a6cSMaksim Yevmenkin.Dt SDPD 8 3007be7a6cSMaksim Yevmenkin.Os 3107be7a6cSMaksim Yevmenkin.Sh NAME 3207be7a6cSMaksim Yevmenkin.Nm sdpd 3307be7a6cSMaksim Yevmenkin.Nd Bluetooth Service Discovery Protocol daemon 3407be7a6cSMaksim Yevmenkin.Sh SYNOPSIS 3507be7a6cSMaksim Yevmenkin.Nm 3607be7a6cSMaksim Yevmenkin.Op Fl dh 3707be7a6cSMaksim Yevmenkin.Op Fl c Ar path 3807be7a6cSMaksim Yevmenkin.Op Fl g Ar group 3907be7a6cSMaksim Yevmenkin.Op Fl u Ar user 4007be7a6cSMaksim Yevmenkin.Sh DESCRIPTION 4107be7a6cSMaksim YevmenkinThe 4207be7a6cSMaksim Yevmenkin.Nm 4307be7a6cSMaksim Yevmenkindaemon keeps track of the Bluetooth services registered on the host 4407be7a6cSMaksim Yevmenkinand responds to Service Discovery inquiries from the remote Bluetooth devices. 4507be7a6cSMaksim Yevmenkin.Pp 466fb9b618SGiorgos KeramidasIn order to use any service remote Bluetooth device need to send Service 4707be7a6cSMaksim YevmenkinSearch and Service Attribute or Service Search Attribute request over 4807be7a6cSMaksim YevmenkinBluetooth L2CAP connection on SDP PSM (0x0001). 4907be7a6cSMaksim YevmenkinThe 5007be7a6cSMaksim Yevmenkin.Nm 5107be7a6cSMaksim Yevmenkindaemon will try to find matching Service Record in its Service Database 5207be7a6cSMaksim Yevmenkinand will send appropriate response back. 5307be7a6cSMaksim YevmenkinThe remote device then will process the response, extract all required 5407be7a6cSMaksim Yevmenkininformation and will make a separate connection in order to use the service. 5507be7a6cSMaksim Yevmenkin.Pp 5607be7a6cSMaksim YevmenkinBluetooth applications, running on the host, register services with 5707be7a6cSMaksim Yevmenkinthe local 5807be7a6cSMaksim Yevmenkin.Nm 5907be7a6cSMaksim Yevmenkindaemon. 6007be7a6cSMaksim YevmenkinOperation like service registration, service removal and service change are 6107be7a6cSMaksim Yevmenkinperformed over the control socket. 6207be7a6cSMaksim YevmenkinIt is possible to query entire content of the 6307be7a6cSMaksim Yevmenkin.Nm 6407be7a6cSMaksim YevmenkinService Database with 6507be7a6cSMaksim Yevmenkin.Xr sdpcontrol 8 6607be7a6cSMaksim Yevmenkinby issuing 6707be7a6cSMaksim Yevmenkin.Cm browse 6807be7a6cSMaksim Yevmenkincommand on the control socket. 6907be7a6cSMaksim Yevmenkin.Pp 7007be7a6cSMaksim YevmenkinThe command line options are as follows: 7107be7a6cSMaksim Yevmenkin.Bl -tag -width indent 7207be7a6cSMaksim Yevmenkin.It Fl d 7307be7a6cSMaksim YevmenkinDo not detach from the controlling terminal. 7407be7a6cSMaksim Yevmenkin.It Fl c Ar path 7507be7a6cSMaksim YevmenkinSpecify path to the control socket. 7607be7a6cSMaksim YevmenkinThe default path is 7707be7a6cSMaksim Yevmenkin.Pa /var/run/sdp . 7807be7a6cSMaksim Yevmenkin.It Fl g Ar group 7907be7a6cSMaksim YevmenkinSpecifies the group the 8007be7a6cSMaksim Yevmenkin.Nm 8107be7a6cSMaksim Yevmenkinshould run as after it initializes. 829cdb6ee1SRuslan ErmilovThe value specified may be either a group name or a numeric group ID. 8307be7a6cSMaksim YevmenkinThis only works if 8407be7a6cSMaksim Yevmenkin.Nm 8507be7a6cSMaksim Yevmenkinwas started as root. 8607be7a6cSMaksim YevmenkinThe default group name is 879cdb6ee1SRuslan Ermilov.Dq Li nobody . 8807be7a6cSMaksim Yevmenkin.It Fl h 8907be7a6cSMaksim YevmenkinDisplay usage message and exit. 9007be7a6cSMaksim Yevmenkin.It Fl u Ar user 9107be7a6cSMaksim YevmenkinSpecifies the user the 9207be7a6cSMaksim Yevmenkin.Nm 9307be7a6cSMaksim Yevmenkinshould run as after it initializes. 949cdb6ee1SRuslan ErmilovThe value specified may be either a user name or a numeric user ID. 9507be7a6cSMaksim YevmenkinThis only works if 9607be7a6cSMaksim Yevmenkin.Nm 9707be7a6cSMaksim Yevmenkinwas started as root. 9807be7a6cSMaksim YevmenkinThe default user name is 999cdb6ee1SRuslan Ermilov.Dq Li nobody . 10007be7a6cSMaksim Yevmenkin.El 10107be7a6cSMaksim Yevmenkin.Sh CAVEAT 10207be7a6cSMaksim YevmenkinThe 10307be7a6cSMaksim Yevmenkin.Nm 10407be7a6cSMaksim Yevmenkindaemon 10507be7a6cSMaksim Yevmenkinwill listen for incoming L2CAP connections on a wildcard BD_ADDR. 10607be7a6cSMaksim Yevmenkin.Pp 10707be7a6cSMaksim YevmenkinIn case of multiple Bluetooth devices connected to the same host it is 10807be7a6cSMaksim Yevmenkinpossible to specify which services should be 10907be7a6cSMaksim Yevmenkin.Dq bound 1109cdb6ee1SRuslan Ermilovto which Bluetooth device. 1116fb9b618SGiorgos KeramidasSuch assignment should be done at service registration time. 11207be7a6cSMaksim Yevmenkin.Pp 11307be7a6cSMaksim YevmenkinAccess rights on the control socket define which application can register, 11407be7a6cSMaksim Yevmenkinremove or change the service. 11507be7a6cSMaksim YevmenkinThe application must be able to write to and read from the control socket 11607be7a6cSMaksim Yevmenkinin order to perform any query to the Service Database via control socket. 11707be7a6cSMaksim Yevmenkin.Pp 11807be7a6cSMaksim YevmenkinThe 11907be7a6cSMaksim Yevmenkin.Nm 1209cdb6ee1SRuslan Ermilovdaemon does not check for duplicated Service Records. 1219cdb6ee1SRuslan ErmilovIt only performs minimal checking on the service data sent in the Service 12207be7a6cSMaksim YevmenkinRegister request. 12307be7a6cSMaksim YevmenkinIt is assumed that application must obtain all required resources such 1249cdb6ee1SRuslan Ermilovas RFCOMM channels etc., before registering the service. 12507be7a6cSMaksim Yevmenkin.Sh FILES 12607be7a6cSMaksim Yevmenkin.Bl -tag -width ".Pa /var/run/sdp" -compact 12707be7a6cSMaksim Yevmenkin.It Pa /var/run/sdp 12807be7a6cSMaksim Yevmenkin.El 12907be7a6cSMaksim Yevmenkin.Sh SEE ALSO 13007be7a6cSMaksim Yevmenkin.Xr sdp 3 , 13107be7a6cSMaksim Yevmenkin.Xr sdpcontrol 8 13207be7a6cSMaksim Yevmenkin.Sh AUTHORS 13307be7a6cSMaksim Yevmenkin.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 13459a3c79dSRuslan Ermilov.Sh BUGS 13559a3c79dSRuslan ErmilovMost likely. 13659a3c79dSRuslan ErmilovPlease report if found. 137