Analysis of Bluetooth baseband data transmission mechanism

Source: Internet
Author: User
Bluetooth baseband data transmission mechanism analysis zdnet network channel Update Time:
Author:
Source:
Key words: Bluetooth
Wireless Network

 
Bluetooth is a new, open, low-cost, and short-distance wireless connection technology that can replace short-distance cables for wireless voice and data transmission. This effective and inexpensive wireless connection
The connection technology can easily connect computers and peripherals, mobile phones, handheld computers, Information appliances, and other devices, all kinds of information-based mobile devices can achieve seamless resource sharing within the scope that it can achieve.
The wireless LAN (wirelesslan) is connected to the Internet to achieve wireless transmission of multimedia information.


The Bluetooth system adopts a distributed (scatter) structure. The devices and the sub-networks form a network (piconet). It supports point-to-point and point-to-point multi-point communication. It adopts gfsk modulation and has anti-interference performance.
Well, the fast frequency hopping and short packet technology are used to reduce the interference of the same frequency and ensure the reliability of transmission. The frequencies used are GHz ISM frequencies that do not require permission.


The Bluetooth protocol consists of the core protocol, Recomm protocol, circuit control protocol, and selection protocol. The core protocol is the Bluetooth patent protocol, which is fully enabled by the Bluetooth Sig.
Release, including the baseband protocol (bb), Connection Management Protocol (LMP), Logical Link Control and Adaptation Protocol (L2CAP), and Service Discovery Protocol (SDP ). The architecture of the Bluetooth protocol can be further divided into the underlying layer.
Hardware module, intermediate protocol layer, and high-end application layer, among which the link management layer (LM), baseband (bb), and RF layer (RF) constitute the underlying bluetooth module. It can be seen that the baseband layer is the weight of the Bluetooth protocol
Components. This article mainly analyzes the most important baseband data transmission mechanism in Bluetooth technology.

1 baseband protocol Overview



Figure 1 shows the structure of the Bluetooth system. In a Bluetooth system, the network connected to a device is called the pico network (piconet), which is composed of a master node (masterunit) and
Composed of multiple slave nodes (slaveunit. The master node is the bluetooth device used to synchronize other nodes in the micro-network. It is the initiator of the connection process and can maintain connections with up to seven slave nodes at the same time. Slave node is micro
Devices except the master node in the microgrid. Two or more micro networks can be connected to form a scatternet ).


Figure 2 shows the Bluetooth protocol structure. The baseband layer is located above the Bluetooth RF of the Bluetooth protocol stack, and together with the RF layer forms the Bluetooth physical layer. Essentially, as a link controller, it describes the baseband Link
The digital signal processing specification of the controller, working with the link manager, is responsible for implementing the link layer such as connection establishment and power control, as shown in 3. Baseband transceiver divides time while frequency hopping
(Time Division), using Time Division Duplex (TDD) mode of work (alternate transmission and receipt), the baseband is responsible for writing digital signals and reading data from the transceiver. Mainly manages physical channels and links, and is responsible for frequency hopping and blue
Transmission of tooth Data and Information frames, such as error correction, data whitening, and Bluetooth Security. The baseband also Manages synchronous and asynchronous links, processes packets, performs paging, queries and accesses, and obtains Bluetooth devices.


In the Bluetooth baseband protocol, four types of addresses can be used for the same scenario and status. The 48-bit bluetooth device address bd_addr (IEEE802 standard) is a bluetooth device.
The unique standard of the connection process. The three-bit address am_addr is used to identify the active member in the micro-network. The three-bit address is used for broadcast information, and the eight-bit address of the sleeping node in the micro-network.
Pm_addr is used to identify the slave node that is sleep in the micro-network. The sub-network access address ar_addr is allocated to the slave node in which the wake-up process is to be started.

When the micro-network Master communicates from the node, they must be synchronized. The clock used for synchronization includes the clock clkn of the local device that is neither adjusted nor closed, the system clock CLK of the master node in the micro-network and the clock of the master node periodically update the clock of the local device on the slave node to keep the master-slave synchronous compensation clock clke.


Like other wireless technologies, micro-grids in Bluetooth can transmit data wirelessly through various channels. Physical channels represent the pseudo-random frequency hopping sequence of 79 or 23 RF channels.
The frequency-hopping sequence of a micronetwork is unique and determined by the IP address of the active node's bluetooth device. In addition, there are five logical channels for transmitting different types of information, which are:

(1) LC channel: control channel used to transmit link layer control information;

(2) LMC channel: A link management channel used to transmit Link Management Information at the link layer;

(3) UA channel: User channel used to transmit Asynchronous User information;

(4) UI channel: User channel, used to transmit user information at the same time;

(5) us Channel: User channel used to transmit synchronized user information.

In the Bluetooth system, master and slave nodes transmit data in turn using the Time Division Duplex (TDD) mechanism. Therefore, the channel can be divided into a time slot (timeslot) with a length of 625 μs and numbered (0-227-1) with the master node clock of the micro-network ), the master and slave nodes send data in odd and even time periods respectively.

