Bluetooth Low Energy (BLE) is a wireless communication technology, which has the advantages of low power consumption, short distance, safety and reliability, and has been widely used in communication between various smart devices. This article will introduce the basic flow of Bluetooth low energy connection to help readers better understand and apply this technology.
The basic process of Bluetooth low energy connection includes three steps: scanning, connection and communication. Below we will introduce the specific content of each step one by one.
Scanning: Scanning between devices is required before a Bluetooth Low Energy connection is established. There are two scanning methods: active scanning and passive scanning. Active scanning refers to initiating a scan from a central device (such as a mobile phone) to search for surrounding peripheral devices (such as a Xiaomi smart bracelet)
). Passive scanning is when the peripheral device is discovered by the central device when it broadcasts its own information. The unique identifier of the device can be obtained by scanning
Connection: A connection refers to the establishment of a communication link between a central device and a peripheral device. The connection consists of the following steps: First, the central device sends a connection request to the peripheral device. The peripheral then replies with a connect response and begins establishing the communication link. Next, the central device and the peripheral device conduct service discovery to determine the services and feature values supported by each other. Finally, the central device and peripheral devices perform operations such as reading and writing characteristic values and subscribing.
Communication: After the connection is established, data transfer between the central device and the peripheral device is possible. Bluetooth low energy communication adopts a "master-slave" architecture, that is, the central device is responsible for controlling the communication process, while the peripheral device passively accepts and responds. During the communication process, the central device will send instructions to the peripheral devices, including operations such as reading, writing, and subscribing. Peripheral equipment performs corresponding processing according to the instruction, and returns the result to the central equipment
It occupies 6 bytes, and the remaining 31 bytes can be customized. The 31 available bytes are organized according to a certain format and divided into n AD Structures.
To sum up, the Bluetooth low energy connection process includes three steps: scanning, connection and communication.Industrial Router/Gateway Through these steps, a stable and efficient communication link can be established between the central equipment and the peripheral equipment to realize data transmission and control operations. In daily life, Bluetooth Low Energy has become an important means of interconnecting smart devices, bringing people a more convenient and smart life experience. Such as lighting, temperature, security, etc. Users can use smartphones
or voice assistants to control and manage these devices, thereby improving the comfort and safety of home life.