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