2 bluetooth data transmission


Bluetooth supports circuit and group switching. Data is transmitted in the channel in the form of group, and traffic control is used to avoid group loss and congestion. In order to ensure the correct transmission of group package data, we also conduct data Whitening and error correction. The following analyzes these transmission mechanisms respectively.

2.1 Bluetooth Group


Group package data can contain voice, data, or both. Packet grouping can take up multiple time periods (Multiple Time Slot groups) and can continue sending at the next time slot. The payload also carries a 16-bit error.
False verification identification and verification (CRC ). There are 5 common group types, 4 SCO group packages and 7 ACL group packages. Generally, the packet format is 4.

The access code is used for timed synchronization, offset compensation, paging, and query. There are three different types of access codes in Bluetooth:

(1) Channel Access Code (CAC): used to identify a micronetwork;

(2) Device Access Code (DAC): used for device paging and response;

(3) query access code (IAC): used for device query purposes.


The header contains six fields for Link Control. Am_addr indicates the active Member Address, type indicates the group type, flow is used for ACL traffic control bit, arqn
Is the group package validation identifier. seqn is the group number used for grouping and shuffling, and HEC verifies the group header. Bluetooth uses a fast and unnumbered packet confirmation method, and sets an appropriate arqn value to differentiate and determine
Whether the data group package is received. If the packet times out, the packet is ignored and the next packet is sent.

2.2 link and Flow Control


Bluetooth defines two link types: connection-oriented synchronization Link (SCO) and connectionless asynchronous Link (ACL ). The SCO link is a symmetric point-to-point synchronization link between master and slave nodes.
The SCO group is sent during the remaining time, which is a circuit exchange and mainly carries voice information. The master node supports three SCO links at the same time, and the slave node supports two ~ Three Links to SCO, not supported by SCO group packages
Retransmission. The SCO link is established by sending a SCO message through the master node LMP. The message contains the scheduled parameters (tsco and dsco ).


An ACL Link provides an asynchronous or synchronous data exchange mechanism between a primary node and any slave node in a time slot that is not reserved for the SCO link. One master-slave node can maintain only one ACL chain.
. When multiple ACL groups are used, Bluetooth uses the packet retransmission mechanism to ensure data integrity. When the ACL group does not specify a slave node, it is considered as a broadcast group, and each slave node receives this group.


We recommend that you use FIFO queues for sending and receiving ACLs and SCO links. The Connection Manager is responsible for filling these queues, and the connection Controller is responsible for automatically clearing queues. Receive FIFO
When the queue is full, use flow control to avoid group loss and congestion. If data cannot be received, the receiver's connection controller sends a Stop command and inserts it into the returned group header,
And the flow position is 1. When the sender receives the stop instruction, its FIFO queue is frozen to stop sending. If the receiver is ready, send a go group to the sender to resume data transmission,
The flow position is 0.

2.3 Data Synchronization, scrambling, and error correction


Because the bluetooth device transmitter uses the Time Division Duplex (TDD) mechanism, it must send and receive data in a synchronous manner. The system clock of the master node is used to synchronize data and determine the frequency hopping.
The phase in the sequence. When the micronetwork is created, the master node clock is transferred to the slave node. Each slave node adds an offset to its local clock to synchronize the clock with the master node. The master node does not
The system clock is adjusted. In order to match the clock of the master node, the slave node will update the cycle at the offset. The Bluetooth clock should have a resolution rate of at least 312 μs. Average sending time of the master node group and
Compared with the ideal 625ms time slot, the offset cannot exceed 20ppm, And the jitter (jitter) should be less than 1 ms.

Before grouping data is sent out and FEC encoding is performed, the grouping header and the Net Load need to be disturbed to randomize grouping packets. When receiving a Data Group package, use the same white text to remove the disturbance.


To improve data transmission reliability and system anti-interference, the bluetooth data transmission mechanism adopts three Error Correction Methods: 1/3-rate FEC encoding (that is, each data bit repeats three times) and 2/3-rate redundancy FEC encoding.
(A Polynomial generator is used to encode a 10-bit code into a 15-bit code) and the automatic data re-sending method (that is, the sender resends the data packet until it times out before receiving the confirmation message from the receiver ).

Figure 4 Bluetooth group package format

3 Bluetooth device connection



The Bluetooth connection controller works in two major states: standby and connection ). In a bluetooth device, standby is the default low-power status and only runs the current
Local clock and do not interact with any other device. In the connection status, the master node and slave node can exchange packet for communication. Therefore, to achieve mutual communication between bluetooth devices, you must establish a connection with each other. Because Bluetooth
The ISM frequency band is an open band for all radio systems and may encounter a variety of interference sources. Therefore, Bluetooth uses grouping packets to quickly confirm the technology and Frequency Hopping scheme to ensure the stability of links and channels. After establishing a connection and
During the communication process, the frequency hopping sequence is used as the physical channel, and the frequency hopping option is to select the communication channel.

3.1 frequency hopping


