View | Details | Raw Unified | Return to bug 78174 | Differences between
and this patch

Collapse All | Expand All

(-)usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8 (-70 / +91 lines)
Lines 48-65 Link Here
48
.Sh DESCRIPTION
48
.Sh DESCRIPTION
49
The
49
The
50
.Nm
50
.Nm
51
daemon is a simple wrapper daemon that allows to use standard
51
daemon is a simple wrapper daemon that allows use of
52
.Xr ppp 8
52
.Xr ppp 8
53
on RFCOMM connection.
53
via a RFCOMM connection.
54
It can operate in two modes: client and server.
54
It can operate in two modes: client and server.
55
.Pp
55
.Pp
56
In the client mode,
56
In client mode,
57
.Nm
57
.Nm
58
opens an RFCOMM connection to the specified server's
58
opens a RFCOMM connection to the specified servers
59
.Ar BD_ADRR
59
.Ar BD_ADRR
60
and
60
and
61
.Ar channel .
61
.Ar channel .
62
Once RFCOMM connection is established,
62
Once the connection is established,
63
.Nm
63
.Nm
64
executes
64
executes
65
.Xr ppp 8
65
.Xr ppp 8
Lines 67-83 Link Here
67
.Fl direct
67
.Fl direct
68
mode with the specified
68
mode with the specified
69
.Ar label .
69
.Ar label .
70
The
70
Likewise,
71
.Xr ppp 8
71
.Xr ppp 8
72
in its turn operates over the RFCOMM connection just like it would operate
72
operates over the RFCOMM connection just like it would over a standard
73
over the standard serial port thus allowing user to
73
serial port, thus allowing a user to
74
.Dq "dial out"
74
.Dq "dial out"
75
and connect to the Internet.
75
and connect to the Internet.
76
.Pp
76
.Pp
77
In the server mode,
77
In server mode,
78
.Nm
78
.Nm
79
opens an RFCOMM socket and listens for incomming connections from remote clients.
79
opens a RFCOMM socket and listens for incoming connections from remote clients.
80
Once the new incomming connection is accepted,
80
Once the new incoming connection is accepted,
81
.Nm
81
.Nm
82
forks and executes
82
forks and executes
83
.Xr ppp 8
83
.Xr ppp 8
Lines 85-130 Link Here
85
.Fl direct
85
.Fl direct
86
mode with the specified
86
mode with the specified
87
.Ar label .
87
.Ar label .
88
The
88
Likewise,
89
.Xr ppp 8
89
.Xr ppp 8
90
in its turn operates over the RFCOMM connection just like it would operate over
90
operates over the RFCOMM connection just like it would over a standard
91
the standard serial port thus providing network connectivity to remote clients.
91
serial port, thus providing network connectivity to remote clients.
92
.Pp
92
.Pp
93
The options are as follows:
93
The options are as follows:
94
.Bl -tag -width indent
94
.Bl -tag -width indent
95
.It Fl a Ar address
95
.It Fl a Ar address
96
In the client mode, this required option specifies the address of the remote
96
In client mode, this required option specifies the address of the remote
97
RFCOMM server.
97
RFCOMM server.
98
In the server mode, this option can be used to specify the local
98
In server mode, this option can be used to specify the local
99
address to listen on.
99
address to listen on.
100
By default, server will listen on
100
By default, in server mode, the daemon will listen on
101
.Dv ANY
101
.Dv ANY
102
address.
102
address.
103
The address can be specified as BD_ADDR or name.
103
The address can be specified as BD_ADDR or name.
104
If name was specified then the
104
If a hostname is specified, it will attempt to be resolved
105
.Nm
105
via
106
utility will attempt to resolve the name via
107
.Xr bt_gethostbyname 3 .
106
.Xr bt_gethostbyname 3 .
108
.It Fl C Ar channel
107
.It Fl C Ar channel
109
In both client and server modes, this required option specifies RFCOMM channel
108
In both client and server modes, this required option specifies the RFCOMM
110
to connect to or listen on.
109
channel to connect to or listen on.
111
In the server mode, RFCOMM channel should be a number between 1 and 30.
110
In server mode, the channel should be a number between 1 and 30.
112
In the client mode, RFCOMM channel could either be a number between 1 and 30
111
In client mode, the channel could either be a number between 1 and 30
113
or a service name.
112
or a service name.
114
Supported service names are:
113
Supported service names are:
115
.Cm DUN
114
.Cm DUN
116
(for DialUp Networking service) and
115
(Dial-Up Networking) and
117
.Cm LAN
116
.Cm LAN
118
(for LAN Access Using PPP service).
117
(LAN Access Using PPP).
119
If service name was specified instead of numeric RFCOMM channel then
118
If a service name is used instead of a numeric channel number, then
120
.Nm
119
.Nm
121
utility will try to obtain RFCOMM channel for the service via Service
120
will try to obtain a RFCOMM channel number via SDP
122
Discovery Protocol.
121
(Service Discovery Protocol).
123
.It Fl c
122
.It Fl c
124
Act as an RFCOMM client.
123
Act as a RFCOMM client.
125
This is the default mode.
124
This is the default mode.
126
.It Fl d
125
.It Fl d
127
Do not detach from the controlling terminal, i.e., run in foreground.
126
Do not detach from the controlling terminal, i.e., run in the foreground.
128
.It Fl h
127
.It Fl h
129
Display usage message and exit.
128
Display usage message and exit.
130
.It Fl l Ar label
129
.It Fl l Ar label
Lines 132-166 Link Here
132
.Xr ppp 8
131
.Xr ppp 8
133
label will be used.
132
label will be used.
134
.It Fl S
133
.It Fl S
135
In the server mode register the Serial Port (SP) service in addition to the
134
In server mode, register the
136
LAN Access Using PPP (LAN) service.
135
.Cm SP
137
It appears that some cell phones are using so called
136
(Serial Port) service in addition to the
137
.Cm LAN
138
(LAN Access Using PPP) service.
139
.Pp
140
It appears that some cell phones are using a so-called
138
.Dq callback mechanism .
141
.Dq callback mechanism .
139
In this scenario the user is trying to connect his cell phone to the Internet,
142
In this scenario, the user is trying to connect his cell phone to the Internet,
140
and, user's host computer is acting as the gateway server.
143
while the host computer is acting as the gateway server.
141
It seems that it is not possible to tell the phone to just connect and start
144
It seems that it is not possible to tell the phone to just connect and start
142
using the LAN service.
145
using the
143
Instead the user's host computer must
146
.Cm LAN
147
service.  Instead the host computer must
144
.Dq jump start
148
.Dq jump start
145
the phone by connecting to the phone's SP service.
149
the phone by connecting to the cell phones'
150
.Cm SP
151
service.
146
What happens next is the phone kills the existing connection and opens another
152
What happens next is the phone kills the existing connection and opens another
147
connection back to the user's host computer.
153
connection back to the host computer.
148
The phone really wants to use LAN service, but for whatever reason it looks
154
The phone really wants to use the
149
for the SP service on the user's host computer.
155
.Cm LAN
150
This brain damaged behavior was reported for Nokia 6600 and Sony/Ericsson P900.
156
service, but for whatever reason it looks
157
for the
158
.Cm SP
159
service on the host computer anyways.  This brain-damaged behavior was
160
reported for the following cell phone models:
161
.Bd -literal -offset indent
162
* Nokia 6600
163
* Sony/Ericsson P900
164
.Ed
151
.It Fl s
165
.It Fl s
152
Act as an RFCOMM server.
166
Act as a RFCOMM server.
153
.It Fl u Ar N
167
.It Fl u Ar N
154
This option maps directly onto
168
This option maps directly to the
155
.Fl unit
169
.Fl unit
156
.Xr ppp 8
170
.Xr ppp 8
157
command line option and tells
171
command-line option and tells
158
.Nm
172
.Nm
159
to instruct
173
to instruct
160
.Xr ppp 8
174
.Xr ppp 8
161
to only attempt to open
175
to only attempt to open
162
.Pa /dev/tun Ns Ar N .
176
.Pa /dev/tun Ns Ar N .
163
This option only works in the client mode.
177
This option only works in client mode.
164
.El
178
.El
165
.Sh PPP CONFIGURATION
179
.Sh PPP CONFIGURATION
166
.Ss Important Notes on PPP Configuration
180
.Ss Important Notes on PPP Configuration
Lines 178-185 Link Here
178
label
192
label
179
.Em only
193
.Em only
180
contains commands that apply to
194
contains commands that apply to
181
.Em every
195
.Em every other
182
other label.
196
label.
183
If you need to use PPP for both dialing out and accepting incoming
197
If you need to use PPP for both dialing out and accepting incoming
184
RFCOMM connections, please make sure you have moved all commands related to
198
RFCOMM connections, please make sure you have moved all commands related to
185
dialing out from the
199
dialing out from the
Lines 187-196 Link Here
187
section into an appropriate outgoing label.
201
section into an appropriate outgoing label.
188
.Ss RFCOMM Server
202
.Ss RFCOMM Server
189
One of the typical examples is the LAN access.
203
One of the typical examples is the LAN access.
190
In this example, RFCOMM connection
204
In this example, a RFCOMM connection
191
is used as a null-modem connection between client and server.
205
is used as a null-modem connection between a client and a server.
192
Both client
206
Both the client
193
and server will start talking PPP right after RFCOMM connection was established.
207
and server will talk PPP right after the RFCOMM connection is established.
194
.Bd -literal -offset indent
208
.Bd -literal -offset indent
195
rfcomm-server:
209
rfcomm-server:
196
 set timeout 0
