Adaptive frequency hopping bluetooth

2 Ways Bluetooth Technology
Makes Wireless Connections Reliable

One of the biggest challenges for any wireless technology in providing reliable data communication is interference. Unlike wired data communications technologies, wireless technologies must share the transmission medium and multiple devices may try to communicate over the same wireless spectrum, in the same general area, and at the exact same time. When this happens, in-air collisions between data packets occur which can make a packet unreadable by the receiving device and effectively lost.

This challenge is especially true in unlicensed spectrum bands, such as the global ISM band, where a communications technology needs to accommodate potential interference from other devices using the same communications technology, as well as devices using other communications technologies that operate in the same band.

Channels that are noisy and busy are dynamically tracked and avoided.

For example, Bluetooth ® technology operates in the same 2.4 GHz ISM frequency band as Wi-Fi and technologies that utilize the IEEE 802.15.4 standard. As a result, it’s possible for a packet being transmitted between two Bluetooth devices to be corrupted or lost if it collides with a packet being transmitted at the exact same time and frequency channel between other in-range Bluetooth, Wi-Fi, or 802.15.4 devices. Other devices utilizing the 2.4 GHz band can also cause unwanted electromagnetic noise in the environment, including lights, microwave ovens, baby monitors, and garage door openers, to name just a few.

There are many techniques for mitigating interference. For a detailed discussion on the mitigation techniques, Bluetooth technology uses to increase reliability, check out Martin Woolley’s paper on Understanding Reliability in Bluetooth Technology. In this article, we will look at how Bluetooth technology overcomes potential interferers and enables reliable wireless data communication by using adaptive frequency hopping and small, fast data packets.

Small, Fast Packets

When trying to avoid collisions, it’s best to be small and fast. For example, when compared to other low-power wireless mesh networking technologies, Bluetooth ® packets are typically half the size and four times faster. Having small, fast packets enables more efficient use of spectrum and significantly lowers the probability of collisions.

Bluetooth ® packets are hard to hit.

As Szymon Slupik, CTO at Silvair and Chair of the Bluetooth Mesh Working Group, often says, the math is simple: the shorter the packet the fewer collisions. The reliability of any wireless system is all about spectral efficiency. According to Slupik, the size of Bluetooth mesh packets is one of the biggest reasons why Bluetooth mesh networking is “the first wireless standard capable of meeting the enormous expectations of the IoT era.”

Slupik is not alone in his praise for the packet. Woolley references the Bluetooth mesh packet in relation to scalability and capacity of a high-density device network. As Woolley says:

The less radio airtime a packet requires, the lower the probability of a collision. The small packet size of Bluetooth ® mesh and the high symbol rate of the Bluetooth LE radio reduce the required airtime for a packet and means that Bluetooth mesh networks fare well in this respect.

But Bluetooth packets don’t just have size and speed on their side. They’re also good at avoiding conflict.

Читайте также:  Айфон 4 как работать с блютуз

Adaptive Frequency Hopping

Spread spectrum techniques can increase the resiliency of a wireless technology in busy radio environments where collisions and interference are more likely to occur. Adaptive Frequency Hopping is a unique spread spectrum technique Bluetooth technology utilizes to avoid interference.

To understand how Adaptive Frequency Hopping works, it helps to look at how Bluetooth technology divides the 2.4 GHz ISM band. First, like many wireless communication protocols, Bluetooth technology uses more than one radio channel. Bluetooth Low Energy (LE) divides the 2.4GHz ISM radio band into 40 channels, while Bluetooth BR/EDR divides it into 80 channels.

Bluetooth technology also hops between transmission channels to further decrease the probability of collisions with other in-range transmissions. Frequency hopping frees up more radio capacity for messages, making communication more reliable. Frequency hopping is not necessarily unique to Bluetooth technology. But what happens next is.

Adaptive Frequency Hopping adds intelligence to frequency hopping and enables Bluetooth packets to adapt to avoid active, congested channels. Channels that are noisy and busy are marked and not used. The list of reliable channels and busy channels can change quickly, as other wireless communication devices and noise in the environment come and go. Adaptive Frequency Hopping allows Bluetooth technology to dynamically track which channels are functioning best and find the most reliable path.

Bluetooth ® packets avoid conflict.

Источник

Adaptive Frequency Hopping

Bluetooth functions in the 2.4 GHz frequency range. Because this is an ISM band, it’s highly likely to have interference with other devices working in the same frequency band. The Bluetooth standard makes it possible for the communicating devices to agree on which channels to use from the 37 available data channels during communication. If the central device detects high interference on a channel, it can initiate a channel map update. Adaptive frequency hopping (AFH) means that the communicating devices are continuously monitoring their environment for interference and are continuously changing the channel map to address the interference.

Note: AFH is a requirement for using TX power over +10 dBm. See Bluetooth TX power settings.

Non-Adaptive Channel Blocking

Channel map update procedure is part of the Bluetooth 4.0 specification. This procedure makes it possible for the peer devices to agree on which channels they will use from the available 37 data channels during communication. Channel map update procedure can be initiated by the central device only.

Читайте также:  Jbl headphones bluetooth driver

