Discuss the principle and structure of the Bluetooth protocol stack

Source: Internet
Author: User

Bluetooth is no longer a new technology. I believe most people know it. In this regard, we can implement it in Embedded operations. In a Bluetooth system, multiple protocols are used to support different applications. These protocols are combined in layers to form a Bluetooth protocol stack. the Bluetooth protocol stack is the core component of Bluetooth technology. It allows devices to locate and establish connections between devices. Through this connection, devices can exchange data and interact with each other through various applications.

1. architecture of the Bluetooth protocol stack

The architecture of the Bluetooth protocol stack is layered.

The purpose of the Bluetooth specifications is to enable interoperability between various applications that comply with the specifications. the same protocol stack is required for interoperable remote devices, and different applications require different protocol stacks. not all protocols must be used by any application, but only one or more layers can be used. however, all applications must use the data link layer and physical layer in the Bluetooth Technical Specifications.

The main principle of designing the Bluetooth protocol stack is to make full use of existing high-level protocols, ensure the integration of existing protocols and Bluetooth technology, the interconnectivity between various applications, and make full use of software and hardware systems compatible with Bluetooth specifications. the openness of Bluetooth specifications ensures that device manufacturers can freely select their patent protocols or common public protocols and develop new applications based on Bluetooth specifications. bluetooth specifications include Core and Profiles. core is the Core of Bluetooth. It mainly defines the technical details of Bluetooth. The Profiles section defines the protocol stack composition in various Bluetooth applications and defines the corresponding implementation protocol stack.

According to the location of each layer protocol in the entire Bluetooth protocol system, the Bluetooth protocol can be divided into three categories: underlying protocol, intermediate layer protocol and high-level protocol.

2. Underlying Bluetooth protocol

The underlying Bluetooth protocol implements the transmission link of the Bluetooth information data stream, which is the basis of the Bluetooth protocol system. It includes the RF protocol, baseband protocol, and link management protocol.

1) RF protocol (Radio Frequency Protoc01)

The Bluetooth RF protocol is at the lowest layer of the Bluetooth protocol stack, mainly including band and channel arrangement, transmitter characteristics and receiver characteristics. It is used to regulate the wireless transmission technology of the physical layer and realize the sending and receiving of air data. bluetooth works in the 2.4 GHz ISM band, which does not require operation licenses in most countries so that Bluetooth devices can work in any different region.

In terms of channel arrangement, the system uses Frequency Hopping Spread Spectrum Technology, which provides strong anti-interference ability and good confidentiality. bluetooth SIG has developed two sets of Frequency Hopping solutions. One is to allocate 79 frequency hopping channels with the bandwidth of 1 MHz for each channel, and the other is the allocation scheme of 23 channels, the second scheme is no longer recommended for Bluetooth specifications later than 1.2.

