2002-11-20 23:01:59 +00:00
|
|
|
.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
|
|
|
|
.\" All rights reserved.
|
2003-05-20 21:01:21 +00:00
|
|
|
.\"
|
2002-11-20 23:01:59 +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
|
|
|
.\"
|
2002-11-20 23:01:59 +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: hccontrol.8,v 1.6 2003/08/06 21:26:38 max Exp $
|
2002-11-20 23:01:59 +00:00
|
|
|
.\" $FreeBSD$
|
2003-05-20 21:01:21 +00:00
|
|
|
.\"
|
2020-05-11 15:32:32 +00:00
|
|
|
.Dd May 3, 2020
|
2002-11-20 23:01:59 +00:00
|
|
|
.Dt HCCONTROL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm hccontrol
|
2015-02-07 14:31:51 +00:00
|
|
|
.Nd Bluetooth HCI configuration utility
|
2002-11-20 23:01:59 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2003-10-12 22:04:24 +00:00
|
|
|
.Op Fl hN
|
2006-05-22 17:58:19 +00:00
|
|
|
.Op Fl n Ar HCI_node_name
|
2003-05-20 21:01:21 +00:00
|
|
|
.Ar command
|
2002-11-20 23:01:59 +00:00
|
|
|
.Op Ar parameters ...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility connects to the specified Netgraph node of type
|
2003-05-20 21:01:21 +00:00
|
|
|
.Dv HCI
|
2006-05-22 17:58:19 +00:00
|
|
|
or the first one found if none is specified and attempts to send the specified
|
|
|
|
command to the HCI Netgraph node or to the associated Bluetooth device.
|
2003-05-20 21:01:21 +00:00
|
|
|
The
|
2002-11-20 23:01:59 +00:00
|
|
|
.Nm
|
2003-05-20 21:01:21 +00:00
|
|
|
utility will print results to the standard output and error messages to
|
2002-11-20 23:01:59 +00:00
|
|
|
the standard error.
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width indent
|
2003-05-10 21:50:37 +00:00
|
|
|
.It Fl h
|
|
|
|
Display usage message and exit.
|
2003-10-12 22:04:24 +00:00
|
|
|
.It Fl N
|
|
|
|
Show Bluetooth addresses as numbers.
|
|
|
|
Normally
|
|
|
|
.Nm
|
|
|
|
attempts to resolve Bluetooth addresses, and display them symbolically.
|
2003-05-20 21:01:21 +00:00
|
|
|
.It Fl n Ar HCI_node_name
|
|
|
|
Connect to the specified HCI Netgraph node.
|
|
|
|
.It Ar command
|
|
|
|
One of the supported commands (see below).
|
2006-05-22 17:58:19 +00:00
|
|
|
The special command
|
2003-05-20 21:01:21 +00:00
|
|
|
.Cm help
|
|
|
|
can be used to obtain the list of all supported commands.
|
2006-05-22 17:58:19 +00:00
|
|
|
To get more information about a specific command use
|
2003-05-20 21:01:21 +00:00
|
|
|
.Cm help Ar command .
|
|
|
|
.It Ar parameters
|
2002-11-20 23:01:59 +00:00
|
|
|
One or more optional space separated command parameters.
|
2006-05-22 17:58:19 +00:00
|
|
|
Many commands require a remote device address as one of the parameters.
|
|
|
|
The remote device address can be specified as BD_ADDR or a name.
|
|
|
|
If a name was specified then the
|
2004-08-05 16:32:41 +00:00
|
|
|
.Nm
|
|
|
|
utility will attempt to resolve the name via
|
|
|
|
.Xr bt_gethostbyname 3 .
|
2002-11-20 23:01:59 +00:00
|
|
|
.El
|
|
|
|
.Sh COMMANDS
|
|
|
|
The currently supported HCI commands in
|
|
|
|
.Nm
|
|
|
|
are:
|
|
|
|
.Pp
|
2012-06-03 06:57:47 +00:00
|
|
|
.Bl -tag -width 40n -offset indent -compact
|
2003-05-20 21:01:21 +00:00
|
|
|
.It Cm Inquiry
|
|
|
|
.It Cm Create_Connection
|
|
|
|
.It Cm Disconnect
|
|
|
|
.It Cm Add_SCO_Connection
|
|
|
|
.It Cm Change_Connection_Packet_Type
|
|
|
|
.It Cm Remote_Name_Request
|
|
|
|
.It Cm Read_Remote_Supported_Features
|
|
|
|
.It Cm Read_Remote_Version_Information
|
|
|
|
.It Cm Read_Clock_Offset
|
|
|
|
.It Cm Role_Discovery
|
|
|
|
.It Cm Switch_Role
|
|
|
|
.It Cm Read_Link_Policy_Settings
|
|
|
|
.It Cm Write_Link_Policy_Settings
|
|
|
|
.It Cm Reset
|
|
|
|
.It Cm Read_Pin_Type
|
|
|
|
.It Cm Write_Pin_Type
|
|
|
|
.It Cm Read_Stored_Link_Key
|
|
|
|
.It Cm Write_Stored_Link_Key
|
|
|
|
.It Cm Delete_Stored_Link_Key
|
|
|
|
.It Cm Change_Local_Name
|
|
|
|
.It Cm Read_Local_Name
|
|
|
|
.It Cm Read_Connection_Accept_Timeout
|
|
|
|
.It Cm Write_Connection_Accept_Timeout
|
|
|
|
.It Cm Read_Page_Timeout
|
|
|
|
.It Cm Write_Page_Timeout
|
|
|
|
.It Cm Read_Scan_Enable
|
|
|
|
.It Cm Write_Scan_Enable
|
|
|
|
.It Cm Read_Page_Scan_Activity
|
|
|
|
.It Cm Write_Page_Scan_Activity
|
|
|
|
.It Cm Read_Inquiry_Scan_Activity
|
|
|
|
.It Cm Write_Inquiry_Scan_Activity
|
|
|
|
.It Cm Read_Authentication_Enable
|
|
|
|
.It Cm Write_Authentication_Enable
|
|
|
|
.It Cm Read_Encryption_Mode
|
|
|
|
.It Cm Write_Encryption_Mode
|
|
|
|
.It Cm Read_Class_Of_Device
|
|
|
|
.It Cm Write_Class_Of_Device
|
|
|
|
.It Cm Read_Voice_Settings
|
|
|
|
.It Cm Write_Voice_Settings
|
|
|
|
.It Cm Read_Number_Broadcast_Retransmissions
|
|
|
|
.It Cm Write_Number_Broadcast_Retransmissions
|
|
|
|
.It Cm Read_Hold_Mode_Activity
|
|
|
|
.It Cm Write_Hold_Mode_Activity
|
|
|
|
.It Cm Read_SCO_Flow_Control_Enable
|
|
|
|
.It Cm Write_SCO_Flow_Control_Enable
|
|
|
|
.It Cm Read_Link_Supervision_Timeout
|
|
|
|
.It Cm Write_Link_Supervision_Timeout
|
2003-10-12 22:04:24 +00:00
|
|
|
.It Cm Read_Page_Scan_Period_Mode
|
|
|
|
.It Cm Write_Page_Scan_Period_Mode
|
|
|
|
.It Cm Read_Page_Scan_Mode
|
|
|
|
.It Cm Write_Page_Scan_Mode
|
2020-04-24 08:07:59 +00:00
|
|
|
.It Cm Read_LE_Host_Support
|
|
|
|
.It Cm Write_LE_Host_Support
|
2003-05-20 21:01:21 +00:00
|
|
|
.It Cm Read_Local_Version_Information
|
2020-04-22 14:38:39 +00:00
|
|
|
.It Cm Read_Local_Supported_Commands
|
2003-05-20 21:01:21 +00:00
|
|
|
.It Cm Read_Local_Supported_Features
|
|
|
|
.It Cm Read_Buffer_Size
|
|
|
|
.It Cm Read_Country_Code
|
|
|
|
.It Cm Read_BD_ADDR
|
|
|
|
.It Cm Read_Failed_Contact_Counter
|
|
|
|
.It Cm Reset_Failed_Contact_Counter
|
|
|
|
.It Cm Get_Link_Quality
|
|
|
|
.It Cm Read_RSSI
|
2020-05-08 01:19:29 +00:00
|
|
|
.It Cm LE_Enable
|
2020-04-24 08:07:59 +00:00
|
|
|
.It Cm LE_Read_Local_Supported_Features
|
|
|
|
.It Cm LE_Set_Advertising_Parameters
|
|
|
|
.It Cm LE_Read_Advertising_Physical_Channel_Tx_Power
|
|
|
|
.It Cm LE_Set_Advertising_Data
|
|
|
|
.It Cm LE_Set_Scan_Response_Data
|
|
|
|
.It Cm LE_Set_Advertising_Enable
|
|
|
|
.It Cm LE_Set_Scan_Parameters
|
|
|
|
.It Cm LE_Set_Scan_Enable
|
|
|
|
.It Cm LE_Read_Supported_States
|
2020-04-28 16:00:34 +00:00
|
|
|
.It Cm LE_Read_Buffer_Size
|
2020-05-11 15:32:32 +00:00
|
|
|
.It Cm LE Scan
|
2020-05-19 13:44:32 +00:00
|
|
|
.It Cm LE_Read_White_List_Size
|
|
|
|
.It Cm LE_Clear_White_List
|
|
|
|
.It Cm LE_Add_Device_To_White_List
|
|
|
|
.It Cm LE_Remove_Device_From_White_List
|
2020-05-26 15:46:18 +00:00
|
|
|
.It Cm LE_Connect
|
2020-06-10 05:01:00 +00:00
|
|
|
.It Cm LE_Read_Channel_Map
|
|
|
|
.It Cm LE_Read_Remote_Features
|
2020-07-08 03:57:47 +00:00
|
|
|
.It Cm LE_Rand
|
2003-05-20 21:01:21 +00:00
|
|
|
.El
|
2002-11-20 23:01:59 +00:00
|
|
|
.Pp
|
|
|
|
The currently supported node commands in
|
|
|
|
.Nm
|
|
|
|
are:
|
|
|
|
.Pp
|
2012-06-03 06:57:47 +00:00
|
|
|
.Bl -tag -width 40n -offset indent -compact
|
2003-05-20 21:01:21 +00:00
|
|
|
.It Cm Read_Node_State
|
|
|
|
.It Cm Initialize
|
|
|
|
.It Cm Read_Debug_Level
|
|
|
|
.It Cm Write_Debug_Level
|
|
|
|
.It Cm Read_Node_Buffer_Size
|
|
|
|
.It Cm Read_Node_BD_ADDR
|
|
|
|
.It Cm Read_Node_Features
|
|
|
|
.It Cm Read_Node_Stat
|
|
|
|
.It Cm Reset_Node_Stat
|
|
|
|
.It Cm Flush_Neighbor_Cache
|
|
|
|
.It Cm Read_Neighbor_Cache
|
|
|
|
.It Cm Read_Connection_List
|
|
|
|
.It Cm Read_Node_Link_Policy_Settings_Mask
|
|
|
|
.It Cm Write_Node_Link_Policy_Settings_Mask
|
|
|
|
.It Cm Read_Node_Packet_Mask
|
|
|
|
.It Cm Write_Node_Packet_Mask
|
|
|
|
.It Cm Read_Node_Role_Switch
|
|
|
|
.It Cm Write_Node_Role_Switch
|
2006-05-22 17:58:19 +00:00
|
|
|
.It Cm Read_Node_List
|
2003-05-20 21:01:21 +00:00
|
|
|
.El
|
2020-04-24 08:07:59 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
Make the blutooth LE host, ubt0hci, scannable through
|
|
|
|
.Xr hccontrol 8 commands:
|
|
|
|
.Pp
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
hccontrol -n ubt0hci le_set_advertising_enable disable
|
|
|
|
hccontrol -n ubt0hci le_set_advertising_param
|
|
|
|
hccontrol -n ubt0hci le_read_advertising_channel_tx_power
|
|
|
|
hccontrol -n ubt0hci le_set_advertising_data
|
|
|
|
hccontrol -n ubt0hci le_set_scan_response -n FBSD_Host
|
|
|
|
hccontrol -n ubt0hci le_set_advertising_enable enable
|
|
|
|
.Ed
|
2005-01-17 07:44:44 +00:00
|
|
|
.Sh EXIT STATUS
|
2002-11-20 23:01:59 +00:00
|
|
|
.Ex -std
|
|
|
|
.Sh SEE ALSO
|
2004-08-05 16:32:41 +00:00
|
|
|
.Xr bluetooth 3 ,
|
2002-11-20 23:01:59 +00:00
|
|
|
.Xr netgraph 3 ,
|
|
|
|
.Xr netgraph 4 ,
|
|
|
|
.Xr ng_hci 4 ,
|
|
|
|
.Xr hcseriald 8
|
|
|
|
.Sh AUTHORS
|
2014-06-20 09:57:27 +00:00
|
|
|
.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com
|
2005-01-18 20:02:45 +00:00
|
|
|
.Sh BUGS
|
|
|
|
Most likely.
|
|
|
|
Please report if found.
|