This procedure is supported in all SDK versions because it’s part of the Bluetooth 4.0 standard. For example, if a smartphone connects to an EFR device, the smartphone, which is a central, can disable some channels and the EFR will accept it. This feature is very often used to disable the Bluetooth channels that overlap with the Wi-Fi channels used by the smartphone.

However, when the EFR is the central, the EFR will enable all channels by default, without any restriction, and they can be disabled only manually. See section Manual Channel Blocking. Adaptive Frequency Hopping was introduced to overcome this issue and to block low-quality channels dynamically.

Interference Detection

Starting with Bluetooth SDK v3.x, Adaptive Frequency Hopping feature can be enabled by installing the AFH (Adaptive Frequency Hopping) software component to your project. When this component is installed, the sl_bt_init_afh() function is automatically called inside sl_bt_init() by the code generator. This process initializes and and enables adaptive frequency hopping without needing to call sl_bt_init_afh() in the application directly.

If AFH is enabled and at least one advertiser is running with extended advertisements or at least one connection is active, the Bluetooth stack runs a periodic background task that sweeps all channels once every afh_scan_interval and measures received power on each channel. If the measured power is beyond limit (-71 dBm) on a channel, the channel is blocked for at least 8 afh_scan_interval s. (If interference is still found on the channel, the blocking is prolonged, i.e., unblocking of a channel needs 8 consecutive measurements with no interference detected.)

After each sweep, a new channel map is created based on the interference measurements. If the channel map has changed, the central device sends the new channel map to all slaves, using the channel map update process. Slaves cannot initiate channel map update.

ah_scan_interval is set to 1 second by default and the sweep of the 40 channels takes around 10 ms, which means an additive energy consumption of ca. 240 uW.

Note: The AFH sweep has the highest priority among all Bluetooth operations. Therefore, if there are multiple operations within 10 ms, sweeping cannot be fitted between them and they may be blocked.

Additive energy consumption

Changing Scan Interval

afh_scan_interval is set to one second by default, i.e., one channel sweep is made every second. The afh_scan_interval can be changed by calling the following function:

#define AFH_SCAN_INTERVAL_CONFIG_KEY 7 uint8_t afh_scan_interval = 10; // set afh scan interval to 100ms sl_bt_system_linklayer_configure(AFH_SCAN_INTERVAL_CONFIG_KEY,sizeof(uint8_t),&afh_scan_interval);

The unit of afh_scan_interval is 10 ms.

Channel sweep is always done after a radio operation, e.g., after an advertisement is sent. Setting the scan interval e.g., to 100 ms does not mean that the sweep will be done every 100 ms but that after every radio operation the Bluetooth stack checks if at least 100 ms has passed since the last sweep. Let’s say that afh_scan_interval is set to 100 ms and advertising is done with 80 ms advertisement interval. In this case, the scan is done after every second advertisement, i.e., once every 160 ms.

Читайте также:  Настроить телефон модем bluetooth

Manual Channel Blocking

Channels can also be blocked manually using the following command: sl_bt_gap_set_data_channel_classification() . For details, see le_gap_set_data_channel_classification. If a channel is blocked manually, that channel will be never used until it is unblocked manually. In other words, the channels blocked by interference detection and channels blocked manually will be merged into a common channel map.

Transmit Power

You are allowed to use TX power above +10 dBm when AFH is enabled and at least 15 channels are available. See Bluetooth TX power settings. However, note that high transmit power is only allowed once for each channel after a measurement on that channel occurs. In other words, if you use the same channel multiple times for transmitting within afh_scan_interval , the second and consecutive transmission will use +10 dBm. If you have a short connection interval and long afh_scan_interval, this can easily happen. See the following figure:

Energy profiler

Peripheral Adaptivity

To be ETSI compliant, peripheral devices need to be adaptive as well. The central device might be non-adaptive, so the peripheral cannot blindly follow the transmissions of the central. ETSI allows using control transfer on blocked channels with +10 dBm or lower, but not data transfer. For ETSI compliance reasons, if the peripheral detects that a blocked channel is used, it will only send a single empty/control packet on that channel to prevent supervision timeout.

Frequency Hopping Algorithm

Bluetooth Low Energy has two channel selection algorithms. Algorithm #1 is the original and mandatory. Algorithm #2 was introduced with Bluetooth 5.0. The hopping algorithm used is chosen by the central at connection time. Algorithm #2 has more randomness so it is always used unless connecting to a legacy device.

  • Algorithm #1: Channels are selected sequentially using fixed hop interval passed while establishing connection.
  • Algorithm #2: The channel to be used is calculated from the current event counter and access address. The selected channel appears to be semi-random.

If a channel to be used is blocked on the channel map, the channel is remapped to an available channel using a remapping algorithm.

Other Limitations

When AFH is applied, the length of the connection events (not to be confused with the connection interval) is limited to 40 ms. In other words, in every connection interval you can send packets only for 40 ms. This is usually not a problem because it takes around 2.5 ms to transmit a packet with 251B payload. However, to achieve maximum throughput with unacknowledged data transmission (see Throughput with Bluetooth Low Energy, you have to take into account this limitation. For example, if you have 100 ms connection interval, you can send packets only 40% of the time. To achieve maximum throughput, decrease your connection interval to 40 ms or lower.

Источник

Оцените статью
Adblock
detector