Hardware Reference
In-Depth Information
Other than advertising, scanning, establishing (and tearing down) connections, and
transmitting and receiving data, the Link Layer is also responsible for several control
procedures, including these two critical processes:
Changing the connection parameters
Each connection is established with a given set of connection parameters set by the
master, but conditions and requirements might change during the lifetime of the
connection. A slave might suddenly require a higher throughput for a short burst
of data, or conversely, it might detect that in the near future a longer connection
interval will suffice to keep the connection alive. The Link Layer allows the master
and the slave to request new connection parameters and, in the case of the master,
to set them unilaterally at any time. That way, each connection can be fine-tuned
to provide the best balance between throughput and power consumption.
Encryption
Security is critical in BLE, and the Link Layer provides the means to exchange data
securely over an encrypted link. The keys are generated and managed by the host,
but the Link Layer performs the actual data encryption and decryption transpar‐
ently to the upper layers.
These two procedures are especially relevant, because they each require involvement
from the host on both sides to be carried out. The Link Layer handles additional pro‐
cedures to exchange version information and capabilities internally, so they are trans‐
parent to both the host and application developer.
Host Controller Interface (HCI)
As described in Chapter 1 , the Bluetooth specification allows several possible configu‐
rations based on chip count, and the Host Controller Interface (HCI) is a standard
protocol that allows for the communication between a host and a controller to take place
across a serial interface. It makes sense to draw a line at that level because, as mentioned
earlier in this chapter, the controller is the only module with hard real-time requirements
and contact with the physical layer. This means that it is often practical to separate it
from the host, which implements a more complex but less timing-stringent protocol
stack better suited for more advanced CPUs.
Typical examples of this configuration include most smartphones, tablets, and personal
computers, in which the host (and the application) runs in the main CPU, while the
controller is located in a separate hardware chip connected via a UART or USB. This is
similar to the model used by other technologies, such as WiFi or Ethernet: the TCP/IP
stack runs on the main processor, while the lower-level layers execute in a separate IC.
The Bluetooth specification defines HCI as a set of commands and events for the host
and the controller to interact with each other, along with a data packet format and a set
of rules for flow control and other procedures. Additionally, the spec defines several
Search WWH ::




Custom Search