Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the access specification of Bluetooth GAP?

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you what the access specification of Bluetooth GAP is, which is concise and easy to understand, which can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Bluetooth GAP- Universal access Specification

The GAP layer of the BLE protocol stack is responsible for dealing with the access mode and process of the device, including device discovery, link establishment, link termination, starting security function, and device configuration.

The GAP layer usually plays one of four roles:

The broadcaster ad sender, not a connectable device viewer, scans ads, cannot start connecting peripheral advertising senders, is a connectable device, initiates a connection as a slave central device when a single link layer connection, and supports three simultaneous connections as a host when a single or multiple link layer connection occurs.

Before connecting, the peripheral device needs to broadcast and inform the central device of its own existence. There are mainly these parameters:

Broadcast interval unit 0.625ms, broadcast fast, easy to be found by central equipment, slow to save power. Broadcast duration in order to save electricity, you can broadcast for a period of time.

In a typical Bluetooth system, the peripheral sends specific advertising data to let any central device know that it is a connectable device. The ad contains the address of the device and can also include some additional data, such as the name of the device. After receiving the advertisement, the central device sends a search request to the peripheral device, and the peripheral device replies to a search reply. This is the process of device discovery so that the central device knows that the peripheral is a connectable device. The central device can send a request for establishing a connection to the peripheral device, and a connection situation contains some connection parameters:

The connection interval needs to be used by the frequency hopping mechanism in a BLE connection, so that data can be sent and received on a specific channel between the two devices, and the LL layer is responsible for channel switching after a specific period of time. The data sent and received by the encounter device is called a connection event. Although there is no application data to send and receive, link layer data is exchanged between the two devices to maintain connectivity. The connection interval is the time between two connection events, using a step with a unit value of 1.25ms. The connection interval ranges from a minimum of 6 (7.5ms) to a maximum of 3200 (4.0s).

Different applications may require different connection intervals, and a long connection interval will save more energy because devices can sleep longer between two connection events. But it will cause the data to be sent untimely, and if there is data to be sent, it can only be sent when the next connection event comes. The slave latency parameter describes the number of times the slave skips connection events. This gives the peripheral some flexibility, and if it does not have any data transfer, it can choose to skip the connection event and stay asleep, thus providing some accumulated strength. This decision depends on the peripheral equipment. Supervisory timeout this is the maximum interval between two successful connection events. If a successful connection event does not occur beyond this time, the device will consider losing the connection and return to an unconnected state. This parameter value uses the step of 10ms. The supervised timeout ranges from a minimum of 10 (100ms) to a maximum of 3200 (32.0 s). At the same time, the timeout must be greater than the valid connection event.

Effective connection event time = connection interval X (1 + slave delay value) short connection interval high power consumption, high data throughput, short send latency, long connection interval, low power consumption, low data throughput, long send wait time or 0 latency slave high power consumption in the case of no data transmission, the slave can quickly receive data from the host with high latency and low power consumption without data transmission. The slave can not receive the data of the host in time, but the host can receive the data of the slave in time.

In some cases, the request of the central device to establish a connection with the peripheral device including connection parameters is disadvantageous to the peripheral device. In other cases, the peripheral can change the connection parameters during the connection process, depending on the application of the peripheral. The peripheral device can request the central device to change the connection parameters by setting the connection parameters to update the request. This request is processed by the L2CAP of the protocol stack.

This request contains four parameters: minimum connection interval, maximum connection interval, slave delay, and supervised timeout. These values represent the expected parameters of the peripheral for the connection, and the connection interval is provided in the form of a range. When the central device receives the request, it has the right to decide whether to accept or reject these parameters.

GAP is also usually responsible for initiating the security function of the BLE connection. Only some data is readable or writable for authenticated connections. Once a connection is formed, two devices can go through a process called pairing. When pairing, the key establishes a link between encryption and authentication. In a typical case, the peripheral requires the central device to provide a key to complete the pairing process. This may be a fixed value, such as "000000", or a randomly generated value may be provided to the user. After the central device sends the correct key, the two devices exchange links for security key encryption and authentication.

In many cases, the same central and peripheral devices will often establish and disconnect. BLE has a security feature that allows two devices to give each other a permanent security key when pairing. This feature, called binding, enables two reconnected devices to quickly re-establish encryption and authentication without going through a full pairing process, as long as they store long-term key information.

The above is what the access specification of Bluetooth GAP is. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report