- One can use both BD_ADDR or name to specify address of the Bluetooth device.
Update man pages to document this fact. - Update usage messages - Change u_intXXX to uintXXX
This commit is contained in:
parent
5cc00cfc67
commit
2aa65cf739
@ -34,16 +34,16 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl bh
|
||||
.Fl a Ar BD_ADDR
|
||||
.Fl a Ar address
|
||||
.Fl c Ar channel
|
||||
.Fl t Ar tty
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility is a Serial Port Profile daemon.
|
||||
It opens RFCOMM connection to the specified server's
|
||||
.Ar BD_ADDR
|
||||
and
|
||||
It opens RFCOMM connection to the specified
|
||||
.Ar address
|
||||
server and
|
||||
.Ar channel .
|
||||
Once connection is established, the
|
||||
.Nm
|
||||
@ -67,8 +67,13 @@ port.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width indent
|
||||
.It Fl a Ar BD_ADDR
|
||||
This required option specifies the remote BD_ADDR of the RFCOMM server.
|
||||
.It Fl a Ar address
|
||||
This required option specifies the address of the remote RFCOMM server.
|
||||
The address can be specified as BD_ADDR or name.
|
||||
If name was specified then the
|
||||
.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
|
||||
@ -107,6 +112,7 @@ slave pseudo terminals
|
||||
.Sh BUGS
|
||||
Please report if found.
|
||||
.Sh SEE ALSO
|
||||
.Xr bluetooth 3 ,
|
||||
.Xr ng_btsocket 4 ,
|
||||
.Xr pty 4 ,
|
||||
.Xr rfcomm_pppd 8
|
||||
|
@ -391,7 +391,7 @@ usage(void)
|
||||
fprintf(stdout,
|
||||
"Usage: %s options\n" \
|
||||
"Where options are:\n" \
|
||||
"\t-a bdaddr BDADDR to connect to (required)\n" \
|
||||
"\t-a address Address to connect to (required)\n" \
|
||||
"\t-b Run in background\n" \
|
||||
"\t-c channel RFCOMM channel to connect to\n" \
|
||||
"\t-t tty TTY name\n" \
|
||||
|
@ -243,7 +243,7 @@ usage(void)
|
||||
fprintf(stderr,
|
||||
"Usage: %s [options]\n" \
|
||||
"Where options are:\n" \
|
||||
" -a bdaddr specify BDADDR to listen on (default ANY)\n" \
|
||||
" -a address specify address to listen on (default ANY)\n" \
|
||||
" -c file specify config file name\n" \
|
||||
" -d run in foreground\n" \
|
||||
" -H file specify known HIDs file name\n" \
|
||||
|
@ -69,6 +69,12 @@ To get more information about specific command use
|
||||
.Cm help Ar command .
|
||||
.It Ar parameters
|
||||
One or more optional space separated command parameters.
|
||||
Many commands require remote device address as one of the parameters.
|
||||
The remote device address can be specified as BD_ADDR or name.
|
||||
If name was specified then the
|
||||
.Nm
|
||||
utility will attempt to resolve the name via
|
||||
.Xr bt_gethostbyname 3 .
|
||||
.El
|
||||
.Sh COMMANDS
|
||||
The currently supported HCI commands in
|
||||
@ -168,6 +174,7 @@ Please report if found.
|
||||
.Sh DIAGNOSTICS
|
||||
.Ex -std
|
||||
.Sh SEE ALSO
|
||||
.Xr bluetooth 3 ,
|
||||
.Xr netgraph 3 ,
|
||||
.Xr netgraph 4 ,
|
||||
.Xr ng_hci 4 ,
|
||||
|
@ -1513,32 +1513,32 @@ struct hci_command host_controller_baseband_commands[] = {
|
||||
&hci_write_pin_type
|
||||
},
|
||||
{
|
||||
"read_stored_link_key [<bdaddr>]",
|
||||
"read_stored_link_key [<BD_ADDR>]",
|
||||
"\nThe Read_Stored_Link_Key command provides the ability to read one or\n" \
|
||||
"more link keys stored in the Bluetooth Host Controller. The Bluetooth Host\n" \
|
||||
"Controller can store a limited number of link keys for other Bluetooth\n" \
|
||||
"devices.\n\n" \
|
||||
"\t<bdaddr> - xx:xx:xx:xx:xx:xx BD_ADDR",
|
||||
"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name",
|
||||
&hci_read_stored_link_key
|
||||
},
|
||||
{
|
||||
"write_stored_link_key <bdaddr> <key>",
|
||||
"write_stored_link_key <BD_ADDR> <key>",
|
||||
"\nThe Write_Stored_Link_Key command provides the ability to write one\n" \
|
||||
"or more link keys to be stored in the Bluetooth Host Controller. The\n" \
|
||||
"Bluetooth Host Controller can store a limited number of link keys for other\n"\
|
||||
"Bluetooth devices. If no additional space is available in the Bluetooth\n"\
|
||||
"Host Controller then no additional link keys will be stored.\n\n" \
|
||||
"\t<bdaddr> - xx:xx:xx:xx:xx:xx BD_ADDR\n" \
|
||||
"\t<key> - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx up to 16 bytes link key",
|
||||
"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n" \
|
||||
"\t<key> - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx up to 16 bytes link key",
|
||||
&hci_write_stored_link_key
|
||||
},
|
||||
{
|
||||
"delete_stored_link_key [<bdaddr>]",
|
||||
"delete_stored_link_key [<BD_ADDR>]",
|
||||
"\nThe Delete_Stored_Link_Key command provides the ability to remove one\n" \
|
||||
"or more of the link keys stored in the Bluetooth Host Controller. The\n" \
|
||||
"Bluetooth Host Controller can store a limited number of link keys for other\n"\
|
||||
"Bluetooth devices.\n\n" \
|
||||
"\t<bdaddr> - xx:xx:xx:xx:xx:xx BD_ADDR",
|
||||
"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name",
|
||||
&hci_delete_stored_link_key
|
||||
},
|
||||
{
|
||||
|
@ -831,7 +831,7 @@ struct hci_command link_control_commands[] = {
|
||||
{
|
||||
"create_connection <BD_ADDR> <pkt> <rep_mode> <ps_mode> <clck_off> <role_sw>",
|
||||
"" \
|
||||
"\t<BD_ADDR> - remote unit address\n\n" \
|
||||
"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n\n" \
|
||||
"\t<pkt> - xxxx; packet type\n" \
|
||||
"" \
|
||||
"\t\tACL packets\n" \
|
||||
@ -929,10 +929,10 @@ struct hci_command link_control_commands[] = {
|
||||
&hci_change_connection_packet_type
|
||||
},
|
||||
{
|
||||
"remote_name_request <bdaddr> <ps_rep_mode> <ps_mode> <clock_offset>",
|
||||
"remote_name_request <BD_ADDR> <ps_rep_mode> <ps_mode> <clock_offset>",
|
||||
"\nThe Remote_Name_Request command is used to obtain the user-friendly\n" \
|
||||
"name of another Bluetooth unit.\n\n" \
|
||||
"\t<bdaddr> - xx:xx:xx:xx:xx:xx remote unit BD_ADDR\n" \
|
||||
"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n" \
|
||||
"\t<ps_rep_mode> - dd; page scan repetition mode [0-2]\n" \
|
||||
"\t<ps_mode> - dd; page scan mode [0-3]\n" \
|
||||
"\t<clock_offset> - xxxx; clock offset [0 - 0xffff]",
|
||||
|
@ -251,7 +251,7 @@ struct hci_command link_policy_commands[] = {
|
||||
&hci_role_discovery
|
||||
},
|
||||
{
|
||||
"switch_role <bdaddr> <role>",
|
||||
"switch_role <BD_ADDR> <role>",
|
||||
"\nThe Switch_Role command is used for a Bluetooth device to switch the\n" \
|
||||
"current role the device is performing for a particular connection with\n" \
|
||||
"another specified Bluetooth device. The BD_ADDR command parameter indicates\n"\
|
||||
@ -259,8 +259,8 @@ struct hci_command link_policy_commands[] = {
|
||||
"the requested new role that the local device performs. Note: the BD_ADDR\n" \
|
||||
"command parameter must specify a Bluetooth device for which a connection\n"
|
||||
"already exists.\n\n" \
|
||||
"\t<bdaddr> - xx:xx:xx:xx:xx:xx; device bdaddr\n" \
|
||||
"\t<role> - dd; role; 0 - Master, 1 - Slave",
|
||||
"\t<BD_ADDR> - xx:xx:xx:xx:xx:xx BD_ADDR or name\n" \
|
||||
"\t<role> - dd; role; 0 - Master, 1 - Slave",
|
||||
&hci_switch_role
|
||||
},
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ option: bdaddr
|
||||
bdaddr: T_BDADDR T_BDADDRSTRING
|
||||
{
|
||||
if (!bt_aton($2, &key->bdaddr)) {
|
||||
syslog(LOG_ERR, "Cound not parse BDADDR " \
|
||||
syslog(LOG_ERR, "Cound not parse BD_ADDR " \
|
||||
"'%s'", $2);
|
||||
exit(1);
|
||||
}
|
||||
@ -134,7 +134,7 @@ key: T_KEY T_HEXSTRING
|
||||
if (key->key != NULL)
|
||||
free(key->key);
|
||||
|
||||
key->key = (u_int8_t *) malloc(NG_HCI_KEY_SIZE);
|
||||
key->key = (uint8_t *) malloc(NG_HCI_KEY_SIZE);
|
||||
if (key->key == NULL) {
|
||||
syslog(LOG_ERR, "Could not allocate new " \
|
||||
"link key");
|
||||
@ -318,7 +318,7 @@ read_keys_file(void)
|
||||
continue;
|
||||
|
||||
if (key->key == NULL) {
|
||||
key->key = (u_int8_t *) malloc(NG_HCI_KEY_SIZE);
|
||||
key->key = (uint8_t *) malloc(NG_HCI_KEY_SIZE);
|
||||
if (key->key == NULL) {
|
||||
syslog(LOG_ERR, "Could not allocate link key");
|
||||
exit(1);
|
||||
|
@ -35,14 +35,14 @@
|
||||
.Nm
|
||||
.Fl c
|
||||
.Op Fl dh
|
||||
.Fl a Ar BD_ADDR
|
||||
.Fl a Ar address
|
||||
.Fl C Ar channel
|
||||
.Fl l Ar label
|
||||
.Fl u Ar N
|
||||
.Nm
|
||||
.Fl s
|
||||
.Op Fl dhS
|
||||
.Op Fl a Ar BD_ADDR
|
||||
.Op Fl a Ar address
|
||||
.Fl C Ar channel
|
||||
.Fl l Ar label
|
||||
.Sh DESCRIPTION
|
||||
@ -92,14 +92,19 @@ the standard serial port thus providing network connectivity to remote clients.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width indent
|
||||
.It Fl a Ar BD_ADDR
|
||||
In the client mode, this required option specifies the remote BD_ADDR of the
|
||||
.It Fl a Ar address
|
||||
In the client mode, this required option specifies the address of the remote
|
||||
RFCOMM server.
|
||||
In the server mode, this option can be used to specify the local
|
||||
BD_ADDR to listen on.
|
||||
address to listen on.
|
||||
By default, server will listen on
|
||||
.Dv ANY
|
||||
address.
|
||||
The address can be specified as BD_ADDR or name.
|
||||
If name was specified then the
|
||||
.Nm
|
||||
utility will attempt to resolve the name via
|
||||
.Xr bt_gethostbyname 3 .
|
||||
.It Fl C Ar channel
|
||||
In both client and server modes, this required option specifies RFCOMM channel
|
||||
to connect to or listen on.
|
||||
@ -312,6 +317,7 @@ If local SDP daemon is not running the
|
||||
utility will exit with error.
|
||||
.Sh SEE ALSO
|
||||
.Xr rfcomm_sppd 1 ,
|
||||
.Xr bluetooth 3 ,
|
||||
.Xr ng_btsocket 4 ,
|
||||
.Xr ppp 8 ,
|
||||
.Xr sdpcontrol 8 ,
|
||||
|
@ -434,7 +434,7 @@ usage(void)
|
||||
fprintf(stdout,
|
||||
"Usage: %s options\n" \
|
||||
"Where options are:\n" \
|
||||
"\t-a bdaddr BDADDR to listen on or connect to (required for client)\n" \
|
||||
"\t-a address Address to listen on or connect to (required for client)\n" \
|
||||
"\t-c Act as a clinet (default)\n" \
|
||||
"\t-C channel RFCOMM channel to listen on or connect to (required)\n" \
|
||||
"\t-d Run in foreground\n" \
|
||||
|
@ -35,7 +35,7 @@
|
||||
.Nm
|
||||
.Fl h
|
||||
.Nm
|
||||
.Fl a Ar BD_ADDR
|
||||
.Fl a Ar address
|
||||
.Ar command
|
||||
.Op Ar parameters ...
|
||||
.Nm
|
||||
@ -47,7 +47,7 @@
|
||||
The
|
||||
.Nm
|
||||
utility attempts to query specified Service Discovery Protocol (SDP) server.
|
||||
Remote SDP servers are identified by their BD_ADDRs.
|
||||
Remote SDP servers are identified by their address.
|
||||
Connection to the local SDP server is made via control socket.
|
||||
The
|
||||
.Nm
|
||||
@ -56,10 +56,13 @@ the standard output and error messages to the standard error.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width indent
|
||||
.It Fl a Ar BD_ADDR
|
||||
Connect to the remote device with the specified BD_ADDR.
|
||||
Example:
|
||||
.Fl a Li 00:01:02:03:04:05 .
|
||||
.It Fl a Ar address
|
||||
Connect to the remote device with the specified address.
|
||||
The address can be specified as BD_ADDR or name.
|
||||
If name was specified then the
|
||||
.Nm
|
||||
utility will attempt to resolve the name via
|
||||
.Xr bt_gethostbyname 3 .
|
||||
.It Fl c Ar path
|
||||
Specify path to the control socket.
|
||||
The default path is
|
||||
@ -109,6 +112,7 @@ Bluetooth Profile Descriptor List
|
||||
.Sh DIAGNOSTICS
|
||||
.Ex -std
|
||||
.Sh SEE ALSO
|
||||
.Xr bluetooth 3 ,
|
||||
.Xr sdp 3
|
||||
.Sh AUTHORS
|
||||
.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
|
||||
|
@ -209,7 +209,7 @@ usage(void)
|
||||
fprintf(stderr,
|
||||
"Usage: sdpcontrol options command\n" \
|
||||
"Where options are:\n"
|
||||
" -a bdaddr specify bdaddr\n" \
|
||||
" -a address address to connect to\n" \
|
||||
" -c path path to the control socket (default is %s)\n" \
|
||||
" -h display usage and quit\n" \
|
||||
" -l connect to the local SDP server via control socket\n" \
|
||||
|
Loading…
Reference in New Issue
Block a user