The frequency hopping technology divides the frequency band into several frequency hopping channels ). The radio transceiver continuously jumps from one channel to another according to a certain code sequence (in the way of generating random numbers) and receives
Both parties can communicate and synchronize according to this rule. The instantaneous bandwidth of frequency hopping is very narrow, and the impact of interference is minimized by the Spread Spectrum Technology. When a device is activated, the device is allocated 32 hops frequently,
In the future, the device will receive and send information on these frequency hops. The General Frequency Hopping scheme consists of two parts: select a sequence and map the sequence on the frequency hopping point. In each case, you need-
From two frequency hopping sequences. The frequency hopping sequence used in the Bluetooth system is as follows:

(1) call frequency hopping sequence: Used in the call (PAGE) status;

(2) Call response sequence: Used in the call response (pageresponse) status;

(3) query sequence: Used in the inquiry status;

(4) query response sequence: Used in the inquiryresponse status;

(5) channel frequency hopping sequence: Used in connection status.

3.2 establish a Bluetooth connection

The connection is established from the pending status to the connection status. Generally, the connection process between two devices is as follows:


First, the master node uses Giac and DIAC to query the Bluetooth devices in the specified range (query status ). If any nearby bluetooth device is listening for these queries (querying the scan status), it sends its address and time
After the clock information, the slave node can start to listen to the paging messages (paging scan) from the master node. The master node can call these devices (paging status) to establish a link between devices nearby. In the paging scan slave settings
After the slave node is called by the master node, it will respond to the slaveresponsesubstate with a DAC (Device Access Code ). After receiving the response from the slave node, the master node can send the response
The node's real-time clock, bd_addr, BCH parity, and device class (FHS packet) are connected after the FHS group is received from the node. Specific process 5.

Figure 5 shows that the master node and slave node are in different States at different stages of the call established by the Bluetooth connection, including:

Inquiry, IAC is used in the query process;

Inquiryscan: the bluetooth device periodically listens to query messages from other devices so that they can be found. During scanning, the device can listen to the common query access code (Giac) and specific query access code (DIAC );

Query response (inquiryresponse): The slave node responds to query messages in FHS groups. It carries the DAC and local clock information of the slave node;

Page: the master node activates a slave node and establishes a connection by sending messages in different frequency hopping sequences. DAC is used during paging;

Pagescan: periodically wakes up a node in the scan window and listens to its DAC, select a scanning frequency based on the paging frequency hopping sequence on the scanning window every 1.28s from the node;

Slave node response (slaveresponse): When the slave node receives a paging message from the master node in the paging scan status, it enters the response status and responds to the paging message of the master device;

Master response: after the master node receives a response from the slave node to its paging message, the master node sends an FHS group to the slave node. If the slave node responds to the response, the master node enters the connection status.

3.3 connection status


The connection status starts when the master node sends a poll group, indicating that the connection has been established. At this time, the group package can be sent back and forth between the master and slave nodes. Both ends of the connection make
Use the access code and clock of the master node, and use the Hop Frequency as the channel Hop Frequency Sequence. After the connection is established, the bluetooth device address (bd_addr) of the master node determines the frequency hopping sequence and the channel access code. In connection status
The following sub-States are available:

Active: In this mode, the master and slave nodes send and receive packets through the channel, and keep them synchronized;

Sniff: In this mode, the slave node does not support ACL grouping, that is, the ACL link enters the low-energy sleep mode, and resources are empty, make the activity and channel such as paging and scanning still available;

Park: when the slave node does not have to intervene in the micro-network channel, but still wants to maintain synchronization with the channel, it can enter the park (sleep) mode, at this time there are few activities in the low consumption mode, the slave node abandons am_addr and uses pm_addr.

4 Bluetooth full Mechanism



Bluetooth completeness is important if bluetooth technology can be used to achieve unlocked doors or automatically pay for orders in supermarkets. The Bluetooth protocol provides a reliable security mechanism for data transmission. First, the Bluetooth Baseband Section
At the physical layer, users are provided with protection and information encryption mechanisms, while at the link layer, user information is encrypted through equivalent authentication. The Bluetooth device uses the query/response method for authentication during connection. One device sends one
Password or query, and the response from the device is the password, which can prevent theft and misuse. The information encryption mechanism is used to encrypt user data or information after a bluetooth device is connected,
This increases system security. The link layer has four parameters to ensure communication security: the bluetooth device address bd_addr, the authentication private key, the encrypted private key, and the random code Rand. If the user has a higher level
You can use a more effective transport layer and application layer full mechanism. In short, the purpose of Bluetooth's complete mechanism is to provide appropriate levels of complete protection. Because Bluetooth is a very complicated problem,
We will not discuss it further here.


This article mainly analyzes and discusses the most basic and important baseband layer of Bluetooth technology, and lays the foundation for further in-depth research and development and application of Bluetooth technology. Bluetooth technology is mainly used in a small range
Home and office information transmission systems and information appliances, so the development and application of Bluetooth technology is of great practical significance. In particular, our country is densely populated and has broad application prospects.
Important impact

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.