Bluetooth protocol (2) specifications of the Bluetooth protocol

Source: Internet
Author: User

Bluetooth protocol (2) specifications of the Bluetooth protocol
Chapter 2 Bluetooth protocol specifications (RF, baseband Link Control, and link management)

The Bluetooth protocol is a rule for information exchange between bluetooth devices. Like the Open Systems Interconnection (OSI) model, the protocol system of Bluetooth technology also adopts a layered structure, from the underlying layer to the high-level layer to form a Bluetooth protocol stack, protocols at different layers define the functions and use the data grouping format to ensure interoperability between Bluetooth products.

I. RF protocols

The RF position is in red.

1. operating frequency

Bluetooth works in the 2.4 GHz ISM band. Bluetooth uses the frequency hopping technique to actively avoid interference in the operating frequency band (the microwave oven operates at 2.4 GHz ).

Geographic location ISM frequency range RF channel frequency
China, the United States, and Europe 2400.0 ~ 2483.5 MHz F = (2402 + k) MHz, k at 0, 1 ,...... Random value in 78
France 2446.5 ~ 2483.5 MHz F = (2454 + k) MHz, k at 0, 1 ,...... Random value in 22
Japan 2471.0 ~ 2497.0 MHz F = (2473 + k) MHz, k at 0, 1 ,...... Random value in 22
Spain 2445.0 ~ 2475.0 MHz F = (2449 + k) MHz, k at 0, 1 ,...... Random value in 22

China's bluetooth frequency is GHz ~ 2.483 GHz. The width of each Bluetooth channel is 1 MHz. In order to reduce the interference of out-of-band radiation, the upper and lower protection modes are kept as 3.5MHz and 2 MHz, at least 75 Pseudo-Random Code beats out of 79 frequency points. The usage time of any frequency point within 30 S cannot exceed 0.4 S.

2. Frequency Hopping technology, transmit power, and Time Slot

(1) transmit power:Bluetooth transmit power is divided into three levels: first-level power 100 mW (20dBm), second-level power 2.5 mW (4dBm), and third-level power 1 mW (0dBm );
(2) Physical channels:The Bluetooth physical channel consists of 79 frequency hops controlled by pseudo-random sequence. Different Frequency Hopping Sequences represent different channels.

(3) Time Slot:The Bluetooth frequency hopping rate is 1600 times/s, and each time is 1600 us (1 S/) is called a time slot;

Ii. baseband and Link Control Protocols

When a bluetooth device sends data, the baseband part encodes the data from the top layer and sends the data to the RF Device. When receiving the data, the baseband part restores the air data and uploads the data to the baseband device, the baseband is transmitted to the upper layer through channel encoding.

Purpose: select the frequency hopping, configure the Bluetooth address, link type, channel encoding, sending and receiving rules, channel control, audio specifications, and security settings.

1. the Bluetooth group is encoded in the small-end mode. 2. The Bluetooth Address is ** BD_ADDR: ** handle thdevice Address; ** LAP: ** LowerAddress Part is in the low-end mode; UAP:UpperAddress Part high address section; NAP:The Non-significantAddress Part is invalid.

3. Bluetooth clock

Each bluetooth device has an internal system Clock that runs independently. It is called a Local Clock and determines the sending and receiving frequency hopping of the timer. To synchronize data with other devices, you must add an offset to the local clock and provide it to other devices for synchronization.

Four key cycles of Bluetooth Baseband: 312.5uS, 625uS, 1.25 mS, and 1.28 S.

CLKN:Local clock: CLKE:Estimated clock, used during paging scanning;

CLK:The actual clock frequency of the device.

CLKE and CLK are obtained by adding an offset to CLKN.

4. Bluetooth physical link:

The data connection channel of the physical layer between communication devices is a physical link.

Asynchronous Connectionless (ACL) is an Asynchronous Connectionless link. Data communication that is time-insensitive, such as file data and control signaling.

SCO (Synochronous Connection Oriented) synchronizes to Connection links. Time-sensitive communications, such as speech. Up to three SCO links are supported and retransmission is not supported.

ACL is used for data transmission;

5. Bluetooth Baseband grouping:
The baseband grouping includes at least the access code, grouping header, and payload;

(1) Access CodeUsed for the identification of offset compensation for synchronization, DC, and carrier frequency leakage;
(2) Grouping HeaderContains link information to ensure that many errors are corrected.
The group type is as follows:

Group type Type(b3b2b1b0) Time Slot SCO ACL
Link Control Group 0000 1 NULL NULL
0001 POLL POLL
0010 FHS FHS
0011 DM1 DM1
Single Time Slot grouping 0100 1 Undefined NULL
0101 HV1
0110 HV2
0111 HV3
1000 DV
1001 NULL AUX1
3 Time Slot grouping 1010 3 Undefined DM3
1011 DH3
1100 Undefined
1101
5-Time Slot grouping 1010 5 Undefined DM5
1111

The ACL group is in the form of D (M | H) (1 | 3 | 5). D indicates the Data Group. M indicates the medium rate group with a 2/3 ratio of FEC; H indicates the high-speed grouping without Error Correction Codes; 1, 3, and 5 indicate the number of time slots occupied by the grouping;
DM1, DM3, DM5, DH1, DH3, DH5

The SCO group format is HV (1 | 2 | 3 ). HV stands for high-quality language grouping, and the error correction code method adopted by 1, 2, and 3 effective loads. 1: FEC with a ratio of 1/3; 2: FEC with a ratio of 2/3; 4: send a group with a single time slot; 3: Do not use error codes, the device sends a single time slot group with six time slots.

