Index: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 =================================================================== --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 (revision 368812) +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 (revision 368813) @@ -1,111 +1,113 @@ .\" Copyright (c) 2019 Dirk Engling .\" 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. .\" .\" $FreeBSD$ .\" .Dd January 7, 2019 .Dt BLUETOOTH-CONFIG 8 .Os .Sh NAME .Nm bluetooth-config .Nd a script to manage config files for the bluetooth sub system .Sh SYNOPSIS .Nm .Ar scan .Op Fl d Ar device .Op Fl n Ar node .Sh DESCRIPTION The .Nm utility is an interactive script to provide a frontend to the complex bluetooth sub system daemons. .Pp The following options are available: .Bl -tag -width indent+ .It Fl d Scan for a specific bluetooth device address. .It Fl n -Limit scan to a specific host controller. Hint: List all netgraph nodes with +Limit scan to a specific host controller. +Hint: List all netgraph nodes with .Ql /usr/sbin/ngctl list . .El .Pp .Nm will help finding and setting up bluetooth controllers, scan for nearby bluetooth devices in pairing mode, lookup their names, allow mapping to friendly names in .Pa /etc/bluetooth/hosts , ask for the paring PIN, instrument .Xr hcsecd 8 to securely pair with new devices and, if the device offers HID endpoints such as mice or keyboards, configure and restart .Xr bthidd 8 . .Pp .Nm can bring up any interface and daemon necessary for operation and, if a node is provided on command line, will do so automatically for that interface. -.Sh CAVEATS -.Nm -can not parse entries in -.Xr hcsecd 8 -config file and thus will ask the user to manually modify existing pairing PIN entries. .Sh FILES .Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact .It Pa /etc/bluetooth/hosts .It Pa sysrc -n bthidd_config .It Pa sysrc -n hcsecd_config .El .Sh EXAMPLES .Nm scan -n ubt0 -a 00:26:bb:7a:58:95 .Bd -ragged -offset indent This will scan the bluetooth controller ubt0hci for a bluetooth device with the address 00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the -new device. Since in this example a mouse is paired, +new device. +Since in this example a mouse is paired, .Nm will interact with .Xr bthidd 8 , enabling it if necessary and then write an HID descriptor to its config. .Ed .Pp .Nm scan .Bd -ragged -offset indent This will scan all bluetooth controllers on the systems for bluetooth devices, prompting to bring up controllers or daemons along the way. .Ed .Sh SEE ALSO +.Xr bthost 1 , .Xr bthidcontrol 8 , .Xr bthidd 8 , -.Xr bthost 1 , .Xr hccontrol 8 , .Xr hcsecd 8 , .Xr sdpcontrol 8 , .Xr sysrc 8 .Sh HISTORY A .Nm utility first appeared in .Fx 12.1 . .Sh AUTHORS .An Dirk Engling Aq Mt erdgeist@erdgeist.org +.Sh CAVEATS +.Nm +can not parse entries in +.Xr hcsecd 8 +config file and thus will ask the user to manually modify existing pairing PIN entries. .Sh THANKS TO Lars Engels and Warren Block for suggestions, help, and testing. Index: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 =================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.8 (revision 368812) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8 (revision 368813) @@ -1,219 +1,218 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: hccontrol.8,v 1.6 2003/08/06 21:26:38 max Exp $ .\" $FreeBSD$ .\" .Dd May 3, 2020 .Dt HCCONTROL 8 .Os .Sh NAME .Nm hccontrol .Nd Bluetooth HCI configuration utility .Sh SYNOPSIS .Nm .Op Fl hN .Op Fl n Ar HCI_node_name .Ar command .Op Ar parameters ... .Sh DESCRIPTION The .Nm utility connects to the specified Netgraph node of type .Dv HCI 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. The .Nm utility will print results to the standard output and error messages to the standard error. .Pp The options are as follows: .Bl -tag -width indent .It Fl h Display usage message and exit. .It Fl N Show Bluetooth addresses as numbers. Normally .Nm attempts to resolve Bluetooth addresses, and display them symbolically. .It Fl n Ar HCI_node_name Connect to the specified HCI Netgraph node. .It Ar command One of the supported commands (see below). The special command .Cm help can be used to obtain the list of all supported commands. To get more information about a specific command use .Cm help Ar command . .It Ar parameters One or more optional space separated command parameters. 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 .Nm utility will attempt to resolve the name via .Xr bt_gethostbyname 3 . .El .Sh COMMANDS The currently supported HCI commands in .Nm are: .Pp .Bl -tag -width 40n -offset indent -compact .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 .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 .It Cm Read_LE_Host_Support .It Cm Write_LE_Host_Support .It Cm Read_Local_Version_Information .It Cm Read_Local_Supported_Commands .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 .It Cm LE_Enable .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_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 .It Cm LE_Read_Buffer_Size .It Cm LE Scan .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 .It Cm LE_Connect .It Cm LE_Read_Channel_Map .It Cm LE_Read_Remote_Features .It Cm LE_Rand .El .Pp The currently supported node commands in .Nm are: .Pp .Bl -tag -width 40n -offset indent -compact .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 .It Cm Read_Node_List .El +.Sh EXIT STATUS +.Ex -std .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 -.Sh EXIT STATUS -.Ex -std .Sh SEE ALSO .Xr bluetooth 3 , .Xr netgraph 3 , .Xr netgraph 4 , .Xr ng_hci 4 , .Xr hcseriald 8 .Sh AUTHORS .An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Most likely. Please report if found. Index: head/usr.sbin/bluetooth/hcseriald/hcseriald.8 =================================================================== --- head/usr.sbin/bluetooth/hcseriald/hcseriald.8 (revision 368812) +++ head/usr.sbin/bluetooth/hcseriald/hcseriald.8 (revision 368813) @@ -1,86 +1,86 @@ .\" Copyright (c) 2001-2002 Maksim Yevmenkin .\" 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. .\" .\" $Id: hcseriald.8,v 1.3 2003/05/21 00:47:26 max Exp $ .\" $FreeBSD$ .\" .Dd June 14, 2002 .Dt HCSERIALD 8 .Os .Sh NAME .Nm hcseriald .Nd supervise serial Bluetooth devices .Sh SYNOPSIS .Nm .Op Fl dh .Fl f Ar device .Fl n Ar node_name .Op Fl s Ar speed .Sh DESCRIPTION The .Nm utility handles serial Bluetooth devices. It does one simple thing: it opens the specified serial device, sets the device parameters, and pushes the .Dv H4 line discipline. .Pp The options are as follows: .Bl -tag -width indent .It Fl d Do not disassociate from the controlling terminal, i.e., run in foreground. .It Fl f Ar device Callout device name. Example: .Fl f Pa /dev/cuau0 . .It Fl h Display usage message and exit. .It Fl n Ar node_name Set H4 Netgraph node name. Example: .Fl n Li sio0 . .It Fl s Ar speed Set serial device speed to .Ar speed . Example: .Fl s Li 115200 . .El .Sh FILES .Bl -tag -width ".Pa /var/run/hcserial. Ns Ar * Ns Pa .pid" -compact -.It Pa /var/run/hcserial. Ns Ar * Ns Pa .pid +.It Pa /var/run/hcserial . Ns Ar * Ns Pa .pid Process ID of the currently running .Nm daemon. Where .Ar * is an H4 Netgraph node name. .El .Sh SEE ALSO .Xr ng_h4 4 , .Xr ng_hci 4 , .Xr tty 4 , .Xr hccontrol 8 .Sh AUTHORS .An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com Index: head/usr.sbin/bluetooth/sdpd/sdpd.8 =================================================================== --- head/usr.sbin/bluetooth/sdpd/sdpd.8 (revision 368812) +++ head/usr.sbin/bluetooth/sdpd/sdpd.8 (revision 368813) @@ -1,140 +1,140 @@ .\" Copyright (c) 2004 Maksim Yevmenkin .\" 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. .\" .\" $Id: sdpd.8,v 1.1 2004/01/13 19:31:54 max Exp $ .\" $FreeBSD$ .\" .Dd January 13, 2004 .Dt SDPD 8 .Os .Sh NAME .Nm sdpd .Nd Bluetooth Service Discovery Protocol daemon .Sh SYNOPSIS .Nm .Op Fl dh .Op Fl c Ar path .Op Fl g Ar group .Op Fl u Ar user .Sh DESCRIPTION The .Nm daemon keeps track of the Bluetooth services registered on the host and responds to Service Discovery inquiries from the remote Bluetooth devices. .Pp In order to use any service remote Bluetooth device need to send Service Search and Service Attribute or Service Search Attribute request over Bluetooth L2CAP connection on SDP PSM (0x0001). The .Nm daemon will try to find matching Service Record in its Service Database and will send appropriate response back. The remote device then will process the response, extract all required information and will make a separate connection in order to use the service. .Pp Bluetooth applications, running on the host, register services with the local .Nm daemon. Operation like service registration, service removal and service change are performed over the control socket. It is possible to query entire content of the .Nm Service Database with .Xr sdpcontrol 8 by issuing .Cm browse command on the control socket. .Pp The command line options are as follows: .Bl -tag -width indent .It Fl d Do not detach from the controlling terminal. .It Fl c Ar path Specify path to the control socket. The default path is .Pa /var/run/sdp . .It Fl g Ar group Specifies the group the .Nm should run as after it initializes. The value specified may be either a group name or a numeric group ID. This only works if .Nm was started as root. The default group name is .Dq Li nobody . .It Fl h Display usage message and exit. .It Fl u Ar user Specifies the user the .Nm should run as after it initializes. The value specified may be either a user name or a numeric user ID. This only works if .Nm was started as root. The default user name is .Dq Li nobody . .El -.Sh CAVEAT +.Sh FILES +.Bl -tag -width ".Pa /var/run/sdp" -compact +.It Pa /var/run/sdp +.El +.Sh SEE ALSO +.Xr sdp 3 , +.Xr sdpcontrol 8 +.Sh AUTHORS +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com +.Sh CAVEATS The .Nm daemon will listen for incoming L2CAP connections on a wildcard BD_ADDR. .Pp In case of multiple Bluetooth devices connected to the same host it is possible to specify which services should be .Dq bound to which Bluetooth device. Such assignment should be done at service registration time. .Pp Requests to register, remove or change service can only be made via the control socket. The .Nm daemon will check peer's credentials and will only accept the request if the application has the same effective user ID as the .Dq Li root user ID. .Pp The .Nm daemon does not check for duplicated Service Records. It only performs minimal checking on the service data sent in the Service Register request. It is assumed that application must obtain all required resources such as RFCOMM channels etc., before registering the service. -.Sh FILES -.Bl -tag -width ".Pa /var/run/sdp" -compact -.It Pa /var/run/sdp -.El -.Sh SEE ALSO -.Xr sdp 3 , -.Xr sdpcontrol 8 -.Sh AUTHORS -.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Most likely. Please report if found.