]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.bin / bluetooth / rfcomm_sppd / rfcomm_sppd.1
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_sppd.1,v 1.3 2003/09/07 18:15:55 max Exp $
26 .\" $FreeBSD$
27 .\"
28 .Dd April 21, 2008
29 .Dt RFCOMM_SPPD 1
30 .Os
31 .Sh NAME
32 .Nm rfcomm_sppd
33 .Nd RFCOMM Serial Port Profile daemon
34 .Sh SYNOPSIS
35 .Nm
36 .Op Fl bhS
37 .Fl a Ar address
38 .Fl c Ar channel
39 .Op Fl t Ar tty
40 .Sh DESCRIPTION
41 The
42 .Nm
43 utility is a Serial Port Profile daemon.
44 It can operate in two modes: client and server.
45 .Pp
46 In client mode,
47 .Nm
48 opens RFCOMM connection to the specified
49 .Ar address
50 server and
51 .Ar channel .
52 Once connection is established, the
53 .Nm
54 utility provides access to the server's remote serial port via stdin/stdout
55 or via
56 .Xr pty 4
57 interface if
58 .Fl t
59 option was specified.
60 .Pp
61 If the
62 .Fl S
63 option is specified,
64 .Nm
65 will operate in server mode and act as RFCOMM server,
66 listening on
67 .Dv ANY
68 address and advertising a virtual serial port
69 via the
70 .Xr sdpd 8
71 daemon.
72 If
73 .Fl t
74 options was specified,
75 the server side of the virtual serial port is attached to the pseudo-terminal
76 .Ar tty .
77 Otherwise the virtual serial port is attached to the stdin/stdout.
78 .Nm
79 should be run as root in order to communicate with
80 .Xr sdpd 8
81 in this case.
82 .Pp
83 The
84 .Nm
85 utility opens both master and slave pseudo terminals.
86 This is done to ensure that RFCOMM connection stays open until
87 .Nm
88 is terminated.
89 The data received from the master pseudo terminal are sent over
90 the RFCOMM connection.
91 The data received from the RFCOMM connection are written
92 into master pseudo terminal.
93 The application in its turn opens the slave pseudo
94 terminal and operates on it just like it would operate over the standard serial
95 port.
96 .Pp
97 The options are as follows:
98 .Bl -tag -width indent
99 .It Fl a Ar address
100 In client mode,
101 this required option specifies the address of the remote RFCOMM server.
102 If this option is specified in server mode,
103 .Nm
104 will only accept connections from the
105 .Tn Bluetooth
106 device with address
107 .Ar address .
108 The address can be specified as BD_ADDR or name.
109 If name was specified then
110 .Nm
111 utility will attempt to resolve the name via
112 .Xr bt_gethostbyname 3 .
113 .It Fl b
114 Detach from the controlling terminal, i.e., run in background.
115 .It Fl c Ar channel
116 In both client and server mode,
117 this option specifies the RFCOMM channel to connect to or listen on.
118 In server mode,
119 the channel should be a number between 1 and 30.
120 If not specified,
121 .Nm
122 will try to bind to
123 .Dq wildcard
124 RFCOMM channel number.
125 The actual RFCOMM channel will be obtained via
126 .Xr getsockname 2
127 call and will be used to register Serial Port service with
128 .Xr sdpd 8 .
129 In client mode,
130 the channel could either be a number between 1 and 30 or a service name.
131 Supported service names are:
132 .Cm DUN
133 (for DialUp Networking service),
134 .Cm FAX
135 (for Fax service),
136 .Cm LAN
137 (for LAN Access Using PPP service) and
138 .Cm SP
139 (for Serial Port service).
140 If channel was not specified then
141 .Nm
142 utility will try to obtain RFCOMM channel for Serial Port service via Service
143 Discovery Protocol from the server.
144 .It Fl h
145 Display usage message and exit.
146 .It Fl S
147 Server mode; see
148 .Sx DESCRIPTION .
149 .It Fl t Ar tty
150 Slave pseudo tty name.
151 If not set stdin/stdout will be used.
152 This option is required if
153 .Fl b
154 option was specified.
155 .El
156 .Sh FILES
157 .Bl -tag -width ".Pa /dev/tty[p-sP-S][0-9a-v]" -compact
158 .It Pa /dev/pty[p-sP-S][0-9a-v]
159 master pseudo terminals
160 .It Pa /dev/tty[p-sP-S][0-9a-v]
161 slave pseudo terminals
162 .El
163 .Sh EXIT STATUS
164 .Ex -std
165 .Sh EXAMPLES
166 .Dl "rfcomm_sppd -a 00:01:02:03:04:05 -c 1 -t /dev/ttyp1"
167 .Pp
168 Will start the
169 .Nm
170 utility and open RFCOMM connection to the server at
171 .Li 00:01:02:03:04:05
172 and channel
173 .Li 1 .
174 Once the connection has been established,
175 .Pa /dev/ttyp1
176 can be used to talk to the remote serial port on the server.
177 .Sh SEE ALSO
178 .Xr bluetooth 3 ,
179 .Xr ng_btsocket 4 ,
180 .Xr pty 4 ,
181 .Xr rfcomm_pppd 8 ,
182 .Xr sdpd 8
183 .Sh AUTHORS
184 .An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
185 .Sh BUGS
186 Please report if found.