aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1
diff options
context:
space:
mode:
authorMaksim Yevmenkin <emax@FreeBSD.org>2007-01-25 20:54:59 +0000
committerMaksim Yevmenkin <emax@FreeBSD.org>2007-01-25 20:54:59 +0000
commit0a314f7c3909bd3d20ffe624f40efcb80724fac6 (patch)
tree569619450f6012ed6c8536d90a37a592ef7fd682 /usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1
parentb20669bdef1eeb16d7e2d730de888692687c2e1d (diff)
downloadsrc-0a314f7c3909bd3d20ffe624f40efcb80724fac6.tar.gz
src-0a314f7c3909bd3d20ffe624f40efcb80724fac6.zip
Add "server mode" to rfcomm_sppd(1).
Submitted by: Dave Eckhardt, bms Tested by: Dave Eckhardt, Eric Anderson, bms
Notes
Notes: svn path=/head/; revision=166233
Diffstat (limited to 'usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1')
-rw-r--r--usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.161
1 files changed, 53 insertions, 8 deletions
diff --git a/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1 b/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1
index 2f7d3f5328a1..4af70943f6df 100644
--- a/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1
+++ b/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1
@@ -25,7 +25,7 @@
.\" $Id: rfcomm_sppd.1,v 1.3 2003/09/07 18:15:55 max Exp $
.\" $FreeBSD$
.\"
-.Dd April 26, 2003
+.Dd January 24, 2007
.Dt RFCOMM_SPPD 1
.Os
.Sh NAME
@@ -33,7 +33,7 @@
.Nd RFCOMM Serial Port Profile daemon
.Sh SYNOPSIS
.Nm
-.Op Fl bh
+.Op Fl bhS
.Fl a Ar address
.Fl c Ar channel
.Op Fl t Ar tty
@@ -41,7 +41,11 @@
The
.Nm
utility is a Serial Port Profile daemon.
-It opens RFCOMM connection to the specified
+It can operate in two modes: client and server.
+.Pp
+In client mode,
+.Nm
+opens RFCOMM connection to the specified
.Ar address
server and
.Ar channel .
@@ -54,6 +58,27 @@ interface if
.Fl t
option was specified.
.Pp
+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.
+The
+.Fl t
+option must be specified;
+the server side of the virtual serial port is attached to the pseudo-terminal
+.Ar tty .
+.Nm
+should be run as root in order to communicate with
+.Xr sdp 8
+in this case.
+.Pp
The
.Nm
utility opens both master and slave pseudo terminals.
@@ -71,17 +96,31 @@ port.
The options are as follows:
.Bl -tag -width indent
.It Fl a Ar address
-This required option specifies the address of the remote RFCOMM server.
+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 .
The address can be specified as BD_ADDR or name.
-If name was specified then the
+If name was specified then
.Nm
utility will attempt to resolve the name via
.Xr bt_gethostbyname 3 .
.It Fl b
Detach from the controlling terminal, i.e., run in background.
.It Fl c Ar channel
-This option specifies RFCOMM channel to connect to.
-RFCOMM channel could either be a number between 1 and 30 or a service name.
+In both client and server mode,
+this required option specifies the RFCOMM channel to connect to or listen on.
+In server mode,
+the channel should be a number between 1 and 30.
+If not specified,
+.Nm
+will try to allocate RFCOMM channel number based on process ID.
+In client mode,
+the channel could either be a number between 1 and 30 or a service name.
Supported service names are:
.Cm DUN
(for DialUp Networking service),
@@ -97,11 +136,16 @@ utility will try to obtain RFCOMM channel for Serial Port service via Service
Discovery Protocol from the server.
.It Fl h
Display usage message and exit.
+.It Fl S
+Server mode; see
+.Sx DESCRIPTION .
.It Fl t Ar tty
Slave pseudo tty name.
If not set stdin/stdout will be used.
This option is required if
.Fl b
+or
+.Fl S
option was specified.
.El
.Sh FILES
@@ -129,7 +173,8 @@ can be used to talk to the remote serial port on the server.
.Xr bluetooth 3 ,
.Xr ng_btsocket 4 ,
.Xr pty 4 ,
-.Xr rfcomm_pppd 8
+.Xr rfcomm_pppd 8 ,
+.Xr sdpd 8
.Sh AUTHORS
.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
.Sh BUGS