Bluetooth is a radio technology that supports short-range communication between devices (generally within 10 meters). It allows for wireless information exchange among various devices, including mobile phones, PDAs, wireless headsets, laptops, and related peripherals. By utilizing Bluetooth technology, communication between mobile terminal devices can be effectively simplified, and communication between devices and the Internet can also be successfully streamlined, making data transfer faster and more efficient, thereby broadening the scope of wireless communication. Bluetooth adopts a decentralized network structure along with fast frequency hopping and short packet technology, supporting point-to-point and point-to-multipoint communication, operating in the globally universal 2.4GHz ISM (Industrial, Scientific, Medical) frequency band. Its data rate is 1Mbps, and it achieves full-duplex transmission through a time-division duplex transmission scheme.
Bluetooth System Composition
1. Radio Unit: Responsible for sending and receiving data and voice, characterized by short range and low power consumption. Bluetooth antennas are generally small in size and lightweight, belonging to the category of microstrip antennas.2. Baseband or Link Controller: Converts radio frequency signals to digital or voice signals, realizing baseband protocols and other low-level connection procedures.3. Link Manager: Responsible for managing communication between Bluetooth devices, establishing, verifying, and configuring links.4. Bluetooth Software Protocol Implementation: As shown in the purple part of the figure, we will provide detailed explanations later.
Low Energy Bluetooth Related Specifications
(2) Composition of Bluetooth Protocols
2.1 Bluetooth Protocol Architecture
The protocols in the Bluetooth protocol system are divided into four layers according to SIG’s focus:
1. Core Protocols: BaseBand, LMP, L2CAP, SDP;2. Cable Replacement Protocol: RFCOMM;3. Telephony Control Protocol: TCS-Binary, AT Command Set;4. Optional Protocols: PPP, UDP/TCP/IP, OBEX, WAP, vCard, vCal, IrMC, WAE.
In addition to the above protocol layers, the specification also defines the Host Controller Interface (HCI), which provides command interfaces for the baseband controller, connection manager, hardware status, and control registers. In Figure 1, HCI is located below L2CAP, but HCI can also be located above L2CAP.
The Bluetooth core protocol consists of Bluetooth-specific protocols formulated by the SIG. The vast majority of Bluetooth devices require the core protocol (along with the wireless part), while other protocols depend on application needs. In summary, the cable replacement protocol, telephony control protocol, and adopted protocols constitute application-oriented protocols based on the core protocol.
The Bluetooth protocol stack allows for multiple methods, including RFCOMM and Object Exchange (OBEX), to send and receive files between devices. If you want to send and receive streaming data (and want to add Bluetooth support to traditional serial applications), then RFCOMM is better. Conversely, if you want to send object data along with context and metadata about the payload, OBEX is preferred.
The Bluetooth application activity diagram is as follows:
Introduction to Bluetooth:
“Bluetooth” is a high-capacity, short-range wireless digital communication technology standard, aiming to achieve a maximum data transfer rate of 1Mbps and a maximum transmission distance of 10 centimeters to 10 meters, with an increased transmission power reaching up to 100 meters.
Bluetooth technology was jointly launched in 1998 by five companies including Ericsson and IBM. Today, over 1800 companies worldwide have joined this organization. Bluetooth has a transmission distance of 10cm to 10m, operates in the 2.4 GHz ISM frequency band using frequency modulation and hopping technology, with a speed of 1 Mbps. Bluetooth is more mobile than 802.11, which is restricted to offices and campuses, while Bluetooth can connect a device to LAN (Local Area Network) and WAN (Wide Area Network), even supporting global roaming. Additionally, Bluetooth has low costs and small sizes, making it applicable to more devices. The greatest advantage of Bluetooth is that when updating the network backbone, the cost of using a Bluetooth architecture is lower than that of laying cables.
Bluetooth protocols operate in the unlicensed ISM (Industrial Scientific Medical) frequency band at 2.45GHz. The maximum speed can reach 723.1kb/s. To avoid interference with other protocols that may use 2.45GHz, the Bluetooth protocol divides this frequency band into 79 channels (each with a bandwidth of 1MHZ), allowing for up to 1600 channel hops per second.
Applications of Bluetooth:
1. File Transfer
Bluetooth’s wireless file transfer supports specific formats such as .xls, .doc, .jpg, as well as file transfer functionality, and also supports remote folder browsing;
2. Dial-Up Internet
Through Bluetooth’s wireless modem, wireless dial-up internet and faxing can be achieved;
3. Headsets
This is the initial and most common application of Bluetooth, enabling wireless audio input and output through Bluetooth connections;
4. Bluetooth Phones
Through Bluetooth application protocols, wireless calling and receiving functions can be realized;
5. LAN Access
Through specific Bluetooth application protocols, a local area network can be established and network connection applications can be shared;
6. Personal Data Management
Through wireless connections, management of phonebook records, inquiries, calendars, schedules, and business card transfers and updates can be achieved;
Bluetooth Protocol Stack Architecture:
As shown in the figure, the Bluetooth protocol stack architecture consists of three main parts: lower hardware modules, middle layers, and high-end application layers;
Bluetooth Lower Hardware Modules
The lower module is the core module of Bluetooth technology, mainly consisting of the Link Management Layer (LMP Link Manager Protocol), Baseband Layer (BB Base Band), and Radio Frequency (RF Radio Frequency).
Among them:
The Wireless Connection Layer (RF) filters and transmits data flows through the 2.4GHz ISM frequency band, defining the basic requirements that Bluetooth receivers operating in this band must meet;
The Baseband Layer (BB) provides two different physical links (Synchronous Connection Oriented SCO and Asynchronous Connection Less ACL), responsible for frequency hopping and the transmission of Bluetooth data and information frames, and provides different levels of forward error correction (FEC Frequency Error Correction) or cyclic redundancy check (CRC Cyclic Redundancy Check) for all types of packets;
The LMP layer is responsible for establishing and tearing down links between two or more devices, as well as link security and control, such as authentication and encryption, and controlling and negotiating the size of baseband packets, providing different access points for upper software modules;
The Bluetooth Host Controller Interface (HCI) consists of the baseband controller, connection manager, control, and event registers. It serves as the interface between hardware and software in the Bluetooth protocol, providing a unified command for calling lower-level BB, LM, status, and control registers. The messages and data transfer between the upper and lower module interfaces must be interpreted through HCI. The protocol software entities above the HCI layer run on the host, while the functions below the HCI are performed by Bluetooth devices, with interaction between the two through the transport layer.
Bluetooth Middle Protocol Layer Modules
The middle protocol layer consists of the Logical Link Control and Adaptation Protocol (L2CAP), Service Discovery Protocol (SDP), Serial Port Emulation Protocol or Cable Replacement Protocol (RFCOMM), and Telephony Control Protocol (TCS).
L2CAP is the core component of the Bluetooth protocol stack and serves as the basis for other protocol implementations. It is located above the baseband, providing connection-oriented and connectionless data services to upper layers. It mainly completes data segmentation and reassembly, quality of service control, protocol multiplexing, and group extraction functions. L2CAP allows for data packets of up to 64KB.
SDP is a protocol based on a client/server structure. It operates above the L2CAP layer, providing a mechanism for upper layer applications to discover available services and their attributes, where service attributes include the type of service and the mechanisms or protocol information required for that service.
RFCOMM is a wireless data emulation protocol that simulates a wired link, complying with ETSI standard TS 07.10 for serial port emulation. It simulates RS-232 control and data signals on the Bluetooth baseband, providing transmission capabilities for upper-layer services that originally used serial connections.
TCS is a bit-oriented protocol based on ITU-T Q.931 recommendations, defining control signaling (Call Control Signaling) for establishing voice and data calls between Bluetooth devices and managing the mobility of Bluetooth device groups.
Bluetooth High-End Application Layer Modules
The high-end application layer is composed of optional protocol layers. The optional protocol layer includes the Point-to-Point Protocol (PPP), which consists of encapsulation, link control protocol, and network control protocol, defining how serial point-to-point links should transmit Internet Protocol data, mainly used for LAN access, dial-up networks, and fax applications;
TCP/IP (Transmission Control Protocol/Network Layer Protocol), UDP (User Datagram Protocol Object Exchange Protocol) are three existing protocols that define communication related to the Internet and communication between other types of computer devices and peripheral devices. Bluetooth adopts or shares these existing protocols to achieve communication with devices connected to the Internet, thereby improving efficiency and ensuring interoperability between Bluetooth technology and other communication technologies to some extent;
OBEX (Object Exchange Protocol) is an object exchange protocol that supports data exchange between devices, adopting a client/server model to provide the same basic functions as HTTP (Hypertext Transfer Protocol). This protocol, as an open standard, also defines formats that can be used for exchanging e-business cards, personal schedules, messages, and notes;
WAP (Wireless Application Protocol) is a wireless application protocol aimed at enabling Internet services on digital cellular phones and other small wireless devices. It supports mobile phones browsing the web, receiving emails, and other Internet-based protocols.
WAE (Wireless Application Environment) is a wireless application environment that provides various application software needed for WAP phones and Personal Digital Assistants (PDA).
Common Bluetooth Profiles
A2DP Advance Audio Distribution Profile
A2DP is most commonly applied in the BT AUDIO function of our company’s products. A2DP defines the protocol and process for transmitting high-quality audio information such as mono or stereo over ACL (Asynchronous Connectionless) channels. The application of A2DP allows audio transmission to reach a rate of 44.1kHz, while the general transmission rate can only reach 8kHz.
Audio transmitted using the A2DP protocol is referred to as high-definition audio, whereas the audio generally referred to in Bluetooth communications is the voice audio during voice calls, which has a transmission rate of only 8kHz as mentioned above.
AVRCP Audio/Video Remote Control Profile
The AVRCP protocol provides a standard interface for Bluetooth-connected devices to achieve remote control of devices. This profile specifies the AV/C digital interface command set, where the controller translates detected user operations into A/V control signals and transmits them to the remote Bluetooth device for control.
DUN Dial-Up Networking Profile
The DUN dial-up networking profile allows users to connect to the internet through their mobile phone as a wireless dial-up modem;
FTP File Transfer Profile
The file transfer profile defines the interaction between client devices and server devices regarding files and folders. Through the FTP protocol, files can be synchronized between the client and server.
HFP Hands-Free Profile and HSP Headset Profile
The HFP hands-free profile defines how hands-free devices use gateway devices to make and receive calls, while the HSP headset profile defines how Bluetooth headsets communicate with computers or mobile devices.
SPP Serial Port Profile
The serial port profile defines how to set up a virtual serial port between two Bluetooth devices and perform data communication over the virtual serial port.
PBAP Phone Book Access Profile
As the name suggests, the PBAP profile is the protocol for exchanging phone books between Bluetooth devices. Through the PBAP protocol, Bluetooth devices can access phone books and related call records;
Bluetooth systems have three main states: Standby, Connection, and Power Saving. During the transition from standby to connection state, there are seven sub-states:
Paging, Page Scan, Inquiry, Inquiry Scan, Master Response, Slave Response, and Inquiry Response.
Page: Paging Page Scan refers to the state where the initiating device (master device) knows the address of the device to be connected. Therefore, it can directly page. (Think of a pager; you need to know the number to call). Page Scan refers to the state where the device is waiting for a page. Typically refers to the corresponding slave device (the device waiting to be connected). Inquiry: Inquiry (Paging) Inquiry Scan refers to the state where the device does not know what devices are around and needs to inquire (investigate), similar to broadcasting (calling out). Devices in Inquiry Scan can respond to this inquiry. After necessary negotiations, they can connect.
Piconet
A Piconet is a network formed by devices using Bluetooth technology in a specific manner. The establishment of a Piconet begins with the connection of two devices (such as a portable computer and a cellular phone) and can consist of up to eight devices. All Bluetooth devices operate equally; however, when a Piconet is established, there is only one master device, with all others being slave devices, and this status will be maintained throughout the existence of the Piconet.
Connection Status
Bluetooth devices in connection status can be in one of the following four states: Active, Hold, Sniff, and Park modes.
Bluetooth Address
To identify numerous Bluetooth devices, each Bluetooth device is assigned a 48-bit address, referred to as a Bluetooth address (BT_ADDR). The 48-bit Bluetooth address can address up to 256 trillion (1T = 240) Bluetooth devices, but in practice, even the largest scattering networks do not utilize such a vast space of Bluetooth devices. The Bluetooth address is divided into three segments: the low 24-bit address segment (LAP); the undefined 8-bit address segment (NAP); and the high 16-bit address segment (UAP).
The UAP and LAP together form the Bluetooth addressing space of 240. The NAP and UAP together form a 24-bit address used as a unique identifier code for manufacturers, assigned by the Bluetooth authority to different manufacturers. LAP is allocated within each manufacturer.