1.\" $NetBSD: rfcomm_sppd.1,v 1.5 2007/04/21 06:15:23 plunky Exp $ 2.\" $DragonFly: src/usr.bin/rfcomm_sppd/rfcomm_sppd.1,v 1.1 2008/02/08 14:06:25 hasso Exp $ 3.\" 4.\" Copyright (c) 2006 Itronix Inc. 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. The name of Itronix Inc. may not be used to endorse 16.\" or promote products derived from this software without specific 17.\" prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY 23.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26.\" ON ANY THEORY OF LIABILITY, WHETHER IN 27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\" 31.\" 32.\" Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 33.\" All rights reserved. 34.\" 35.\" Redistribution and use in source and binary forms, with or without 36.\" modification, are permitted provided that the following conditions 37.\" are met: 38.\" 1. Redistributions of source code must retain the above copyright 39.\" notice, this list of conditions and the following disclaimer. 40.\" 2. Redistributions in binary form must reproduce the above copyright 41.\" notice, this list of conditions and the following disclaimer in the 42.\" documentation and/or other materials provided with the distribution. 43.\" 44.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 45.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 46.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 47.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 48.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 49.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 50.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 51.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 52.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 53.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 54.\" SUCH DAMAGE. 55.\" 56.Dd April 10, 2007 57.Dt RFCOMM_SPPD 1 58.Os 59.Sh NAME 60.Nm rfcomm_sppd 61.Nd RFCOMM Serial Port Profile daemon 62.Sh SYNOPSIS 63.Nm 64.Op Fl d Ar device 65.Op Fl m Ar mode 66.Op Fl s Ar service 67.Op Fl t Ar tty 68.Brq Fl a Ar address | Fl c Ar channel 69.Sh DESCRIPTION 70The 71.Nm 72utility is a Serial Port Profile daemon, providing serial access over 73an RFCOMM connection to a remote device. 74.Nm 75can work in client or server mode. 76.Pp 77In client mode, 78.Nm 79initiates an RFCOMM connection to the 80.Ar service 81at the remote 82.Ar address . 83.Pp 84In server mode, 85.Nm 86registers the 87.Ar service 88with the local SDP server and listens on the specified RFCOMM 89.Ar channel 90for an incoming connection. 91.Pp 92The options are as follows: 93.Bl -tag -width ".Fl c Ar channel" 94.It Fl a Ar address 95Client mode. 96Specify the address of the remote RFCOMM device. 97The address can be specified as BD_ADDR or name. 98If given as a name, then the 99.Nm 100utility will attempt to resolve the name via 101.Xr bt_gethostbyname 3 . 102.It Fl c Ar channel 103Server mode. 104Specify the RFCOMM channel number to listen on. 105.Nm 106will register the service with the local 107.Xr sdpd 8 108daemon. 109Note that registering services with 110.Xr sdpd 8 111is a privileged operation. 112.It Fl d Ar device 113Use the local device with the specifed address. 114The device can be specified by BD_ADDR or device name. 115See 116.Xr btconfig 8 117for a list of available devices. 118If no 119.Ar device 120is specified, the connection will be set up on a system determined device. 121.It Fl m Ar mode 122Set connection link mode. 123Supported modes are: 124.Pp 125.Bl -tag -compact -offset indent 126.It auth 127require devices be paired. 128.It encrypt 129auth, plus enable encryption. 130.It secure 131encryption, plus change of link key. 132.El 133.It Fl s Ar service 134This is the service class that will be searched for on the remote device. 135If no 136.Ar service 137is given, the default 138.Qq Serial Port 139service class will be used. 140Known service classes are: 141.Pp 142.Bl -tag -compact -offset indent 143.It DUN 144Dialup Networking 145.It LAN 146LAN access using PPP 147.It SP 148Serial Port 149.El 150.Pp 151In client mode, the service class may be given as a channel number, for instances 152where the remote device does not provide Service Discovery. 153.It Fl t Ar tty 154Slave pseudo tty name. 155If this option is given, 156.Nm 157will detach from the controlling process after the bluetooth connection is 158made, and operate over the named 159.Xr pty 4 160pair. 161Otherwise, stdin/stdout will be used. 162.El 163.Sh EXIT STATUS 164.Ex -std 165.Sh FILES 166.Bl -tag -width ".Pa /dev/tty[p-sP-S][0-9a-v]" -compact 167.It Pa /dev/pty[p-sP-S][0-9a-v] 168master pseudo terminals 169.It Pa /dev/tty[p-sP-S][0-9a-v] 170slave pseudo terminals 171.El 172.Sh EXAMPLES 173.Dl rfcomm_sppd -a 00:01:02:03:04:05 -s 1 -t /dev/ttyp1 174.Pp 175Will open an RFCOMM connection to the server at 176.Li 00:01:02:03:04:05 177on channel 178.Li 1 . 179Once the connection has been established, 180.Nm 181will detach and 182.Pa /dev/ttyp1 183can be used to communicate with the remote serial port on the 184server, e.g. with the use of 185.Pp 186.Dl cu -l /dev/ttyp1 187.Pp 188In order to use 189.Nm 190to automatically create a secured link for 191.Xr pppd 8 , 192use 193.Dl pty Qo rfcomm_sppd -a 00:01:02:03:04:05 -s DUN -m secure Qc 194.Pp 195in your 196.Xr pppd 8 197configuration file. 198.Sh SEE ALSO 199.Xr bluetooth 3 , 200.Xr bluetooth 4 , 201.Xr pty 4 , 202.Xr btconfig 8 , 203.Xr pppd 8 , 204.Xr sdpd 8 205.Sh HISTORY 206The 207.Nm 208program first appeared in 209.Fx 210and was ported to 211.Nx 4.0 212by 213.An Iain Hibbert 214under the sponsorship of 215.An Itronix, Inc . 216.Sh AUTHORS 217.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com , 218.An Iain Hibbert 219.Sh BUGS 220Please report if found. 221