210
 set timeout 0
Lines 209-217 Link Here
209
The
223
The
210
.Nm
224
.Nm
211
utility
225
utility
212
supports both LAN and DUN (Dial-Up Networking) access.
226
supports both
213
The client's configuration for the LAN access is very similar to server's and
227
.Cm LAN
214
might look like this.
228
(LAN Access Using PPP)
229
and
230
.Cm DUN
231
(Dial-Up Networking) access.
232
The client's configuration for
233
.Cm LAN
234
access is very similar to servers' and may resemble this:
215
.Bd -literal -offset indent
235
.Bd -literal -offset indent
216
rfcomm-client:
236
rfcomm-client:
217
 enable lqr
237
 enable lqr
Lines 228-244 Link Here
228
 disable chap
248
 disable chap
229
.Ed
249
.Ed
230
.Pp
250
.Pp
231
The client's configuration for the DUN access is different.
251
The client configuration for
252
.Cm DUN
253
access is different.
232
In this scenario, the client gets connected to the virtual serial port on the
254
In this scenario, the client gets connected to the virtual serial port on the
233
server.
255
server.
234
To open a PPP session, client must dial a number.
256
To open a PPP session, the client must dial a number.
235
Note that by default
257
Note that by default
236
.Xr ppp 8
258
.Xr ppp 8
237
will not execute any configured chat scripts.
259
will not execute any configured chat scripts.
238
The
260
The
239
.Ic force-scripts
261
.Ic force-scripts
240
option can be used to override this behavior.
262
option can be used to override this behavior.
241
The example of such configuration is shown below.
263
An example configuration is shown below:
242
.Bd -literal -offset indent
264
.Bd -literal -offset indent
243
rfcomm-dialup:
265
rfcomm-dialup:
244
 # This is IMPORTANT option
