xref: /netbsd/usr.bin/rfcomm_sppd/rfcomm_sppd.1 (revision 6550d01e)
1.\" $NetBSD: rfcomm_sppd.1,v 1.10 2010/11/03 12:21:50 wiz 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 November 2, 2010
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 p Ar psm
66.Op Fl s Ar service
67.Op Fl t Ar tty
68.Brq Fl a Ar address | Op 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, or the first unused channel if none
91was given.
92.Pp
93The options are as follows:
94.Bl -tag -width ".Fl c Ar channel"
95.It Fl a Ar address
96Client mode.
97Specify the address of the remote RFCOMM device.
98The address can be specified as BD_ADDR or name.
99If given as a name, then the
100.Nm
101utility will attempt to resolve the name via
102.Xr bt_gethostbyname 3 .
103.It Fl c Ar channel
104In server mode, specify 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 specified 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 p Ar psm
134Specify the
135.Qq Protocol/Service Multiplexer
136value to be used for the RFCOMM protocol.
137In client mode where Service Discovery is being used, this value
138will be ignored.
139.It Fl s Ar service
140Name of service class to connect to or register.
141If no
142.Ar service
143is given, the default
144.Qq Serial Port
145service class will be used.
146Known service classes are:
147.Pp
148.Bl -tag -compact -offset indent
149.It DUN
150Dialup Networking
151.It LAN
152LAN access using PPP
153.It SP
154Serial Port
155.El
156.Pp
157In client mode, the service class may be given as a channel number, for instances
158where the remote device does not provide Service Discovery.
159.It Fl t Ar tty
160Slave pseudo tty name.
161If this option is given,
162.Nm
163will detach from the controlling process after the Bluetooth connection is
164made, and operate over the named
165.Xr pty 4
166pair.
167Otherwise, stdin/stdout will be used.
168.El
169.Sh FILES
170.Bl -tag -width ".Pa /dev/tty[p-sP-S][0-9a-v]" -compact
171.It Pa /dev/pty[p-sP-S][0-9a-v]
172master pseudo terminals
173.It Pa /dev/tty[p-sP-S][0-9a-v]
174slave pseudo terminals
175.El
176.Sh EXIT STATUS
177.Ex -std
178.Sh EXAMPLES
179.Dl rfcomm_sppd -a 00:01:02:03:04:05 -s 1 -t /dev/ttyp1
180.Pp
181Will open an RFCOMM connection to the server at
182.Li 00:01:02:03:04:05
183on channel
184.Li 1 .
185Once the connection has been established,
186.Nm
187will detach and
188.Pa /dev/ttyp1
189can be used to communicate with the remote serial port on the
190server, e.g. with the use of
191.Pp
192.Dl cu -l /dev/ttyp1
193.Pp
194In order to use
195.Nm
196to automatically create a secured link for
197.Xr pppd 8 ,
198use
199.Dl pty Qo rfcomm_sppd -a 00:01:02:03:04:05 -s DUN -m secure Qc
200.Pp
201in your
202.Xr pppd 8
203configuration file.
204.Sh SEE ALSO
205.Xr bluetooth 3 ,
206.Xr bluetooth 4 ,
207.Xr pty 4 ,
208.Xr btconfig 8 ,
209.Xr pppd 8 ,
210.Xr sdpd 8
211.Sh HISTORY
212The
213.Nm
214program first appeared in
215.Fx
216and was ported to
217.Nx 4.0
218by
219.An Iain Hibbert
220under the sponsorship of
221.An Itronix, Inc .
222.Sh AUTHORS
223.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com ,
224.An Iain Hibbert
225.Sh BUGS
226Please report if found.
227