1.\" Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $Id: rfcomm_pppd.8,v 1.5 2003/04/27 19:45:37 max Exp $ 26.\" $FreeBSD$ 27.\" 28.Dd February 4, 2003 29.Dt RFCOMM_PPPD 8 30.Os 31.Sh NAME 32.Nm rfcomm_pppd 33.Nd RFCOMM PPP daemon 34.Sh SYNOPSIS 35.Nm 36.Fl c 37.Op Fl dh 38.Fl a Ar BD_ADDR 39.Fl C Ar channel 40.Fl l Ar label 41.Nm 42.Fl s 43.Op Fl dh 44.Op Fl a Ar BD_ADDR 45.Fl C Ar channel 46.Fl l Ar label 47.Sh DESCRIPTION 48The 49.Nm 50daemon is a simple wrapper daemon that allows to use standard 51.Xr ppp 8 52on RFCOMM connection. 53It can operate in two modes: client and server. 54.Pp 55In the client mode, 56.Nm 57opens an RFCOMM connection to the specified server's 58.Ar BD_ADRR 59and 60.Ar channel . 61Once RFCOMM connection is established, 62.Nm 63executes 64.Xr ppp 8 65in 66.Fl direct 67mode with the specified 68.Ar label . 69The 70.Xr ppp 8 71in its turn operates over the RFCOMM connection just like it would operate 72over the standard serial port thus allowing user to 73.Dq "dial out" 74and connect to the Internet. 75.Pp 76In the server mode, 77.Nm 78opens an RFCOMM socket and listens for incomming connections from remote clients. 79Once the new incomming connection is accepted, 80.Nm 81forks and executes 82.Xr ppp 8 83in 84.Fl direct 85mode with the specified 86.Ar label . 87The 88.Xr ppp 8 89in its turn operates over the RFCOMM connection just like it would operate over 90the standard serial port thus providing network connectivity to remote clients. 91.Pp 92The options are as follows: 93.Bl -tag -width indent 94.It Fl a Ar BD_ADDR 95In the client mode, this required option specifies the remote BD_ADDR of the 96RFCOMM server. 97In the server mode, this option can be used to specify the local 98BD_ADDR to listen on. 99By default, server will listen on 100.Dv ANY 101address. 102.It Fl C Ar channel 103In both client and server modes, this required option specifies RFCOMM channel 104to connect to or listen on. 105.It Fl c 106Act as an RFCOMM client. 107This is the default mode. 108.It Fl d 109Do not detach from the controlling terminal, i.e., run in foreground. 110.It Fl h 111Display usage message and exit. 112.It Fl l Ar label 113In both client and server modes, this required option specifies which 114.Xr ppp 8 115label will be used. 116.It Fl s 117Act as an RFCOMM server. 118.El 119.Sh PPP CONFIGURATION 120.Ss Important Notes on PPP Configuration 121Special attention is required when adding new RFCOMM configurations to the 122existing PPP configuration. 123Please keep in mind that PPP will 124.Em always 125execute commands in the 126.Dq Li default 127label of your 128.Pa /etc/ppp/ppp.conf 129file. 130Please make sure that the 131.Dq Li default 132label 133.Em only 134contains commands that apply to 135.Em every 136other label. 137If you need to use PPP for both dialing out and accepting incoming 138RFCOMM connections, please make sure you have moved all commands related to 139dialing out from the 140.Dq Li default 141section into an appropriate outgoing label. 142.Ss RFCOMM Server 143One of the typical examples is the LAN access. 144In this example, RFCOMM connection 145is used as a null-modem connection between client and server. 146Both client 147and server will start talking PPP right after RFCOMM connection was established. 148.Bd -literal -offset indent 149rfcomm-server: 150 set timeout 0 151 set lqrperiod 10 152 set ifaddr 10.0.0.1 10.0.0.2 255.255.255.0 153 enable lqr 154 accept lqr 155 # Do not use PPP authentication. Assume that 156 # Bluetooth connection was authenticated already 157 disable pap 158 deny pap 159 disable chap 160 deny chap 161.Ed 162.Ss RFCOMM Client 163The 164.Nm 165utility 166supports both LAN and DUN (Dial-Up Networking) access. 167The client's configuration for the LAN access is very similar to server's and 168might look like this. 169.Bd -literal -offset indent 170rfcomm-client: 171 enable lqr 172 accept lqr 173 set dial 174 set timeout 0 175 disable iface-alias 176 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 177 # Do not use PPP authentication. Assume that 178 # Bluetooth connection was authenticated already 179 deny pap 180 disable pap 181 deny chap 182 disable chap 183.Ed 184.Pp 185The client's configuration for the DUN access is different. 186In this scenario, the client gets connected to the virtual serial port on the 187server. 188To open a PPP session, client must dial a number. 189Note that by default 190.Xr ppp 8 191will not execute any configured chat scripts. 192The 193.Ic force-scripts 194option can be used to override this behavior. 195The example of such configuration is shown below. 196.Bd -literal -offset indent 197rfcomm-dialup: 198 # This is IMPORTANT option 199 enable force-scripts 200 201 # You might want to change these 202 set authname 203 set authkey 204 set phone "*99***1#" 205 206 # You might want to adjust dial string as well 207 set dial "ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\ 208 \\"\\" AT OK-AT-OK ATE1Q0 OK \\\\dATD\\\\T TIMEOUT 40 CONNECT" 209 set login 210 set timeout 30 211 enable dns 212 resolv rewrite 213 214 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 215 add default HISADDR 216.Ed 217.Pp 218Note that by adjusting the initialization string, one can make CSD (Circuit 219Switched Data), HSCSD (High Speed Circuit Switched Data) or GPRS (General 220Packet Radio Service) connection. 221The availability of the particular connection 222type depends on the phone model and service plan activated on the phone. 223.Sh EXAMPLES 224.Dl "rfcomm_pppd -s -a 00:01:02:03:04:05 -C 1 -l rfcomm-server" 225.Pp 226This command will start 227.Nm 228in the server mode. 229The RFCOMM server will listen on local address 230.Li 00:01:02:03:04:05 231and channel 232.Li 1 . 233Once the incomming connection has been accepted, 234.Nm 235will execute 236.Xr ppp 8 237in 238.Fl direct 239mode with 240.Dq Li rfcomm-server 241label. 242.Pp 243.Dl "rfcomm_pppd -c -a 00:01:02:03:04:05 -C 1 -l rfcomm-client" 244.Pp 245This command will start 246.Nm 247in the client mode. 248.Nm 249will try to connect to the RFCOMM server at 250.Li 00:01:02:03:04:05 251address and channel 252.Li 1 . 253Once connected, the 254.Nm 255will execute 256.Xr ppp 8 257in 258.Fl direct 259mode with 260.Dq Li rfcomm-client 261label. 262.Sh DIAGNOSTICS 263.Ex -std 264.Sh BUGS 265The 266.Nm 267utility 268is not currently integrated with the SDP (Service Discovery Protocol). 269.Sh SEE ALSO 270.Xr rfcomm_sppd 1 , 271.Xr ng_btsocket 4 , 272.Xr ppp 8 273.Sh AUTHORS 274.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 275