(2) baseband Association {, S (Base Band Protoc01)

The baseband layer is located on the Bluetooth RF layer in the Bluetooth protocol stack. Together with the RF layer, it forms the Bluetooth physical layer.

The main functions of the baseband layer include link control, such as link-level routes such as bearer link connections and power control, management of physical links, SCO links and ACL links, and definition of the baseband grouping format and grouping type, SCO groups include HVl, HV2, HV3, and DV, while ACL groups include DMl, DHl, DM3, DH3, DM5, DH5, and AUXl. Traffic Control, the STOP and GO commands are used to implement the error correction function. The ARQ (Automatic Repeat Request) scheme of a 13-proportion forward error correction code, a 23-proportion forward error correction code, and data repetition Request is used; it also provides functions such as packet processing, paging, querying and accessing, and querying Bluetooth devices.

(3) Link Manager Protocol (LMP)

LMP is a data link layer protocol in the Bluetooth protocol stack. LMP executes link settings, authentication, link configuration, and other protocols: the link manager discovers other remote link managers (LM) and communicates with them through the Link Management Protocol (LMP.

3. Bluetooth intermediate layer protocol

The Bluetooth intermediate layer protocol implements data frame decomposition and reorganization, service quality control, group extraction, and other functions. It provides services for upper-layer applications and interfaces with the underlying protocol, this part includes the Host Controller Interface Protocol, Logical Link Control and adaptation protocol, serial port simulation protocol, telephone control protocol and Service Discovery Protocol.

(1) Host Controller Interface Protocol (HCI)

Bluetooth HCI is a layer of protocol between the Logical Link Control and adaptation protocol layer of the Bluetooth system and the link management protocol layer. HCI provides a unified interface for the upper-layer protocol to access the link manager and a unified way to access the baseband. there are several transport layers between the HCI host and the HCI host controller. These transport layers are transparent. You only need to complete the data transmission task and do not need to know the specific data format. the Bluetooth SIG defines four physical bus modes connected to hardware, namely four HCI transport layers: USB, RS232, UART, and PC cards.

(2) Logical Link Control and AdaptationProtocol (L2CAP)

The Logical Link Control and Adaptation Layer Protocol (L2CAP) is the core protocol in the Bluetooth system. It is a high-level baseband protocol and can be considered to work in parallel with the Link Management Protocol (LMP. l2CAP provides data services for the top management, and allows the top management and application layer protocols to send and receive 64 KB L2CAP data packets. l2CAP only supports connection-oriented asynchronous transmission (ACE) and does not support connection-oriented synchronous transmission (sco ). l2CAP adopts multi-channel technology, segmentation and Reorganization technology, and group extraction technology. It mainly provides protocol multiplexing, segmentation and reorganization, certification service quality, group management, and other functions.

(3) Serial Port simulation protocol (RFCOMM)

The serial port simulation protocol is located between the L2CAP protocol layer and the application layer protocol layer in the Bluetooth protocol stack. Based on the ETSI standard TS 07.10, the serial port simulation function of 9-pin RS232 serial port is implemented on The L2CAP protocol layer, it can realize serial communication between devices and provide support for existing applications using serial line interfaces.

(4) Telephony Control Protocol Spectocol (TCS)

The telephone control protocol is located on the L2CAP layer of the Bluetooth protocol stack, including the telephone control specification binary (tcs bin) protocol and a set of telephone control Commands (AT Commands ). among them, tcs bin defines the call control signaling required to establish voice and data calls between bluetooth devices; AT Commands is a set of Commands that can be used to control mobile phones and modem in multi-use mode. It SIG in ITU. developed based on TQ.931. the TCS layer not only supports telephone functions (including call control and group management), but also supports data creation.

The content of a call is carried in L2CAP as a standard packet.

(5) Service Discovery Protocol (SDP)

The Service Discovery Protocol (SDP) is a crucial layer in the bluetooth technology framework and serves as the basis for all application models. the implementation of any Bluetooth application model is based on the results of some services. in the bluetooth wireless communication system, any two or more devices built on the bluetooth link may start to communicate at any time, but static settings are not enough. the Bluetooth Service Discovery Protocol determines the dynamic mode of these service locations.

To dynamically query the device information and service type, and establish a communication channel corresponding to the service.

4. Bluetooth high-level protocol

High-level Bluetooth protocols include the Object Exchange Protocol, Wireless Application Protocol, and audio protocol.

(1) Object Exchange Protocol (OBEX)

OBEX is a session layer protocol developed by IrDA for Data Object Exchange on the infrared data link. the Bluetooth SIG adopts this protocol, which makes it possible for the original OBEX application based on the infrared link to be conveniently transplanted to Bluetooth or to switch between the two. OBEX is an efficient binary protocol that exchanges objects in a simple and spontaneous manner. it provides functions similar to the handsome protocol and uses the client based on the assumption that the transport layer is reliable. server mode. it only defines the transmission object, and does not specify a specific data transmission type. It can be any type from files to commercial e-cards, from commands to databases, and thus has good platform independence.

(2) Wireless Application Protocol (WAP)

The Wireless Application Protocol (WAP) is a protocol defined by the Wireless Application Protocol forum and used by mobile phone devices. WAP integrates various wide-area wireless network technologies to transfer Internet content and telephone bond services to digital cellular phones and other wireless terminals. use WAP to make full use of the high-level application software developed for the wireless application environment.

(3) Audio protocol (Audio)

Bluetooth Audio (Audio) is implemented by directly transmitting SCO groups on the baseband. Currently, Bluetooth SIG does not provide this part in the standard form. although it is not strictly a part of the Bluetooth protocol specification, it can also be regarded as a direct application-oriented layer in the Bluetooth protocol system.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.