2003-05-10 21:44:42 +00:00
|
|
|
.\" Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com>
|
|
|
|
.\" All rights reserved.
|
2003-05-20 21:01:21 +00:00
|
|
|
.\"
|
2003-05-10 21:44:42 +00:00
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2003-05-20 21:01:21 +00:00
|
|
|
.\"
|
2003-05-10 21:44:42 +00:00
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
2003-05-20 21:01:21 +00:00
|
|
|
.\"
|
2003-10-12 22:04:24 +00:00
|
|
|
.\" $Id: rfcomm_sppd.1,v 1.3 2003/09/07 18:15:55 max Exp $
|
2003-05-10 21:44:42 +00:00
|
|
|
.\" $FreeBSD$
|
2003-05-20 21:01:21 +00:00
|
|
|
.\"
|
2008-05-14 16:47:30 +00:00
|
|
|
.Dd April 21, 2008
|
2003-05-10 21:44:42 +00:00
|
|
|
.Dt RFCOMM_SPPD 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm rfcomm_sppd
|
|
|
|
.Nd RFCOMM Serial Port Profile daemon
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2014-10-23 15:16:40 +00:00
|
|
|
.Op Fl bhtS
|
2004-08-05 16:32:41 +00:00
|
|
|
.Fl a Ar address
|
2003-05-20 21:01:21 +00:00
|
|
|
.Fl c Ar channel
|
2003-05-10 21:44:42 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2003-05-20 21:01:21 +00:00
|
|
|
utility is a Serial Port Profile daemon.
|
2007-01-25 20:54:59 +00:00
|
|
|
It can operate in two modes: client and server.
|
|
|
|
.Pp
|
|
|
|
In client mode,
|
|
|
|
.Nm
|
|
|
|
opens RFCOMM connection to the specified
|
2004-08-05 16:32:41 +00:00
|
|
|
.Ar address
|
|
|
|
server and
|
2003-05-20 21:01:21 +00:00
|
|
|
.Ar channel .
|
|
|
|
Once connection is established, the
|
2003-05-10 21:44:42 +00:00
|
|
|
.Nm
|
2004-09-30 21:05:17 +00:00
|
|
|
utility provides access to the server's remote serial port via stdin/stdout
|
|
|
|
or via
|
2014-10-23 15:16:40 +00:00
|
|
|
.Xr pts 4
|
2004-09-30 21:05:17 +00:00
|
|
|
interface if
|
|
|
|
.Fl t
|
|
|
|
option was specified.
|
2003-05-10 21:44:42 +00:00
|
|
|
.Pp
|
2007-01-25 20:54:59 +00:00
|
|
|
If the
|
|
|
|
.Fl S
|
|
|
|
option is specified,
|
|
|
|
.Nm
|
|
|
|
will operate in server mode and act as RFCOMM server,
|
|
|
|
listening on
|
|
|
|
.Dv ANY
|
|
|
|
address and advertising a virtual serial port
|
|
|
|
via the
|
|
|
|
.Xr sdpd 8
|
|
|
|
daemon.
|
2008-05-14 16:47:30 +00:00
|
|
|
If
|
2007-01-25 20:54:59 +00:00
|
|
|
.Fl t
|
2008-05-14 16:47:30 +00:00
|
|
|
options was specified,
|
2014-10-23 15:16:40 +00:00
|
|
|
the server side of the virtual serial port is attached to a pseudo-terminal.
|
2008-05-14 16:47:30 +00:00
|
|
|
Otherwise the virtual serial port is attached to the stdin/stdout.
|
2007-01-25 20:54:59 +00:00
|
|
|
.Nm
|
|
|
|
should be run as root in order to communicate with
|
2008-05-14 16:47:30 +00:00
|
|
|
.Xr sdpd 8
|
2007-01-25 20:54:59 +00:00
|
|
|
in this case.
|
|
|
|
.Pp
|
2003-05-20 21:01:21 +00:00
|
|
|
The
|
2003-05-10 21:44:42 +00:00
|
|
|
.Nm
|
2003-05-20 21:01:21 +00:00
|
|
|
utility opens both master and slave pseudo terminals.
|
|
|
|
This is done to ensure that RFCOMM connection stays open until
|
2003-05-10 21:44:42 +00:00
|
|
|
.Nm
|
2003-05-20 21:01:21 +00:00
|
|
|
is terminated.
|
|
|
|
The data received from the master pseudo terminal are sent over
|
|
|
|
the RFCOMM connection.
|
|
|
|
The data received from the RFCOMM connection are written
|
|
|
|
into master pseudo terminal.
|
|
|
|
The application in its turn opens the slave pseudo
|
2003-05-10 21:44:42 +00:00
|
|
|
terminal and operates on it just like it would operate over the standard serial
|
|
|
|
port.
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width indent
|
2004-08-05 16:32:41 +00:00
|
|
|
.It Fl a Ar address
|
2007-01-25 20:54:59 +00:00
|
|
|
In client mode,
|
|
|
|
this required option specifies the address of the remote RFCOMM server.
|
|
|
|
If this option is specified in server mode,
|
|
|
|
.Nm
|
|
|
|
will only accept connections from the
|
|
|
|
.Tn Bluetooth
|
|
|
|
device with address
|
|
|
|
.Ar address .
|
2004-08-05 16:32:41 +00:00
|
|
|
The address can be specified as BD_ADDR or name.
|
2007-01-25 20:54:59 +00:00
|
|
|
If name was specified then
|
2004-08-05 16:32:41 +00:00
|
|
|
.Nm
|
|
|
|
utility will attempt to resolve the name via
|
|
|
|
.Xr bt_gethostbyname 3 .
|
2003-05-10 21:44:42 +00:00
|
|
|
.It Fl b
|
2003-05-20 21:01:21 +00:00
|
|
|
Detach from the controlling terminal, i.e., run in background.
|
2003-05-10 21:44:42 +00:00
|
|
|
.It Fl c Ar channel
|
2007-01-25 20:54:59 +00:00
|
|
|
In both client and server mode,
|
2008-05-14 16:47:30 +00:00
|
|
|
this option specifies the RFCOMM channel to connect to or listen on.
|
2007-01-25 20:54:59 +00:00
|
|
|
In server mode,
|
|
|
|
the channel should be a number between 1 and 30.
|
|
|
|
If not specified,
|
|
|
|
.Nm
|
2008-05-14 16:47:30 +00:00
|
|
|
will try to bind to
|
|
|
|
.Dq wildcard
|
|
|
|
RFCOMM channel number.
|
|
|
|
The actual RFCOMM channel will be obtained via
|
|
|
|
.Xr getsockname 2
|
|
|
|
call and will be used to register Serial Port service with
|
|
|
|
.Xr sdpd 8 .
|
2007-01-25 20:54:59 +00:00
|
|
|
In client mode,
|
|
|
|
the channel could either be a number between 1 and 30 or a service name.
|
2005-11-23 00:56:18 +00:00
|
|
|
Supported service names are:
|
|
|
|
.Cm DUN
|
|
|
|
(for DialUp Networking service),
|
|
|
|
.Cm FAX
|
2005-12-07 19:41:58 +00:00
|
|
|
(for Fax service),
|
|
|
|
.Cm LAN
|
|
|
|
(for LAN Access Using PPP service) and
|
2005-11-23 00:56:18 +00:00
|
|
|
.Cm SP
|
|
|
|
(for Serial Port service).
|
2003-10-12 22:04:24 +00:00
|
|
|
If channel was not specified then
|
|
|
|
.Nm
|
2005-11-23 00:56:18 +00:00
|
|
|
utility will try to obtain RFCOMM channel for Serial Port service via Service
|
|
|
|
Discovery Protocol from the server.
|
2003-05-10 21:44:42 +00:00
|
|
|
.It Fl h
|
|
|
|
Display usage message and exit.
|
2007-01-25 20:54:59 +00:00
|
|
|
.It Fl S
|
|
|
|
Server mode; see
|
|
|
|
.Sx DESCRIPTION .
|
2014-10-23 15:16:40 +00:00
|
|
|
.It Fl t
|
|
|
|
Use slave pseudo tty.
|
2004-09-30 21:05:17 +00:00
|
|
|
If not set stdin/stdout will be used.
|
|
|
|
This option is required if
|
|
|
|
.Fl b
|
|
|
|
option was specified.
|
2003-05-10 21:44:42 +00:00
|
|
|
.El
|
2005-01-18 13:43:56 +00:00
|
|
|
.Sh FILES
|
2014-10-23 15:16:40 +00:00
|
|
|
.Bl -tag -width ".Pa /dev/pts/[num]" -compact
|
|
|
|
.It Pa /dev/pts/[num]
|
2005-01-18 13:43:56 +00:00
|
|
|
slave pseudo terminals
|
|
|
|
.El
|
|
|
|
.Sh EXIT STATUS
|
|
|
|
.Ex -std
|
2003-05-10 21:44:42 +00:00
|
|
|
.Sh EXAMPLES
|
2014-10-23 15:16:40 +00:00
|
|
|
.Dl "rfcomm_sppd -a 00:01:02:03:04:05 -c 1 -t"
|
2003-05-10 21:44:42 +00:00
|
|
|
.Pp
|
2003-05-20 21:01:21 +00:00
|
|
|
Will start the
|
2003-05-10 21:44:42 +00:00
|
|
|
.Nm
|
2003-05-20 21:01:21 +00:00
|
|
|
utility and open RFCOMM connection to the server at
|
|
|
|
.Li 00:01:02:03:04:05
|
|
|
|
and channel
|
|
|
|
.Li 1 .
|
2014-10-23 15:16:40 +00:00
|
|
|
Once the connection has been established, a
|
|
|
|
.Xr pts 4
|
2003-05-10 21:44:42 +00:00
|
|
|
can be used to talk to the remote serial port on the server.
|
2014-10-23 15:16:40 +00:00
|
|
|
.Nm
|
|
|
|
prints the name of the
|
|
|
|
.Xr pts 4
|
|
|
|
to use on stdout.
|
2003-05-10 21:44:42 +00:00
|
|
|
.Sh SEE ALSO
|
2004-08-05 16:32:41 +00:00
|
|
|
.Xr bluetooth 3 ,
|
2003-05-10 21:44:42 +00:00
|
|
|
.Xr ng_btsocket 4 ,
|
2014-10-23 15:16:40 +00:00
|
|
|
.Xr pts 4 ,
|
2007-01-25 20:54:59 +00:00
|
|
|
.Xr rfcomm_pppd 8 ,
|
|
|
|
.Xr sdpd 8
|
2003-05-10 21:44:42 +00:00
|
|
|
.Sh AUTHORS
|
2014-06-23 08:23:05 +00:00
|
|
|
.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com
|
2005-01-18 13:43:56 +00:00
|
|
|
.Sh BUGS
|
|
|
|
Please report if found.
|