Host Controller Interface (HCI)
The HCI provides a command interface to the
baseband controller and link manager, and access to hardware status and
control registers. Essentially this interface provides a uniform method of
accessing the Bluetooth baseband capabilities.The HCI exists across 3
sections, the Host - Transport Layer - Host Controller. Each of the sections
has a different role to play in the HCI system.
For more details : Download the HCI
Specification from the SIG website, or visit the Documents
The HCI is functionally broken up into 3
*Diagram Source: Courtesy of Bluetooth SIG,HCI Specs, Fig
1.2 , p 544
4.1.1 HCI Firmware
(location: Host Controller)
HCI Firmware , is located on the Host
Controller , (e.g. the actual Bluetooth hardware device). The HCI
firmware implements the HCI Commands for the Bluetooth hardware by accessing baseband
commands, link manager commands, hardware status registers, control
registers, and event registers. The term Host Controller means the HCI-enabled
4.1.2 HCI Driver
HCI Driver , which is located on the Host
(e.g. software entity). The Host will receive asynchronous
notifications of HCI events, HCI events are used for notifying the Host when
something occurs. When the Host discovers that an event has occurred it will
then parse the received event packet to determine which event occurred. The
term Host means the HCI-enabled Software Unit.
The HCI Driver and Firmware communicate via the Host
Controller Transport Layer , i.e. a definition of the several layers that
may exist between the HCI driver on the host system and the HCI firmware in
the Bluetooth hardware. These intermediate layers, the Host Controller
Transport Layer, should provide the ability to transfer data without intimate
knowledge of the data being transferred. Several different Host Controller
Layers can be used, of which 3 have been defined initially for Bluetooth :
USB , UART and RS232. The Host should receive asynchronous
notifications of HCI events independent of which Host Controller Transport
Layer is used.
The HCI provides a uniform command method of accessing the
Bluetooth hardware capabilities. The HCI Link commands provide the Host with
the ability to control the link layer connections to other Bluetooth devices.
These commands typically involve the Link Manager (LM)
to exchange LMP commands with remote
Bluetooth devices. The HCI Policy commands are used to affect the behaviour
of the local and remote LM. These Policy commands provide the Host with
methods of influencing how the LM manages the piconet. The Host
Controller and Baseband commands, Informational commands , and Status
commands provide the Host access to various registers in the Host
The Host Controller Transport Layer provides transparent
exchange of HCI-specific information. These transporting mechanisms provide
the ability for the Host to send HCI commands, ACL
data, and SCO data to the Host Controller.
These transport mechanisms also provide the ability for the Host to receive
HCI events, ACL data, and SCO data from the Host Controller. Since the Host
Controller Transport Layer provides transparent exchange of HCI-specific
information, the HCI specification specifies the format of the commands,
events, and data exchange between the Host and the Host Controller.
The Link Control commands allow the Host Controller to
control connections to other Bluetooth devices. When the Link Control
commands are used, the Link Manager (LM) controls how the Bluetooth piconets
and scatternets are established and
maintained. These commands instruct the LM to create and modify link layer
connections with Bluetooth remote devices, perform Inquiries
of other Bluetooth devices in range, and other LMP commands.
The Link Policy Commands provide methods for the Host to
affect how the Link Manager manages the piconet. When Link Policy Commands
are used, the LM still controls how Bluetooth piconets and scatternets are
established and maintained, depending on adjustable policy parameters. These
policy commands modify the Link Manager behaviour that can result in changes
to the link layer connections with Bluetooth remote devices.
The Host Controller & Baseband Commands provide access
and control to various capabilities of the Bluetooth hardware. These
parameters provide control of Bluetooth devices and of the capabilities of
the Host Controller, Link Manager, and Baseband. The host device can use
these commands to modify the behaviour of the local device.
The Informational Parameters are fixed by the
manufacturer of the Bluetooth hardware. These parameters provide information
about the Bluetooth device and the capabilities of the Host Controller, Link
Manager, and Baseband. The host device cannot modify any of these parameters.
The Host Controller modifies all status parameters. These
parameters provide information about the current state of the Host
Controller, Link Manager, and Baseband. The host device cannot modify any of
these parameters other than to reset certain specific parameters.
The Testing commands are used to provide the ability to test
various functionality's of the Bluetooth hardware. These commands provide the
ability to arrange various conditions for testing.
Flow control is used in the direction from the Host to
the Host Controller to avoid filling up the Host Controller data buffers with
ACL data destined for a remote device (connection handle) that is not
responding. It is the Host that manages the data buffers of the Host
A number of different events are defined for the HCI
layer. The events provide a method to return parameters and data associated
for each event. 32 HCI different events have been implemented so far, they
range from Inquiry Complete Event to Page Scan Repetition Mode
Change Event. See the main HCI specs for mode details.
A large number of error codes have been defined for the
HCI layer. When a command fails, Error codes are returned to indicate the
reason for the error. 35 HCI error codes have so far been defined, from Unknown
HCI Command to LMP PDU Not Allowed.See the main HCI specs for
The objective of the HCI UART Transport Layer is to
make it possible to use the Bluetooth HCI over a serial interface between two
UARTs on the same PCB. The HCI UART Transport Layer assumes that the UART
communication is free from line errors. Event and data packets flow through
this layer, but the layer does not decode them.
The objective of the HCI RS232 Transport Layer is to make it
possible to use the Bluetooth HCI over one physical RS232 interface between
the Bluetooth Host and the Bluetooth Host Controller. Event and data packets
flow through this layer, but the layer does not decode them.
The objective of the Universal Serial Bus (USB) Transport
Layer is to the use a USB hardware
interface for Bluetooth hardware (which can be embodied in one of two
ways: as a USB dongle, or integrated onto the motherboard of a notebook PC).
A class code will be used that is specific to all USB
Bluetooth devices. This will allow the proper driver stack to load,
regardless of which vendor built the device. It also allows HCI commands to
be differentiated from USB commands across the control endpoint.
Note, the above text contains excerpts from the Bluetooth SIG's
Specification, as well as various interpretations of the Specs. For complete
details of the various sections, consult the actual Bluetooth Specification.