227 lines
6.6 KiB
Groff
227 lines
6.6 KiB
Groff
.\" $NetBSD: rfcomm_sppd.1,v 1.13 2017/12/21 08:59:27 plunky Exp $
|
|
.\"
|
|
.\" Copyright (c) 2006 Itronix Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" 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.
|
|
.\" 3. The name of Itronix Inc. may not be used to endorse
|
|
.\" or promote products derived from this software without specific
|
|
.\" prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``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 ITRONIX INC. 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.
|
|
.\"
|
|
.\"
|
|
.\" Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com>
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" 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.
|
|
.\"
|
|
.\" 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.
|
|
.\"
|
|
.Dd November 2, 2010
|
|
.Dt RFCOMM_SPPD 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm rfcomm_sppd
|
|
.Nd RFCOMM Serial Port Profile daemon
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl d Ar device
|
|
.Op Fl m Ar mode
|
|
.Op Fl p Ar psm
|
|
.Op Fl s Ar service
|
|
.Op Fl t Ar tty
|
|
.Brq Fl a Ar address | Op Fl c Ar channel
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
utility is a Serial Port Profile daemon, providing serial access over
|
|
an RFCOMM connection to a remote device.
|
|
.Nm
|
|
can work in client or server mode.
|
|
.Pp
|
|
In client mode,
|
|
.Nm
|
|
initiates an RFCOMM connection to the
|
|
.Ar service
|
|
at the remote
|
|
.Ar address .
|
|
.Pp
|
|
In server mode,
|
|
.Nm
|
|
registers the
|
|
.Ar service
|
|
with the local SDP server and listens on the specified RFCOMM
|
|
.Ar channel
|
|
for an incoming connection, or the first unused channel if none
|
|
was given.
|
|
.Pp
|
|
The options are as follows:
|
|
.Bl -tag -width ".Fl c Ar channel"
|
|
.It Fl a Ar address
|
|
Client mode.
|
|
Specify the address of the remote RFCOMM device.
|
|
The address can be specified as BD_ADDR or name.
|
|
If given as a name, then the
|
|
.Nm
|
|
utility will attempt to resolve the name via
|
|
.Xr bt_gethostbyname 3 .
|
|
.It Fl c Ar channel
|
|
In server mode, specify the RFCOMM channel number to listen on.
|
|
.Nm
|
|
will register the service with the local
|
|
.Xr sdpd 8
|
|
daemon.
|
|
Note that registering services with
|
|
.Xr sdpd 8
|
|
is a privileged operation.
|
|
.It Fl d Ar device
|
|
Use the local device with the specified address.
|
|
The device can be specified by BD_ADDR or device name.
|
|
See
|
|
.Xr btconfig 8
|
|
for a list of available devices.
|
|
If no
|
|
.Ar device
|
|
is specified, the connection will be set up on a system determined device.
|
|
.It Fl m Ar mode
|
|
Set connection link mode.
|
|
Supported modes are:
|
|
.Pp
|
|
.Bl -tag -compact -width encrypt -offset xx
|
|
.It auth
|
|
require devices be paired.
|
|
.It encrypt
|
|
auth, plus enable encryption.
|
|
.It secure
|
|
encryption, plus change of link key.
|
|
.El
|
|
.It Fl p Ar psm
|
|
Specify the
|
|
.Qq Protocol/Service Multiplexer
|
|
value to be used for the RFCOMM protocol.
|
|
In client mode where Service Discovery is being used, this value
|
|
will be ignored.
|
|
.It Fl s Ar service
|
|
Name of service class to connect to or register.
|
|
If no
|
|
.Ar service
|
|
is given, the default
|
|
.Qq Serial Port
|
|
service class will be used.
|
|
Known service classes are:
|
|
.Pp
|
|
.Bl -tag -compact -width DUN -offset xx
|
|
.It DUN
|
|
Dialup Networking
|
|
.It LAN
|
|
LAN access using PPP
|
|
.It SP
|
|
Serial Port
|
|
.El
|
|
.Pp
|
|
In client mode, the service class may be given as a channel number, for instances
|
|
where the remote device does not provide Service Discovery.
|
|
.It Fl t Ar tty
|
|
Slave pseudo tty name.
|
|
If this option is given,
|
|
.Nm
|
|
will detach from the controlling process after the Bluetooth connection is
|
|
made, and operate over the named
|
|
.Xr pty 4
|
|
pair.
|
|
Otherwise, stdin/stdout will be used.
|
|
.El
|
|
.Sh FILES
|
|
.Bl -tag -width ".Pa /dev/tty[p-sP-S][0-9a-v]" -compact
|
|
.It Pa /dev/pty[p-sP-S][0-9a-v]
|
|
master pseudo terminals
|
|
.It Pa /dev/tty[p-sP-S][0-9a-v]
|
|
slave pseudo terminals
|
|
.El
|
|
.Sh EXIT STATUS
|
|
.Ex -std
|
|
.Sh EXAMPLES
|
|
.Dl rfcomm_sppd -a 00:01:02:03:04:05 -s 1 -t /dev/ttyp1
|
|
.Pp
|
|
Will open an RFCOMM connection to the server at
|
|
.Li 00:01:02:03:04:05
|
|
on channel
|
|
.Li 1 .
|
|
Once the connection has been established,
|
|
.Nm
|
|
will detach and
|
|
.Pa /dev/ttyp1
|
|
can be used to communicate with the remote serial port on the
|
|
server, e.g. with the use of
|
|
.Pp
|
|
.Dl cu -l /dev/ttyp1
|
|
.Pp
|
|
In order to use
|
|
.Nm
|
|
to automatically create a secured link for
|
|
.Xr pppd 8 ,
|
|
use
|
|
.Dl pty Qo rfcomm_sppd -a 00:01:02:03:04:05 -s DUN -m secure Qc
|
|
.Pp
|
|
in your
|
|
.Xr pppd 8
|
|
configuration file.
|
|
.Sh SEE ALSO
|
|
.Xr bluetooth 3 ,
|
|
.Xr bluetooth 4 ,
|
|
.Xr pty 4 ,
|
|
.Xr btconfig 8 ,
|
|
.Xr pppd 8 ,
|
|
.Xr sdpd 8
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
program first appeared in
|
|
.Fx
|
|
and was ported to
|
|
.Nx 4.0
|
|
by
|
|
.An Iain Hibbert
|
|
under the sponsorship of
|
|
.An Itronix, Inc .
|
|
.Sh AUTHORS
|
|
.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com ,
|
|
.An Iain Hibbert
|
|
.Sh BUGS
|
|
Please report if found.
|