How to interpret 'hcitool afh' (AFH map)

by DrTobbe   Last Updated April 15, 2018 21:02 PM

Sometimes, I have problems when I use Wlan and Bluetooth concurrently. I wanted to check if they use the same frequencies and found out that I can check the current AFH-map with hcitool afh.

The result looks something like

[email protected]:~$ hcitool afh xx:xx:xx:xx:xx:xx
AFH map: 0xff4f28000000f0fe0000

So now, what does that mean, where is that documented?

Tags : bluetooth

Answers 1

I just came across this question looking for the meaning of "AFH map". Although the question is quite old, I'd like to share my findings.

There are (at least) two different mechanisms that help to reduce the interference between Bluetooth and WiFi:

1. Adaptive Frequency Hopping (AFH)

Bluetooth devices transmit on 79 different channels, spaced 1 MHz apart between 2,402 MHz and 2,480 MHz. During data transfer, the sender changes the used channel very quickly in a pseudo-random order ("hopping sequence") to reduce the chance of interference caused by other radio services using the same frequency range. The receiver knows the sequence and "hops" the channels synchronously with the sender.

The basic principle of AFH is simple: Channels with known interference are simply left out of the hopping sequence. The AFH map simply tells both communication devices which of the 79 channels are good to use and which to leave out. The AFH map consists of 80 bits (20 hex digits) corresponding to the 79 channels (and 1 reserved bit).

Channels usable for Bluetooth have the corresponding bit in the AFH map set. That is, the more "1" bits you see, the less interference is there and consequently the more throughput your Bluetooth link will have.

AFH was introduced with Bluetooth 1.2. You can find more details e.g. in the Bluetooth 5.0 Core Specification (search for "AFH channel map" in the PDF file).

2. Bluetooth Coexistence

While AFH covers any (probably external) source of interference, BT coexistence is designed to minimize interference caused by a Bluetooth interface and a WiFi interface that are co-located in the same device (i.e. laptop, smartphone). Basically there is a wire running from the WiFi chip to the Bluetooth chip. Whenever the WiFi chip is transmitting a frame, it tells the Bluetooth chip to "shut up for a moment" until the WiFi transmission is over.

Over time, different, more elaborate variants of this basic scheme were developed (2-wire, 3-wire, unidirectional, bi-directional etc.)

April 15, 2018 20:51 PM

Related Questions

Bluetooth HSP/HFP not working but A2DP is

Updated June 16, 2015 03:01 AM

Bluetooth headphones sound lagging problem

Updated December 08, 2017 20:02 PM

Cache file /home/queryxchang/public_html/apps/frontend/config/../cache/-q-3-607940-how-to-interpret-39-hcitool-afh-39-afh-map- could not be written