xref: /freebsd/share/man/man4/ng_hci.4 (revision 0986ab12e44caea472245845f9a89ced4f137d73)
1878ed226SJulian Elischer.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
2878ed226SJulian Elischer.\" All rights reserved.
3878ed226SJulian Elischer.\"
4878ed226SJulian Elischer.\" Redistribution and use in source and binary forms, with or without
5878ed226SJulian Elischer.\" modification, are permitted provided that the following conditions
6878ed226SJulian Elischer.\" are met:
7878ed226SJulian Elischer.\" 1. Redistributions of source code must retain the above copyright
8878ed226SJulian Elischer.\"    notice, this list of conditions and the following disclaimer.
9878ed226SJulian Elischer.\" 2. Redistributions in binary form must reproduce the above copyright
10878ed226SJulian Elischer.\"    notice, this list of conditions and the following disclaimer in the
11878ed226SJulian Elischer.\"    documentation and/or other materials provided with the distribution.
12878ed226SJulian Elischer.\"
13878ed226SJulian Elischer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14878ed226SJulian Elischer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15878ed226SJulian Elischer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16878ed226SJulian Elischer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17878ed226SJulian Elischer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18878ed226SJulian Elischer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19878ed226SJulian Elischer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20878ed226SJulian Elischer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21878ed226SJulian Elischer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22878ed226SJulian Elischer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23878ed226SJulian Elischer.\" SUCH DAMAGE.
24878ed226SJulian Elischer.\"
250986ab12SMaksim Yevmenkin.\" $Id: ng_hci.4,v 1.3 2003/05/21 19:37:35 max Exp $
26878ed226SJulian Elischer.\" $FreeBSD$
2772f00208SRuslan Ermilov.\"
28878ed226SJulian Elischer.Dd June 25, 2002
29878ed226SJulian Elischer.Dt NG_HCI 4
30878ed226SJulian Elischer.Os
31878ed226SJulian Elischer.Sh NAME
3272f00208SRuslan Ermilov.Nm ng_hci
33878ed226SJulian Elischer.Nd Netgraph node type that is also a Bluetooth Host Controller Interface
34878ed226SJulian Elischer(HCI) layer
35878ed226SJulian Elischer.Sh SYNOPSIS
36878ed226SJulian Elischer.In sys/types.h
37878ed226SJulian Elischer.In netgraph/ng_message.h
38878ed226SJulian Elischer.In netgraph/netgraph.h
39878ed226SJulian Elischer.In netgraph/ng_hci.h
40878ed226SJulian Elischer.Sh DESCRIPTION
41878ed226SJulian ElischerThe
4272f00208SRuslan Ermilov.Nm hci
43878ed226SJulian Elischernode type is a Netgraph node type that implements Bluetooth Host Controller
44878ed226SJulian ElischerInterface (HCI) layer as per chapter H1 of the Bluetooth Specification Book
45878ed226SJulian Elischerv1.1.
46878ed226SJulian Elischer.Sh INTRODUCTION TO BLUETOOTH
47878ed226SJulian ElischerBluetooth is a short-range radio link intended to replace the cable(s)
4872f00208SRuslan Ermilovconnecting portable and/or fixed electronic devices.
4972f00208SRuslan ErmilovBluetooth operates in the unlicensed ISM band at 2.4 GHz.
5072f00208SRuslan ErmilovThe Bluetooth protocol uses a
5172f00208SRuslan Ermilovcombination of circuit and packet switching.
5272f00208SRuslan ErmilovBluetooth can support an
53878ed226SJulian Elischerasynchronous data channel, up to three simultaneous synchronous voice
54878ed226SJulian Elischerchannels, or a channel which simultaneously supports asynchronous data
5572f00208SRuslan Ermilovand synchronous voice.
5672f00208SRuslan ErmilovEach voice channel supports a 64 kb/s synchronous
5772f00208SRuslan Ermilov(voice) channel in each direction.
5872f00208SRuslan ErmilovThe asynchronous channel can support
59878ed226SJulian Elischermaximal 723.2 kb/s asymmetric (and still up to 57.6 kb/s in the return
60878ed226SJulian Elischerdirection), or 433.9 kb/s symmetric.
61878ed226SJulian Elischer.Pp
62878ed226SJulian ElischerThe Bluetooth system provides a point-to-point connection (only two
6372f00208SRuslan ErmilovBluetooth units involved), or a point-to-multipoint connection.
6472f00208SRuslan ErmilovIn the point-to-multipoint connection,
6572f00208SRuslan Ermilovthe channel is shared among several Bluetooth units.
6672f00208SRuslan ErmilovTwo or more units sharing the same channel form a
6772f00208SRuslan Ermilov.Dq piconet .
68878ed226SJulian ElischerOne Bluetooth unit acts as the master of the piconet, whereas the other
6972f00208SRuslan Ermilovunit(s) acts as slave(s).
7072f00208SRuslan ErmilovUp to seven slaves can be active in the piconet.
71878ed226SJulian ElischerIn addition, many more slaves can remain locked to the master in a so-called
7272f00208SRuslan Ermilovparked state.
7372f00208SRuslan ErmilovThese parked slaves cannot be active on the channel, but remain
7472f00208SRuslan Ermilovsynchronized to the master.
7572f00208SRuslan ErmilovBoth for active and parked slaves, the channel
76878ed226SJulian Elischeraccess is controlled by the master.
77878ed226SJulian Elischer.Pp
78878ed226SJulian ElischerMultiple piconets with overlapping coverage areas form a
7972f00208SRuslan Ermilov.Dq scatternet .
8072f00208SRuslan ErmilovEach piconet can only have a single master.
8172f00208SRuslan ErmilovHowever, slaves can participate
8272f00208SRuslan Ermilovin different piconets on a time-division multiplex basis.
8372f00208SRuslan ErmilovIn addition, a master in one piconet can be a slave in another piconet.
8472f00208SRuslan ErmilovThe piconets shall not be frequency-synchronized.
8572f00208SRuslan ErmilovEach piconet has its own hopping channel.
8672f00208SRuslan Ermilov.Ss Time Slots
8772f00208SRuslan ErmilovThe channel is divided into time slots, each 625 usec in length.
8872f00208SRuslan ErmilovThe time
89878ed226SJulian Elischerslots are numbered according to the Bluetooth clock of the piconet master.
90878ed226SJulian ElischerThe slot numbering ranges from 0 to 2^27 -1 and is cyclic with a cycle length
9172f00208SRuslan Ermilovof 2^27.
9272f00208SRuslan ErmilovIn the time slots, master and slave can transmit packets.
9372f00208SRuslan Ermilov.Ss SCO Link
94878ed226SJulian ElischerThe SCO link is a symmetric, point-to-point link between the master and a
9572f00208SRuslan Ermilovspecific slave.
9672f00208SRuslan ErmilovThe SCO link reserves slots and can therefore be considered
9772f00208SRuslan Ermilovas a circuit-switched connection between the master and the slave.
9872f00208SRuslan ErmilovThe SCO link typically supports time-bounded information like voice.
9972f00208SRuslan ErmilovThe master can
10072f00208SRuslan Ermilovsupport up to three SCO links to the same slave or to different slaves.
10172f00208SRuslan ErmilovA slave can support up to three SCO links from the same master, or two SCO
10272f00208SRuslan Ermilovlinks if the links originate from different masters.
10372f00208SRuslan ErmilovSCO packets are never retransmitted.
10472f00208SRuslan Ermilov.Ss ACL Link
105878ed226SJulian ElischerIn the slots not reserved for SCO links, the master can exchange packets
10672f00208SRuslan Ermilovwith any slave on a per-slot basis.
10772f00208SRuslan ErmilovThe ACL link provides a packet-switched
108878ed226SJulian Elischerconnection between the master and all active slaves participating in the
10972f00208SRuslan Ermilovpiconet.
11072f00208SRuslan ErmilovBoth asynchronous and isochronous services are supported.
11172f00208SRuslan ErmilovBetween a master and a slave only a single ACL link can exist.
11272f00208SRuslan ErmilovFor most ACL packets,
113878ed226SJulian Elischerpacket retransmission is applied to assure data integrity.
114878ed226SJulian Elischer.Sh HOST CONTROLLER INTERFACE (HCI)
115878ed226SJulian ElischerThe HCI provides a command interface to the baseband controller and link
11672f00208SRuslan Ermilovmanager, and access to hardware status and control registers.
11772f00208SRuslan ErmilovThis interface
118878ed226SJulian Elischerprovides a uniform method of accessing the Bluetooth baseband capabilities.
119878ed226SJulian Elischer.Pp
120878ed226SJulian ElischerThe HCI layer on the Host exchanges data and commands with the HCI firmware
12172f00208SRuslan Ermilovon the Bluetooth hardware.
12272f00208SRuslan ErmilovThe Host Controller Transport Layer (i.e. physical
123878ed226SJulian Elischerbus) driver provides both HCI layers with the ability to exchange information
124878ed226SJulian Elischerwith each other.
125878ed226SJulian Elischer.Pp
126878ed226SJulian ElischerThe Host will receive asynchronous notifications of HCI events independent
12772f00208SRuslan Ermilovof which Host Controller Transport Layer is used.
12872f00208SRuslan ErmilovHCI events are used for
12972f00208SRuslan Ermilovnotifying the Host when something occurs.
13072f00208SRuslan ErmilovWhen the Host discovers that an
131878ed226SJulian Elischerevent has occurred it will then parse the received event packet to determine
132878ed226SJulian Elischerwhich event occurred.
133878ed226SJulian ElischerThe next sections specify the HCI packet formats.
13472f00208SRuslan Ermilov.Ss HCI Command Packet
135878ed226SJulian Elischer.Bd -literal -offset indent
136878ed226SJulian Elischer#define NG_HCI_CMD_PKT 0x01
137878ed226SJulian Elischertypedef struct {
138878ed226SJulian Elischer        u_int8_t  type;   /* MUST be 0x1 */
139878ed226SJulian Elischer        u_int16_t opcode; /* OpCode */
140878ed226SJulian Elischer        u_int8_t  length; /* parameter(s) length in bytes */
141878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_cmd_pkt_t;
142878ed226SJulian Elischer.Ed
143878ed226SJulian Elischer.Pp
144878ed226SJulian ElischerThe HCI command packet is used to send commands to the Host Controller
14572f00208SRuslan Ermilovfrom the Host.
14672f00208SRuslan ErmilovWhen the Host Controller completes most of the commands,
14772f00208SRuslan Ermilova Command Complete event is sent to the Host.
14872f00208SRuslan ErmilovSome commands do not receive
14972f00208SRuslan Ermilova Command Complete event when they have been completed.
15072f00208SRuslan ErmilovInstead, when the
151878ed226SJulian ElischerHost Controller receives one of these commands the Host Controller sends
152878ed226SJulian Elischera Command Status event back to the Host when it has begun to execute the
15372f00208SRuslan Ermilovcommand.
15472f00208SRuslan ErmilovLater on, when the actions associated with the command have finished,
155878ed226SJulian Elischeran event that is associated with the sent command will be sent by the Host
156878ed226SJulian ElischerController to the Host.
15772f00208SRuslan Ermilov.Ss HCI Event Packet
158878ed226SJulian Elischer.Bd -literal -offset indent
159878ed226SJulian Elischer#define NG_HCI_EVENT_PKT 0x04
160878ed226SJulian Elischertypedef struct {
161878ed226SJulian Elischer        u_int8_t type;   /* MUST be 0x4 */
162878ed226SJulian Elischer        u_int8_t event;  /* event */
163878ed226SJulian Elischer        u_int8_t length; /* parameter(s) length in bytes */
164878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_event_pkt_t;
165878ed226SJulian Elischer.Ed
166878ed226SJulian Elischer.Pp
167878ed226SJulian ElischerThe HCI event packet is used by the Host Controller to notify the Host
168878ed226SJulian Elischerwhen events occur.
16972f00208SRuslan Ermilov.Ss HCI ACL Data Packet
170878ed226SJulian Elischer.Bd -literal -offset indent
171878ed226SJulian Elischer#define NG_HCI_ACL_DATA_PKT 0x02
172878ed226SJulian Elischertypedef struct {
173878ed226SJulian Elischer        u_int8_t  type;       /* MUST be 0x2 */
174878ed226SJulian Elischer        u_int16_t con_handle; /* connection handle + PB + BC flags */
175878ed226SJulian Elischer        u_int16_t length;     /* payload length in bytes */
176878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_acldata_pkt_t;
177878ed226SJulian Elischer.Ed
178878ed226SJulian Elischer.Pp
179878ed226SJulian ElischerHCI ACL data packets are used to exchange ACL data between the Host and
180878ed226SJulian ElischerHost Controller.
18172f00208SRuslan Ermilov.Ss HCI SCO Data Packet
182878ed226SJulian Elischer.Bd -literal -offset indent
183878ed226SJulian Elischer#define NG_HCI_SCO_DATA_PKT 0x03
184878ed226SJulian Elischertypedef struct {
185878ed226SJulian Elischer        u_int8_t  type;       /* MUST be 0x3 */
186878ed226SJulian Elischer        u_int16_t con_handle; /* connection handle + reserved bits */
187878ed226SJulian Elischer        u_int8_t  length;     /* payload length in bytes */
188878ed226SJulian Elischer} __attribute__ ((packed)) ng_hci_scodata_pkt_t;
189878ed226SJulian Elischer.Ed
190878ed226SJulian Elischer.Pp
191878ed226SJulian ElischerHCI SCO data packets are used to exchange SCO data between the Host and
192878ed226SJulian ElischerHost Controller.
193878ed226SJulian Elischer.Sh HCI INITIALIZATION
194878ed226SJulian ElischerOn initialization, HCI control application must issue the following HCI
195878ed226SJulian Elischercommands (in any order).
19672f00208SRuslan Ermilov.Bl -tag -width indent
197878ed226SJulian Elischer.It Dv Read_BD_ADDR
198878ed226SJulian ElischerTo obtain BD_ADDR of the Bluetooth unit.
199878ed226SJulian Elischer.It Dv Read_Local_Supported_Features
200878ed226SJulian ElischerTo obtain the list of features supported by Bluetooth unit.
201878ed226SJulian Elischer.It Dv Read_Buffer_Size
202878ed226SJulian ElischerTo determine the maximum size of HCI ACL and SCO HCI data packets (excluding
20372f00208SRuslan Ermilovheader) that can be sent from the Host to the Host Controller.
20472f00208SRuslan ErmilovThere are also
205878ed226SJulian Elischertwo additional return parameters that specify the total number of HCI ACL and
206878ed226SJulian ElischerSCO data packets that the Host Controller can have waiting for transmission in
207878ed226SJulian Elischerits buffers.
208878ed226SJulian Elischer.El
209878ed226SJulian Elischer.Pp
21072f00208SRuslan ErmilovAs soon as HCI initialization has been successfully performed, HCI control
211878ed226SJulian Elischerapplication must turn on
212878ed226SJulian Elischer.Dq inited
21372f00208SRuslan Ermilovbit for the node.
21472f00208SRuslan ErmilovOnce HCI node has been initialized all upsteam hooks
215878ed226SJulian Elischerwill receive a
216878ed226SJulian Elischer.Dv NGM_HCI_NODE_UP
217878ed226SJulian ElischerNetgraph message defined as follows.
218878ed226SJulian Elischer.Bd -literal -offset indent
219878ed226SJulian Elischer#define NGM_HCI_NODE_UP 112 /* HCI -> Upper */
220878ed226SJulian Elischertypedef struct {
221878ed226SJulian Elischer        u_int16_t pkt_size; /* max. ACL/SCO packet size (w/o hdr) */
222878ed226SJulian Elischer        u_int16_t num_pkts; /* ACL/SCO packet queue size */
223878ed226SJulian Elischer        u_int16_t reserved; /* place holder */
224878ed226SJulian Elischer        bdaddr_t  bdaddr;   /* bdaddr */
225878ed226SJulian Elischer} ng_hci_node_up_ep;
226878ed226SJulian Elischer.Ed
227878ed226SJulian Elischer.Sh HCI FLOW CONTROL
228878ed226SJulian ElischerHCI layer performs flow control on baseband connection basis (i.e. ACL and
22972f00208SRuslan ErmilovSCO link).
23072f00208SRuslan ErmilovEach baseband connection has
23172f00208SRuslan Ermilov.Dq "connection handle"
23272f00208SRuslan Ermilovand queue of outgoing data packets.
23372f00208SRuslan ErmilovUpper layers protocols are allowed to
23472f00208SRuslan Ermilovsend up to
23572f00208SRuslan Ermilov.Dv ( num_pkts
23672f00208SRuslan Ermilov\-
237878ed226SJulian Elischer.Dv pending )
23872f00208SRuslan Ermilovpackets at one time.
23972f00208SRuslan ErmilovHCI layer will send
240878ed226SJulian Elischer.Dv NGM_HCI_SYNC_CON_QUEUE
241878ed226SJulian ElischerNetgraph messages to inform upper layers about current queue state for each
24272f00208SRuslan Ermilovconnection handle.
24372f00208SRuslan ErmilovThe
244878ed226SJulian Elischer.Dv NGM_HCI_SYNC_CON_QUEUE
245878ed226SJulian ElischerNetgraph message is defined as follows.
246878ed226SJulian Elischer.Bd -literal -offset indent
247878ed226SJulian Elischer#define NGM_HCI_SYNC_CON_QUEUE 113 /* HCI -> Upper */
248878ed226SJulian Elischertypedef struct {
249878ed226SJulian Elischer        u_int16_t con_handle; /* connection handle */
250878ed226SJulian Elischer        u_int16_t completed;  /* number of completed packets */
251878ed226SJulian Elischer} ng_hci_sync_con_queue_ep;
252878ed226SJulian Elischer.Ed
253878ed226SJulian Elischer.Sh HOOKS
254878ed226SJulian ElischerThis node type supports the following hooks:
25572f00208SRuslan Ermilov.Bl -tag -width indent
256878ed226SJulian Elischer.It Dv drv
25772f00208SRuslan ErmilovBluetooth Host Controller Transport Layer hook.
25872f00208SRuslan ErmilovSingle HCI packet contained in single
25972f00208SRuslan Ermilov.Vt mbuf
260878ed226SJulian Elischerstructure.
261878ed226SJulian Elischer.It Dv acl
26272f00208SRuslan ErmilovUpper layer protocol/node is connected to the hook.
26372f00208SRuslan ErmilovSingle HCI ACL data packet contained in single
26472f00208SRuslan Ermilov.Vt mbuf
265878ed226SJulian Elischerstructure.
266878ed226SJulian Elischer.It Dv sco
26772f00208SRuslan ErmilovUpper layer protocol/node is connected to the hook.
26872f00208SRuslan ErmilovSingle HCI SCO data packet contained in single
26972f00208SRuslan Ermilov.Vt mbuf
270878ed226SJulian Elischerstructure.
271878ed226SJulian Elischer.It Dv raw
27272f00208SRuslan ErmilovRaw hook.
27372f00208SRuslan ErmilovEvery HCI frame (including HCI command frame) that goes in
27472f00208SRuslan Ermilovor out will be delivered to the hook.
27572f00208SRuslan ErmilovUsually the Bluetooth raw HCI socket layer is connected to the hook.
27672f00208SRuslan ErmilovSingle HCI frame contained in single
27772f00208SRuslan Ermilov.Vt mbuf
278878ed226SJulian Elischerstructure.
279878ed226SJulian Elischer.El
280878ed226SJulian Elischer.Sh BLUETOOTH UPPER LAYER PROTOCOLS INTERFACE (LP CONTROL MESSAGES)
28172f00208SRuslan Ermilov.Bl -tag -width indent
282878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_REQ
28372f00208SRuslan ErmilovRequests the lower protocol to create a connection.
28472f00208SRuslan ErmilovIf a physical link
285878ed226SJulian Elischerto the remote device does not exist, this message must be sent to the lower
286878ed226SJulian Elischerprotocol (baseband) to establish the physical connection.
287878ed226SJulian Elischer.It Dv NGM_HCI_LP_DISCON_REQ
288878ed226SJulian ElischerRequests the lower protocol (baseband) to terminate a connection.
289878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_CFM
290878ed226SJulian ElischerConfirms success or failure of the
29172f00208SRuslan Ermilov.Dv NGM_HCI_LP_CON_REQ
29272f00208SRuslan Ermilovrequest to establish a lower layer (baseband) connection.
293878ed226SJulian ElischerThis includes passing the authentication challenge if authentication is
294878ed226SJulian Elischerrequired to establish the physical link.
295878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_IND
296878ed226SJulian ElischerIndicates the lower protocol (baseband) has successfully established
297878ed226SJulian Elischerincoming connection.
298878ed226SJulian Elischer.It Dv NGM_HCI_LP_CON_RSP
299878ed226SJulian ElischerA response accepting or rejecting the previous connection indication request.
300878ed226SJulian Elischer.It Dv NGM_HCI_LP_DISCON_IND
30172f00208SRuslan ErmilovIndicates the lower protocol (baseband) has terminated connection.
30272f00208SRuslan ErmilovThis could be a response to
303878ed226SJulian Elischer.Dv NGM_HCI_LP_DISCON_REQ
304878ed226SJulian Elischeror a timeout event.
305878ed226SJulian Elischer.It Dv NGM_HCI_LP_QOS_REQ
306878ed226SJulian ElischerRequests the lower protocol (baseband) to accommodate a particular QoS
307878ed226SJulian Elischerparameter set.
308878ed226SJulian Elischer.It Dv NGM_HCI_LP_QOS_CFM
309878ed226SJulian ElischerConfirms success or failure of the request for a given quality of service.
310878ed226SJulian Elischer.It Dv NGM_HCI_LP_QOS_IND
311878ed226SJulian ElischerIndicates the lower protocol (baseband) has detected a violation of the QoS
312878ed226SJulian Elischeragreement.
313878ed226SJulian Elischer.El
314878ed226SJulian Elischer.Sh NETGRAPH CONTROL MESSAGES
315878ed226SJulian ElischerThis node type supports the generic control messages, plus the following:
31672f00208SRuslan Ermilov.Bl -tag -width indent
317878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_STATE
318878ed226SJulian ElischerReturns current state for the node.
319878ed226SJulian Elischer.It Dv NGM_HCI_NODE_INIT
320878ed226SJulian ElischerTurn on
321878ed226SJulian Elischer.Dq inited
322878ed226SJulian Elischerbit for the node.
323878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_DEBUG
324878ed226SJulian ElischerReturns an integer containing the current debug level for the node.
325878ed226SJulian Elischer.It Dv NGM_HCI_NODE_SET_DEBUG
326878ed226SJulian ElischerThis command takes an integer argument and sets current debug level
327878ed226SJulian Elischerfor the node.
328878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_BUFFER
329878ed226SJulian ElischerReturns current state of data buffers.
330878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_BDADDR
331878ed226SJulian ElischerReturns BD_ADDR as cached in the node.
332878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_FEATURES
333878ed226SJulian ElischerReturns the list of features supported by hardware (as cached by the node).
334878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_NEIGHBOR_CACHE
335878ed226SJulian ElischerReturns content of the neighbor cache.
336878ed226SJulian Elischer.It Dv NGM_HCI_NODE_FLUSH_NEIGHBOR_CACHE
337878ed226SJulian ElischerRemove all neighbor cache entries.
338878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_CON_LIST
339878ed226SJulian ElischerReturns list of active baseband connections (i.e. ACL and SCO links).
340878ed226SJulian Elischer.It Dv NGM_HCI_NODE_GET_STAT
341878ed226SJulian ElischerReturns various statistic counters.
342878ed226SJulian Elischer.It Dv NGM_HCI_NODE_RESET_STAT
343878ed226SJulian ElischerResets all statistic counters to zero.
344878ed226SJulian Elischer.It NGM_HCI_NODE_SET_LINK_POLICY_SETTINGS_MASK
34572f00208SRuslan ErmilovSets current link policy settings mask.
34672f00208SRuslan ErmilovAfter the new ACL connection is
34772f00208SRuslan Ermilovcreated the HCI node will try set link policy for the ACL connection.
34872f00208SRuslan ErmilovBy default, every supported Link Manager (LM) mode will be enabled.
34972f00208SRuslan ErmilovUser can
350878ed226SJulian Elischeroverride this by setting link policy settings mask which specifies LM
351878ed226SJulian Elischermodes to be enabled.
352878ed226SJulian Elischer.It NGM_HCI_NODE_GET_LINK_POLICY_SETTINGS_MASK
353878ed226SJulian ElischerReturns current link policy settings mask.
354878ed226SJulian Elischer.It NGM_HCI_NODE_SET_PACKET_MASK
35572f00208SRuslan ErmilovSets current packet mask.
35672f00208SRuslan ErmilovWhen new baseband (ACL or SCO) connection is
357878ed226SJulian Elischercreated the HCI node will specify every packet type supported by the device.
358878ed226SJulian ElischerUser can override this by setting packet mask which specifies packet types
359878ed226SJulian Elischerto be used for new baseband connections.
360878ed226SJulian Elischer.It NGM_HCI_NODE_GET_PACKET_MASK
361878ed226SJulian ElischerReturns current packet mask.
362f2bb1caeSJulian Elischer.It NGM_HCI_NODE_SET_ROLE_SWITCH
36372f00208SRuslan ErmilovSets the value of the role switch.
36472f00208SRuslan ErmilovRole switch is enabled when this value is not zero.
36572f00208SRuslan ErmilovThis is the default state.
36672f00208SRuslan ErmilovNote that actual role switch at Bluetooth link level will only be perfomed if
36772f00208SRuslan Ermilovhardware supports role switch and it was enabled.
368f2bb1caeSJulian Elischer.It NGM_HCI_NODE_GET_ROLE_SWITCH
369f2bb1caeSJulian ElischerReturns the value of the role switch for the node.
370878ed226SJulian Elischer.El
371878ed226SJulian Elischer.Sh SHUTDOWN
37272f00208SRuslan ErmilovThis node shuts down upon receipt of a
37372f00208SRuslan Ermilov.Dv NGM_SHUTDOWN
37472f00208SRuslan Ermilovcontrol message, or
375878ed226SJulian Elischerwhen all hooks have been disconnected.
376878ed226SJulian Elischer.Sh BUGS
37772f00208SRuslan ErmilovMost likely.
37872f00208SRuslan ErmilovPlease report if found.
379878ed226SJulian Elischer.Sh SEE ALSO
380878ed226SJulian Elischer.Xr netgraph 4 ,
38172f00208SRuslan Ermilov.Xr hccontrol 8 ,
38272f00208SRuslan Ermilov.Xr ngctl 8
383878ed226SJulian Elischer.Sh HISTORY
384878ed226SJulian ElischerThe
38572f00208SRuslan Ermilov.Nm hci
386878ed226SJulian Elischernode type was implemented in
387878ed226SJulian Elischer.Fx 5.0 .
388878ed226SJulian Elischer.Sh AUTHORS
389878ed226SJulian Elischer.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
390