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 101*60ee05dbSGordon Bergling.Sh FILES 102*60ee05dbSGordon Bergling.Bl -tag -width ".Pa /var/run/sdp" -compact 103*60ee05dbSGordon Bergling.It Pa /var/run/sdp 104*60ee05dbSGordon Bergling.El 105*60ee05dbSGordon Bergling.Sh SEE ALSO 106*60ee05dbSGordon Bergling.Xr sdp 3 , 107*60ee05dbSGordon Bergling.Xr sdpcontrol 8 108*60ee05dbSGordon Bergling.Sh AUTHORS 109*60ee05dbSGordon Bergling.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com 110*60ee05dbSGordon Bergling.Sh CAVEATS 11107be7a6cSMaksim YevmenkinThe 11207be7a6cSMaksim Yevmenkin.Nm 11307be7a6cSMaksim Yevmenkindaemon 11407be7a6cSMaksim Yevmenkinwill listen for incoming L2CAP connections on a wildcard BD_ADDR. 11507be7a6cSMaksim Yevmenkin.Pp 11607be7a6cSMaksim YevmenkinIn case of multiple Bluetooth devices connected to the same host it is 11707be7a6cSMaksim Yevmenkinpossible to specify which services should be 11807be7a6cSMaksim Yevmenkin.Dq bound 1199cdb6ee1SRuslan Ermilovto which Bluetooth device. 1206fb9b618SGiorgos KeramidasSuch assignment should be done at service registration time. 12107be7a6cSMaksim Yevmenkin.Pp 122d1c004f7SMaksim YevmenkinRequests to register, remove or change service can only be made via the 123d1c004f7SMaksim Yevmenkincontrol socket. 124d1c004f7SMaksim YevmenkinThe 125d1c004f7SMaksim Yevmenkin.Nm 126d1c004f7SMaksim Yevmenkindaemon will check peer's credentials and will only accept the request if 127d1c004f7SMaksim Yevmenkinthe application has the same effective user ID as the 128d1c004f7SMaksim Yevmenkin.Dq Li root 129d1c004f7SMaksim Yevmenkinuser ID. 13007be7a6cSMaksim Yevmenkin.Pp 13107be7a6cSMaksim YevmenkinThe 13207be7a6cSMaksim Yevmenkin.Nm 1339cdb6ee1SRuslan Ermilovdaemon does not check for duplicated Service Records. 1349cdb6ee1SRuslan ErmilovIt only performs minimal checking on the service data sent in the Service 13507be7a6cSMaksim YevmenkinRegister request. 13607be7a6cSMaksim YevmenkinIt is assumed that application must obtain all required resources such 1379cdb6ee1SRuslan Ermilovas RFCOMM channels etc., before registering the service. 13859a3c79dSRuslan Ermilov.Sh BUGS 13959a3c79dSRuslan ErmilovMost likely. 14059a3c79dSRuslan ErmilovPlease report if found. 141