HV1、HV2、HV3

GROUP:

Type Payload Header/byte User payload/byte FEC CRC Maximum symmetric rate/kbps Asymmetric rate/kbps
Forward Backward
DM1 1 0~17 2/3 Yes 108.8 108.8 108.8
DH1 1 0~27 None Yes 172.8 172.8 172.8
DM3 2 0~121 2/3 Yes 258.1 387.2 54.4
DH3 2 0~183 None Yes 390.4 585.6 86.4
DM5 2 0~224 2/3 Yes 286.7 477.8 36.3
MH5 2 0~339 None Yes 433.9 723.2 57.6
AUX1 1 0~29 None None 185.6 185.6 185.6

SCO group:

Type Payload Header/byte User payload/byte FEC CRC Payload length Synchronization rate/kbps Occupied Tsco count/language Length
HV1 None 10 1/3   240 bits 64 2/1.25ms
HV2 20 2/3 4/2.5ms
HV3 30 None 6/3.75ms
DV 1D 10+(0-9)D 2/3D With D 64+57.6D  
Note: D is only useful for data segments. DV groups contain data segments and language segments.

(3). PayloadLanguage-based and data-based loads.

6. Bluetooth Logical Channel Link Control CHannel: LinkControl LC Link Management channel: Link Manage LM User asynchronous data channel: User AsynchronizationUA User synchronous data channel: UserSynchronization US User data channel: UserIsochronous UI 7. Bluetooth receiving and receiving rules


Cache for RX.

TX cache.
When a new group arrives, the RX cache of the ACL link needs traffic control, while SCO data does not need traffic control;

8. Bluetooth baseband channel and Network Control

(1) link controller status:
Standby, connection
Paging page, paging scan pagescan, inquiry query, inquiry scan, Master Response of the Master device, Slave Response of the Slave device, and inquiry response
(2) connection status
Active mode, sniff breathing mode, hold mode, and park sleeping mode.
(3) standby status
The standby status is the default low power consumption status of the bluetooth device. In this status, the local clock runs at a low precision. Bluetooth is transferred from the standby mode to the paging scanning status, and responds to other paging requests to the standby mode. You can also enter the query and scanning status from the standby mode to complete a complete paging task and become the active device.

9. Access Process

Note:
IAC Inquiry AccessCode query access code;
GIAC: Universal Query access code DIAC: dedicated query access code;
DAC: the access Code of the DeviceAccess Code device;
LAP:
To establish a connection, you must use query and paging. IAC is used during the Query Process to discover the addresses and clocks of devices and devices in the coverage area. DAC is used during the connection process to create a connected device to process the paging process, become the master device.

(1) Query Process
The Bluetooth device queries to find other Bluetooth devices in the communication range. The query information can be divided into GIAC and DIAC. Query the address and clock information of the initiator to collect information about all corresponding devices.
One device enters the query status to discover other devices. The query status continuously sends query messages at different frequency points. The queried frequency hopping sequence is exported by LAP of GIAC.
If a device is found by another device, it must periodically enter the query and scan status to query messages accordingly. For example, when we select how long the device is visible, it is actually entering the scanning status query.
A. query Scanning
The length of scan access code of the receiving device in the scan status is enough to scan 16 frequencies. Scan Interval Length: Twindow inquiry scan. Scanning is performed at the same frequency. During the Query Process, a 32-hop dedicated query is used to query the frequency-hopping sequence. This sequence is determined by the general query address, and the phase is determined by the local clock, which changes every 1.28S.
B. Query
Similar to paging, TX queries the frequency hopping sequence and RX queries the corresponding frequency hopping sequence.
C. query the corresponding
Respond to the query operation from the device. Each device has its own clock, and the probability of having the same phase in the query sequence is relatively small. To prevent multiple devices from activating the same query frequency-hopping channel at the same time, the device query response requires that the device receives the query message and generates a random number ranging from 0, lock the input value of the phase at that time for frequency hopping, and return to the connection or standby status from the RAND time slot after the device.

(2) Paging Scanning
DAC: DeviceAccess Code device access Code
The device scan window in the paging scan status listens to your DAC in Twindowpage scan. The listener is only performed at one frequency hop. Twindow page scan is sufficient to cover 16 paging scan Frequency Points.
Paging scan status, which is performed at the same frequency for 1.28 S. select another frequency.

SR Mode Tpage scan Page call Count Npage
R0 Continuous >=1
R1 <=1.28S >=128
R2 <=2.56S >=256
Reserved

(3) Paging
The main device uses paging to initiate a master-slave device connection. It repeatedly sends a DAC to capture the device at different frequency hops. the device is awakened in the paging scan status and receives paging.
(4) Paging Process

3. Link Manager


For example, the red part is responsible for completing equipment: Power Management, link quality management, link control management, data grouping management, and link security management.

1. Link Management Protocol Data Unit

After receiving the control information from a higher level, the bluetooth link manager either distributes the control information to its own baseband, or negotiates with the link manager of another device for management. These control information is encapsulated in the data unit LMP_PDU of The Link Management Protocol, carried by the payload of the ACL group.

2. Link manager Protocol Specification

(1) device power management
The persistence mode, breathing mode, and sleep mode.
(2) QoSQuality of Service
A. ACL link.
B. SCO links.
(3) Link Control Management
Device paging mode, device role conversion, clock timing settings, and information exchange: version information, supported features, device names, connection establishment, and link release.
(4) Data Group Management

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.