xref: /freebsd/share/man/man4/ng_hci.4 (revision f2bb1cae36283a8eb5a0f19d8612c6abc5148e8f)
1f2bb1caeSJulian Elischer.\" ng_hci.4
2f2bb1caeSJulian Elischer.\"
3878ed226SJulian Elischer.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
4878ed226SJulian Elischer.\" All rights reserved.
5878ed226SJulian Elischer.\"
6878ed226SJulian Elischer.\" Redistribution and use in source and binary forms, with or without
7878ed226SJulian Elischer.\" modification, are permitted provided that the following conditions
8878ed226SJulian Elischer.\" are met:
9878ed226SJulian Elischer.\" 1. Redistributions of source code must retain the above copyright
10878ed226SJulian Elischer.\"    notice, this list of conditions and the following disclaimer.
11878ed226SJulian Elischer.\" 2. Redistributions in binary form must reproduce the above copyright
12878ed226SJulian Elischer.\"    notice, this list of conditions and the following disclaimer in the
13878ed226SJulian Elischer.\"    documentation and/or other materials provided with the distribution.
14878ed226SJulian Elischer.\"
15878ed226SJulian Elischer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16878ed226SJulian Elischer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17878ed226SJulian Elischer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18878ed226SJulian Elischer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19878ed226SJulian Elischer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20878ed226SJulian Elischer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21878ed226SJulian Elischer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22878ed226SJulian Elischer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23878ed226SJulian Elischer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24878ed226SJulian Elischer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25878ed226SJulian Elischer.\" SUCH DAMAGE.
26878ed226SJulian Elischer.\"
27f2bb1caeSJulian Elischer.\" $Id: ng_hci.4,v 1.2 2003/03/18 00:09:34 max Exp $
28878ed226SJulian Elischer.\" $FreeBSD$
29878ed226SJulian Elischer.Dd June 25, 2002
30878ed226SJulian Elischer.Dt NG_HCI 4
31878ed226SJulian Elischer.Os
32878ed226SJulian Elischer.Sh NAME
33f2bb1caeSJulian Elischer.Nm hci
34878ed226SJulian Elischer.Nd Netgraph node type that is also a Bluetooth Host Controller Interface
35878ed226SJulian Elischer(HCI) layer
36878ed226SJulian Elischer.Sh SYNOPSIS
37878ed226SJulian Elischer.In sys/types.h
38878ed226SJulian Elischer.In netgraph/ng_message.h
39878ed226SJulian Elischer.In netgraph/netgraph.h
40878ed226SJulian Elischer.In netgraph/ng_hci.h
41878ed226SJulian Elischer.Sh DESCRIPTION
42878ed226SJulian ElischerThe
43f2bb1caeSJulian Elischer.Nm
44878ed226SJulian Elischernode type is a Netgraph node type that implements Bluetooth Host Controller
45878ed226SJulian ElischerInterface (HCI) layer as per chapter H1 of the Bluetooth Specification Book
46878ed226SJulian Elischerv1.1.
47878ed226SJulian Elischer.Sh INTRODUCTION TO BLUETOOTH
48878ed226SJulian ElischerBluetooth is a short-range radio link intended to replace the cable(s)
49f2bb1caeSJulian Elischerconnecting portable and/or fixed electronic devices. Bluetooth operates
50f2bb1caeSJulian Elischerin the unlicensed ISM band at 2.4 GHz. The Bluetooth protocol uses a
51f2bb1caeSJulian Elischercombination of circuit and packet switching. Bluetooth can support an
52878ed226SJulian Elischerasynchronous data channel, up to three simultaneous synchronous voice
53878ed226SJulian Elischerchannels, or a channel which simultaneously supports asynchronous data
54f2bb1caeSJulian Elischerand synchronous voice. Each voice channel supports a 64 kb/s synchronous
55f2bb1caeSJulian Elischer(voice) channel in each direction. The asynchronous channel can support
56878ed226SJulian Elischermaximal 723.2 kb/s asymmetric (and still up to 57.6 kb/s in the return
57878ed226SJulian Elischerdirection), or 433.9 kb/s symmetric.
58878ed226SJulian Elischer.Pp
59878ed226SJulian ElischerThe Bluetooth system provides a point-to-point connection (only two
60f2bb1caeSJulian ElischerBluetooth units involved), or a point-to-multipoint connection. In the
61f2bb1caeSJulian Elischerpoint-to-multipoint connection, the channel is shared among several
62f2bb1caeSJulian ElischerBluetooth units. Two or more units sharing the same channel form a
63f2bb1caeSJulian Elischer.Em piconet .
64878ed226SJulian ElischerOne Bluetooth unit acts as the master of the piconet, whereas the other
65f2bb1caeSJulian Elischerunit(s) acts as slave(s). Up to seven slaves can be active in the piconet.
66878ed226SJulian ElischerIn addition, many more slaves can remain locked to the master in a so-called
67f2bb1caeSJulian Elischerparked state. These parked slaves cannot be active on the channel, but remain
68f2bb1caeSJulian Elischersynchronized to the master. Both for active and parked slaves, the channel
69878ed226SJulian Elischeraccess is controlled by the master.
70878ed226SJulian Elischer.Pp
71878ed226SJulian ElischerMultiple piconets with overlapping coverage areas form a
72f2bb1caeSJulian Elischer.Em scatternet .
73f2bb1caeSJulian ElischerEach piconet can only have a single master. However, slaves can participate
74f2bb1caeSJulian Elischerin different piconets on a time-division multiplex basis. In addition, a
75f2bb1caeSJulian Elischermaster in one piconet can be a slave in another piconet. The piconets shall
76f2bb1caeSJulian Elischernot be frequency-synchronized. Each piconet has its own hopping channel.
77f2bb1caeSJulian Elischer.Ss Time slots
78f2bb1caeSJulian ElischerThe channel is divided into time slots, each 625 usec in length. The time
79878ed226SJulian Elischerslots are numbered according to the Bluetooth clock of the piconet master.
80878ed226SJulian ElischerThe slot numbering ranges from 0 to 2^27 -1 and is cyclic with a cycle length
81f2bb1caeSJulian Elischerof 2^27. In the time slots, master and slave can transmit packets.
82f2bb1caeSJulian Elischer.Ss SCO link
83878ed226SJulian ElischerThe SCO link is a symmetric, point-to-point link between the master and a
84f2bb1caeSJulian Elischerspecific slave. The SCO link reserves slots and can therefore be considered
85f2bb1caeSJulian Elischeras a circuit-switched connection between the master and the slave. The SCO
86f2bb1caeSJulian Elischerlink typically supports time-bounded information like voice. The master can
87f2bb1caeSJulian Elischersupport up to three SCO links to the same slave or to different slaves. A
88878ed226SJulian Elischerslave can support up to three SCO links from the same master, or two SCO
89f2bb1caeSJulian Elischerlinks if the links originate from different masters. SCO packets are never
90f2bb1caeSJulian Elischerretransmitted.
91f2bb1caeSJulian Elischer.Ss ACL link
92878ed226SJulian ElischerIn the slots not reserved for SCO links, the master can exchange packets
93f2bb1caeSJulian Elischerwith any slave on a per-slot basis. The ACL link provides a packet-switched
94878ed226SJulian Elischerconnection between the master and all active slaves participating in the
95f2bb1caeSJulian Elischerpiconet. Both asynchronous and isochronous services are supported. Between
96f2bb1caeSJulian Elischera master and a slave only a single ACL link can exist. For most ACL packets,
97878ed226SJulian Elischerpacket retransmission is applied to assure data integrity.
98878ed226SJulian Elischer.Sh HOST CONTROLLER INTERFACE (HCI)
99878ed226SJulian ElischerThe HCI provides a command interface to the baseband controller and link
100f2bb1caeSJulian Elischermanager, and access to hardware status and control registers. This interface
101878ed226SJulian Elischerprovides a uniform method of accessing the Bluetooth baseband capabilities.
102878ed226SJulian Elischer.Pp
103878ed226SJulian ElischerThe HCI layer on the Host exchanges data and commands with the HCI firmware
104f2bb1caeSJulian Elischeron the Bluetooth hardware. The Host Controller Transport Layer (i.e. physical
105878ed226SJulian Elischerbus) driver provides both HCI layers with the ability to exchange information
106878ed226SJulian Elischerwith each other.
107878ed226SJulian Elischer.Pp
108878ed226SJulian ElischerThe Host will receive asynchronous notifications of HCI events independent
109f2bb1caeSJulian Elischerof which Host Controller Transport Layer is used. HCI events are used for
110f2bb1caeSJulian Elischernotifying the Host when something occurs. When the Host discovers that an
111878ed226SJulian Elischerevent has occurred it will then parse the received event packet to determine
112878ed226SJulian Elischerwhich event occurred.
113878ed226SJulian ElischerThe next sections specify the HCI packet formats.
114f2bb1caeSJulian Elischer.Ss HCI command packet
115878ed226SJulian Elischer.Bd -literal -offset indent
116878ed226SJulian Elischer#define NG_HCI_CMD_PKT 0x01
117878ed226SJulian Elischertypedef struct {
118878ed226SJulian Elischer        u_int8_t  type;   /* MUST be 0x1 */
119878ed226SJulian Elischer        u_int16_t opcode; /* OpCode */
120878ed226SJulian Elischer        u_int8_t  length; /* parameter(s) length in bytes */
121878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_cmd_pkt_t;
122878ed226SJulian Elischer.Ed
123878ed226SJulian Elischer.Pp
124878ed226SJulian ElischerThe HCI command packet is used to send commands to the Host Controller
125f2bb1caeSJulian Elischerfrom the Host. When the Host Controller completes most of the commands,
126f2bb1caeSJulian Elischera Command Complete event is sent to the Host. Some commands do not receive
127f2bb1caeSJulian Elischera Command Complete event when they have been completed. Instead, when the
128878ed226SJulian ElischerHost Controller receives one of these commands the Host Controller sends
129878ed226SJulian Elischera Command Status event back to the Host when it has begun to execute the
130f2bb1caeSJulian Elischercommand. Later on, when the actions associated with the command have finished,
131878ed226SJulian Elischeran event that is associated with the sent command will be sent by the Host
132878ed226SJulian ElischerController to the Host.
133f2bb1caeSJulian Elischer.Ss HCI event packet
134878ed226SJulian Elischer.Bd -literal -offset indent
135878ed226SJulian Elischer#define NG_HCI_EVENT_PKT 0x04
136878ed226SJulian Elischertypedef struct {
137878ed226SJulian Elischer        u_int8_t type;   /* MUST be 0x4 */
138878ed226SJulian Elischer        u_int8_t event;  /* event */
139878ed226SJulian Elischer        u_int8_t length; /* parameter(s) length in bytes */
140878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_event_pkt_t;
141878ed226SJulian Elischer.Ed
142878ed226SJulian Elischer.Pp
143878ed226SJulian ElischerThe HCI event packet is used by the Host Controller to notify the Host
144878ed226SJulian Elischerwhen events occur.
145f2bb1caeSJulian Elischer.Ss HCI ACL data packet
146878ed226SJulian Elischer.Bd -literal -offset indent
147878ed226SJulian Elischer#define NG_HCI_ACL_DATA_PKT 0x02
148878ed226SJulian Elischertypedef struct {
149878ed226SJulian Elischer        u_int8_t  type;       /* MUST be 0x2 */
150878ed226SJulian Elischer        u_int16_t con_handle; /* connection handle + PB + BC flags */
151878ed226SJulian Elischer        u_int16_t length;     /* payload length in bytes */
152878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_acldata_pkt_t;
153878ed226SJulian Elischer.Ed
154878ed226SJulian Elischer.Pp
155878ed226SJulian ElischerHCI ACL data packets are used to exchange ACL data between the Host and
156878ed226SJulian ElischerHost Controller.
157f2bb1caeSJulian Elischer.Ss HCI SCO data packet
158878ed226SJulian Elischer.Bd -literal -offset indent
159878ed226SJulian Elischer#define NG_HCI_SCO_DATA_PKT 0x03
160878ed226SJulian Elischertypedef struct {
161878ed226SJulian Elischer        u_int8_t  type;       /* MUST be 0x3 */
162878ed226SJulian Elischer        u_int16_t con_handle; /* connection handle + reserved bits */
163878ed226SJulian Elischer        u_int8_t  length;     /* payload length in bytes */
164878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_scodata_pkt_t;
165878ed226SJulian Elischer.Ed
166878ed226SJulian Elischer.Pp
167878ed226SJulian ElischerHCI SCO data packets are used to exchange SCO data between the Host and
168878ed226SJulian ElischerHost Controller.
169878ed226SJulian Elischer.Sh HCI INITIALIZATION
170878ed226SJulian ElischerOn initialization, HCI control application must issue the following HCI
171878ed226SJulian Elischercommands (in any order).
172f2bb1caeSJulian Elischer.Bl -tag -width foobar
173878ed226SJulian Elischer.It Dv Read_BD_ADDR
174878ed226SJulian ElischerTo obtain BD_ADDR of the Bluetooth unit.
175878ed226SJulian Elischer.It Dv Read_Local_Supported_Features
176878ed226SJulian ElischerTo obtain the list of features supported by Bluetooth unit.
177878ed226SJulian Elischer.It Dv Read_Buffer_Size
178878ed226SJulian ElischerTo determine the maximum size of HCI ACL and SCO HCI data packets (excluding
179f2bb1caeSJulian Elischerheader) that can be sent from the Host to the Host Controller. There are also
180878ed226SJulian Elischertwo additional return parameters that specify the total number of HCI ACL and
181878ed226SJulian ElischerSCO data packets that the Host Controller can have waiting for transmission in
182878ed226SJulian Elischerits buffers.
183878ed226SJulian Elischer.El
184878ed226SJulian Elischer.Pp
185f2bb1caeSJulian ElischerAs soon as HCI initialization has been successfuly performed, HCI control
186878ed226SJulian Elischerapplication must turn on
187878ed226SJulian Elischer.Dq inited
188f2bb1caeSJulian Elischerbit for the node. Once HCI node has been initialized all upsteam hooks
189878ed226SJulian Elischerwill receive a
190878ed226SJulian Elischer.Dv NGM_HCI_NODE_UP
191878ed226SJulian ElischerNetgraph message defined as follows.
192878ed226SJulian Elischer.Bd -literal -offset indent
193878ed226SJulian Elischer#define NGM_HCI_NODE_UP 112 /* HCI -> Upper */
194878ed226SJulian Elischertypedef struct {
195878ed226SJulian Elischer        u_int16_t pkt_size; /* max. ACL/SCO packet size (w/o hdr) */
196878ed226SJulian Elischer        u_int16_t num_pkts; /* ACL/SCO packet queue size */
197878ed226SJulian Elischer        u_int16_t reserved; /* place holder */
198878ed226SJulian Elischer        bdaddr_t  bdaddr;   /* bdaddr */
199878ed226SJulian Elischer} ng_hci_node_up_ep;
200878ed226SJulian Elischer.Ed
201878ed226SJulian Elischer.Sh HCI FLOW CONTROL
202878ed226SJulian ElischerHCI layer performs flow control on baseband connection basis (i.e. ACL and
203f2bb1caeSJulian ElischerSCO link). Each baseband connection has
204f2bb1caeSJulian Elischer.Em connection handle
205f2bb1caeSJulian Elischerand queue of outgoing data packets. Upper layers protocols are allowed to
206f2bb1caeSJulian Elischersend up to (
207f2bb1caeSJulian Elischer.Dv num_pkts -
208878ed226SJulian Elischer.Dv pending )
209f2bb1caeSJulian Elischerpackets at one time. HCI layer will send
210878ed226SJulian Elischer.Dv NGM_HCI_SYNC_CON_QUEUE
211878ed226SJulian ElischerNetgraph messages to inform upper layers about current queue state for each
212f2bb1caeSJulian Elischerconnection handle. The
213878ed226SJulian Elischer.Dv NGM_HCI_SYNC_CON_QUEUE
214878ed226SJulian ElischerNetgraph message is defined as follows.
215878ed226SJulian Elischer.Bd -literal -offset indent
216878ed226SJulian Elischer#define NGM_HCI_SYNC_CON_QUEUE 113 /* HCI -> Upper */
217878ed226SJulian Elischertypedef struct {
218878ed226SJulian Elischer        u_int16_t con_handle; /* connection handle */
219878ed226SJulian Elischer        u_int16_t completed;  /* number of completed packets */
220878ed226SJulian Elischer} ng_hci_sync_con_queue_ep;
221878ed226SJulian Elischer.Ed
222878ed226SJulian Elischer.Sh HOOKS
223878ed226SJulian ElischerThis node type supports the following hooks:
224f2bb1caeSJulian Elischer.Pp
225f2bb1caeSJulian Elischer.Bl -tag -width foobar
226878ed226SJulian Elischer.It Dv drv
227f2bb1caeSJulian ElischerBluetooth Host Controller Transport Layer hook. Single HCI packet contained in
228f2bb1caeSJulian Elischersingle
229f2bb1caeSJulian Elischer.Dv mbuf
230878ed226SJulian Elischerstructure.
231878ed226SJulian Elischer.It Dv acl
232f2bb1caeSJulian ElischerUpper layer protocol/node is connected to the hook. Single HCI ACL
233f2bb1caeSJulian Elischerdata packet contained in single
234f2bb1caeSJulian Elischer.Dv mbuf
235878ed226SJulian Elischerstructure.
236878ed226SJulian Elischer.It Dv sco
237f2bb1caeSJulian ElischerUpper layer protocol/node is connected to the hook. Single HCI SCO
238f2bb1caeSJulian Elischerdata packet contained in single
239f2bb1caeSJulian Elischer.Dv mbuf
240878ed226SJulian Elischerstructure.
241878ed226SJulian Elischer.It Dv raw
242f2bb1caeSJulian ElischerRaw hook. Every HCI frame (including HCI command frame) that goes in
243f2bb1caeSJulian Elischeror out will be delivired to the hook. Usually Bluetooth raw HCI sockets
244f2bb1caeSJulian Elischerlayer is connected to the hook. Single HCI frame contained in single
245f2bb1caeSJulian Elischer. Dv mbuf
246878ed226SJulian Elischerstructure.
247878ed226SJulian Elischer.El
248878ed226SJulian Elischer.Sh BLUETOOTH UPPER LAYER PROTOCOLS INTERFACE (LP CONTROL MESSAGES)
249f2bb1caeSJulian Elischer.Bl -tag -width foo
250878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_REQ
251f2bb1caeSJulian ElischerRequests the lower protocol to create a connection. If a physical link
252878ed226SJulian Elischerto the remote device does not exist, this message must be sent to the lower
253878ed226SJulian Elischerprotocol (baseband) to establish the physical connection.
254878ed226SJulian Elischer.It Dv NGM_HCI_LP_DISCON_REQ
255878ed226SJulian ElischerRequests the lower protocol (baseband) to terminate a connection.
256878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_CFM
257878ed226SJulian ElischerConfirms success or failure of the
258f2bb1caeSJulian Elischer.Dv
259f2bb1caeSJulian ElischerNGM_HCI_LP_CON_REQ request to establish a lower layer (baseband) connection.
260878ed226SJulian ElischerThis includes passing the authentication challenge if authentication is
261878ed226SJulian Elischerrequired to establish the physical link.
262878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_IND
263878ed226SJulian ElischerIndicates the lower protocol (baseband) has successfully established
264878ed226SJulian Elischerincoming connection.
265878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_RSP
266878ed226SJulian ElischerA response accepting or rejecting the previous connection indication request.
267878ed226SJulian Elischer.It Dv NGM_HCI_LP_DISCON_IND
268f2bb1caeSJulian ElischerIndicates the lower protocol (baseband) has terminated connection. This
269f2bb1caeSJulian Elischercould be a response to
270878ed226SJulian Elischer.Dv NGM_HCI_LP_DISCON_REQ
271878ed226SJulian Elischeror a timeout event.
272878ed226SJulian Elischer.It Dv NGM_HCI_LP_QOS_REQ
273878ed226SJulian ElischerRequests the lower protocol (baseband) to accommodate a particular QoS
274878ed226SJulian Elischerparameter set.
275878ed226SJulian Elischer.It Dv NGM_HCI_LP_QOS_CFM
276878ed226SJulian ElischerConfirms success or failure of the request for a given quality of service.
277878ed226SJulian Elischer.It Dv NGM_HCI_LP_QOS_IND
278878ed226SJulian ElischerIndicates the lower protocol (baseband) has detected a violation of the QoS
279878ed226SJulian Elischeragreement.
280878ed226SJulian Elischer.El
281878ed226SJulian Elischer.Sh NETGRAPH CONTROL MESSAGES
282878ed226SJulian ElischerThis node type supports the generic control messages, plus the following:
283f2bb1caeSJulian Elischer.Bl -tag -width foo
284878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_STATE
285878ed226SJulian ElischerReturns current state for the node.
286878ed226SJulian Elischer.It Dv NGM_HCI_NODE_INIT
287878ed226SJulian ElischerTurn on
288878ed226SJulian Elischer.Dq inited
289878ed226SJulian Elischerbit for the node.
290878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_DEBUG
291878ed226SJulian ElischerReturns an integer containing the current debug level for the node.
292878ed226SJulian Elischer.It Dv NGM_HCI_NODE_SET_DEBUG
293878ed226SJulian ElischerThis command takes an integer argument and sets current debug level
294878ed226SJulian Elischerfor the node.
295878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_BUFFER
296878ed226SJulian ElischerReturns current state of data buffers.
297878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_BDADDR
298878ed226SJulian ElischerReturns BD_ADDR as cached in the node.
299878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_FEATURES
300878ed226SJulian ElischerReturns the list of features supported by hardware (as cached by the node).
301878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_NEIGHBOR_CACHE
302878ed226SJulian ElischerReturns content of the neighbor cache.
303878ed226SJulian Elischer.It Dv NGM_HCI_NODE_FLUSH_NEIGHBOR_CACHE
304878ed226SJulian ElischerRemove all neighbor cache entries.
305878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_CON_LIST
306878ed226SJulian ElischerReturns list of active baseband connections (i.e. ACL and SCO links).
307878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_STAT
308878ed226SJulian ElischerReturns various statistic counters.
309878ed226SJulian Elischer.It Dv NGM_HCI_NODE_RESET_STAT
310878ed226SJulian ElischerResets all statistic counters to zero.
311878ed226SJulian Elischer.It NGM_HCI_NODE_SET_LINK_POLICY_SETTINGS_MASK
312f2bb1caeSJulian ElischerSets current link policy settings mask. After the new ACL connection is
313f2bb1caeSJulian Elischercreated the HCI node will try set link policy for the ACL connection. By
314f2bb1caeSJulian Elischerdefault every supported Link Manager (LM) mode will be enabled. User can
315878ed226SJulian Elischeroverride this by setting link policy settings mask which specifies LM
316878ed226SJulian Elischermodes to be enabled.
317878ed226SJulian Elischer.It NGM_HCI_NODE_GET_LINK_POLICY_SETTINGS_MASK
318878ed226SJulian ElischerReturns current link policy settings mask.
319878ed226SJulian Elischer.It NGM_HCI_NODE_SET_PACKET_MASK
320f2bb1caeSJulian ElischerSets current packet mask. When new baseband (ACL or SCO) connection is
321878ed226SJulian Elischercreated the HCI node will specify every packet type supported by the device.
322878ed226SJulian ElischerUser can override this by setting packet mask which specifies packet types
323878ed226SJulian Elischerto be used for new baseband connections.
324878ed226SJulian Elischer.It NGM_HCI_NODE_GET_PACKET_MASK
325878ed226SJulian ElischerReturns current packet mask.
326f2bb1caeSJulian Elischer.It NGM_HCI_NODE_SET_ROLE_SWITCH
327f2bb1caeSJulian ElischerSets the value of the role switch. Role switch is enabled when this value is
328f2bb1caeSJulian Elischernot zero. This is the default state. Note that actual role switch at Bluetooth
329f2bb1caeSJulian Elischerlink level will only be perfomed if hardware supports role switch and it was
330f2bb1caeSJulian Elischerenabled.
331f2bb1caeSJulian Elischer.It NGM_HCI_NODE_GET_ROLE_SWITCH
332f2bb1caeSJulian ElischerReturns the value of the role switch for the node.
333878ed226SJulian Elischer.El
334878ed226SJulian Elischer.Sh SHUTDOWN
335f2bb1caeSJulian ElischerThis node shuts down upon receipt of a NGM_SHUTDOWN control message, or
336878ed226SJulian Elischerwhen all hooks have been disconnected.
337878ed226SJulian Elischer.Sh BUGS
338f2bb1caeSJulian ElischerMost likely. Please report if found.
339878ed226SJulian Elischer.Sh SEE ALSO
340878ed226SJulian Elischer.Xr netgraph 4 ,
341f2bb1caeSJulian Elischer.Xr ngctl 8 ,
342f2bb1caeSJulian Elischer.Xr hccontrol 8
343878ed226SJulian Elischer.Sh HISTORY
344878ed226SJulian ElischerThe
345f2bb1caeSJulian Elischer.Nm
346878ed226SJulian Elischernode type was implemented in
347878ed226SJulian Elischer.Fx 5.0 .
348878ed226SJulian Elischer.Sh AUTHORS
349878ed226SJulian Elischer.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
350