266
 # This is IMPORTANT option
Lines 261-267 Link Here
261
 add default HISADDR
283
 add default HISADDR
262
.Ed
284
.Ed
263
.Pp
285
.Pp
264
Note that by adjusting the initialization string, one can make CSD (Circuit
286
Note that by adjusting the initialization string, one can make a CSD (Circuit
265
Switched Data), HSCSD (High Speed Circuit Switched Data) or GPRS (General
287
Switched Data), HSCSD (High Speed Circuit Switched Data) or GPRS (General
266
Packet Radio Service) connection.
288
Packet Radio Service) connection.
267
The availability of the particular connection
289
The availability of the particular connection
Lines 276-289 Link Here
276
.Li 00:01:02:03:04:05
298
.Li 00:01:02:03:04:05
277
and channel
299
and channel
278
.Li 1 .
300
.Li 1 .
279
Once the incomming connection has been accepted,
301
Once the incoming connection has been accepted,
280
.Nm
302
.Nm
281
will execute
303
will execute
282
.Xr ppp 8
304
.Xr ppp 8
283
in
305
in
284
.Fl direct
306
.Fl direct
285
mode with
307
mode with the
286
.Dq Li rfcomm-server
308
.Em rfcomm-server
287
label.
309
label.
288
.Pp
310
.Pp
289
.Dl "rfcomm_pppd -c -a 00:01:02:03:04:05 -C 1 -l rfcomm-client"
311
.Dl "rfcomm_pppd -c -a 00:01:02:03:04:05 -C 1 -l rfcomm-client"
Lines 296-320 Link Here
296
.Li 00:01:02:03:04:05
318
.Li 00:01:02:03:04:05
297
address and channel
319
address and channel
298
.Li 1 .
320
.Li 1 .
299
Once connected, the
321
Once connected,
300
.Nm
322
.Nm
301
will execute
323
will execute
302
.Xr ppp 8
324
.Xr ppp 8
303
in
325
in
304
.Fl direct
326
.Fl direct
305
mode with
327
mode with the
306
.Dq Li rfcomm-client
328
.Em rfcomm-client
307
label.
329
label.
308
.Sh DIAGNOSTICS
330
.Sh DIAGNOSTICS
309
.Ex -std
331
.Ex -std
310
.Sh CAVEAT
332
.Sh CAVEAT
311
The
333
The
312
.Nm
334
.Nm
313
utility in server mode will try to register Bluetooth LAN Access Over PPP
335
utility in server mode will try to register the Bluetooth LAN Access Over
314
service with local SPD daemon.
336
PPP service with the local SDP daemon.  If the local SDP daemon is not running,
315
If local SDP daemon is not running the
316
.Nm
337
.Nm
317
utility will exit with error.
338
will exit with an error.
318
.Sh SEE ALSO
339
.Sh SEE ALSO
319
.Xr rfcomm_sppd 1 ,
340
.Xr rfcomm_sppd 1 ,
320
.Xr bluetooth 3 ,
341
.Xr bluetooth 3 ,

Return to bug 78174