You are on page 1of 19

Bluetooth Adaptive Frequency

Hopping on a R&S CMW


Application Note
Products:
ı R&S®CMW500
ı R&S®CMW270

This document describes the adaptive frequency hopping


mechanism for improved signaling performance in Bluetooth
Basic Rate and Enhanced Data Rate devices.

The R&S CMW provides this feature for remote operation in


TX, Loopback and Connection test mode. Thereby the
R&S CMW acts as a master, while the Equipment under Test
(EUT) represents the slave(s) of the piconet.

Note:
Please find the most up-to-date document on our homepage
http://www.rohde-schwarz.com/appnote/1C108.
This document is complemented by software. The software may be
updated even if the version of the document remains unchanged
Roland Roed
11.2016 – 1C108_0e
Application Note
Table of Contents

Table of Contents
1 Introduction ......................................................................................... 3

2 Basic Ideas .......................................................................................... 4


2.1 Adaptive Frequency Hopping .....................................................................................4
2.1.1 Hopping characteristics .................................................................................................5
2.1.2 Channel Map..................................................................................................................7
2.1.3 Channel Detection on the CMW ....................................................................................9
2.1.4 Channel Reporting Algorithm .......................................................................................10
2.2 BT with a coexisting WLAN signal ...........................................................................11
2.3 Connection States .....................................................................................................12
2.3.1 TX Test Mode (ACL Connection) .................................................................................12
2.3.2 Loopback Test Mode (ACL Connection)......................................................................12
2.3.3 Connection Test Mode (ACL Connection) ...................................................................13
2.3.4 Audio Profile (SCO Connection) ..................................................................................13

3 Test Setups ....................................................................................... 14


3.1 EUT without USB Port ...............................................................................................14
3.2 EUT with USB Port .....................................................................................................14

4 Remote Procedures .......................................................................... 15


4.1 AFH Remote Commands ...........................................................................................15
4.2 AFH Configuration Examples ...................................................................................16

5 Ordering Information ........................................................................ 18

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 2
Introduction

1 Introduction

Adaptive Frequency Hopping (AFH), introduced by the Bluetooth® Special Interest


Group in the Core Specification Version 1.2, is designed to improve the robustness of
Bluetooth radio performance in the unlicensed ISM band at 2.4 GHz. Facing ambient
multiple air interface technologies (WLAN, DECT, etc.) AFH performance is dedicated
to mitigate against potential impacts of interference and fading.

The R&S CMW 1 performs as a master in Basic Rate / Enhanced Data Rate (BR/EDR)
test mode using a predetermined clock and frequency pattern. The Equipment under
Test (EUT) acting as slave device(s) is synchronized to the CMW’s clock and
frequency pattern. The quality of the physical radio channel used by this piconet is
commonly assessed by the following parameters via common RX quality
measurements:
ı Received Signal Strength Indication (RSSI)
ı Packet or Bit Error Rate (PER / BER)
ı Signal to Noise Ratio (SNR).
The metrics, which are used to determine on air interference, are not exposed in the
Bluetooth Signaling firmware application (FWA) on the CMW. Details can be found in
section 2.1.3.

A full feature set required for AFH testing is available at the CMW, when remote
operated. In future AFH testing will be extended to the Bluetooth Signaling application
user interface on the CMW.
The AFH test capability is not supported for Bluetooth Low Energy (LE) testing, since
the CMW performs in Direct Test Mode, which is a non-signaling mode.

1 The R&SCMW500 or R&SCMW270 is referred to as CMW in this document.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 3
Basic Ideas

2 Basic Ideas
2.1 Adaptive Frequency Hopping
Frequency Hopping Spread Spectrum (FHSS) was first introduced by the Bluetooth
(BT) Special Interest Group (SIG) in the Core Specification Version 1.2. The basic idea
is, that the channel frequency, which is shared by each member of a piconet, is
periodically changed. The frequency of a BT radio is changed by frequency hops
between channels in the unlicensed ISM band at 2.4 GHz. The hopping process is
performed in a pseudo-random manner in order to reduce interference effects and to
meet local regulatory requirements.
The channel set comprises 79 channels, each of 1 MHz bandwidth, where the BT
device is able to hop onto. The relation between the center frequency fc of the channel
and the channel number k can be summarized to:
fc = 2402 MHz + k ∙ 1 MHz ; k = 0, 1, .., 78

Frequency Hopping is used in the BT inquiry and page scan substates with 32
channels available to hop onto at a maximum hop rate of 3200 Hz. It is also used in the
BT connection state, thereby restricted to a maximum hop rate of 1600 Hz with the
ability to access all the 79 channels. The minimum number Nmin of available channels
within the piconet is 20.
Adaptive Frequency Hopping (AFH) is available for the BT connection state only. The
term Adaptive is used to indicate, that during the hopping process channel conditions
are permanently monitored to identify occupied or low quality channels, which are
stated bad channels. The bad channels are excluded from the available channels
within the hopping pattern until they become good channels again. In order to
guarantee, that the number of available channels N is larger or equal Nmin, bad
channels can be also present within the currently used hopping pattern.

Fig. 2-1: FHSS example in the ISM band & bad channels due to a coexisting WLAN signal

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 4
Basic Ideas

2.1.1 Hopping characteristics

The basic piconet physical channel is characterized by a pseudo-random hopping


through all 79 RF channels. The hopping pattern is unique and derived from the clock
and BT device address of the master. After establishing the piconet the slave clock is
synchronized to the master clock by adding an offset to the slave’s native clock. The
offsets are updated regularly, since the device clocks are independent.
Thereby all devices within the piconet are time and frequency synchronized. A typical
setup with a BT transmitter and a BT receiver both synchronized is shown in the block
diagram below.

Fig. 2-2: BT Frequency Hopping Spread Spectrum (FHSS) block diagram

Time Slots
BT transmission channels are divided into time slots, each slot being 625 µs in length
and numbered according to the most significant 27 bits of the BT clock. The time slot
number, denoted as k, therefore ranges from 0 to 227-1. BT packet transmission can
extend up to five time slots on the CMW, which is the maximum specified BT standard
packet transmission.

Fig. 2-3: TDD scheme: Multi-slot packet transmission and frequency hops f(k)

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 5
Basic Ideas

Hopping Pattern
A Bluetooth device will 'hop' between the 79 frequency channels in a predetermined
sequence at a hop frequency, which is directly linked to the number of time slots used
for data transmission. Bluetooth transmission channels are divided into time slots, each
slot being 625 µs in duration. Packets can be either 1, 3, or 5 slots in duration, i.e. one
frequency hop per packet, independent from the number of slots.

Fig. 2-4: Hopping frequency and time slot duration

The pseudo-random hop generator will repeat itself after a certain number of hops. The
hop period during normal piconet communications is 227 hops long. Accordingly the
hopping pattern will repeat itself after about 23.3 hours, taking into account that the
hop rate is 1600 hops per second. The hop period is long in order to avoid accidental
hop synchronization between two different piconets within mutual range.
The pre-determined hop sequence is pseudo-random in nature. The master device
provides the hop sequence to all slave devices within the piconet during the paging
process.

Adaptive hopping
The term 'Adaptive' comes from the ability of the master and all slaves within a piconet
to be able to monitor channel conditions and avoid bad channels, if necessary. The
channel quality measurements are made by all devices within the piconet, since
interference depends on the device location and transmitted power.
Common metrics for making the judgement on RX channel quality are as follows:
ı Received Signal Strength Indication (RSSI)
ı Packet or Bit Error Rate (PER / BER)
ı Signal to Noise Ratio (SNR)
The BT SIG Core Specification does not mandate the method of channel assessment
in order to identify the good and bad channels. Instead, the implementation is left up to
the chipset vendor to define or optimize. A variation between the EUT implementations
is certainly to be expected.
At minimum 20 channels can be used in the hopping pattern. AFH test capability with
the CMW is only applicable for the case for BR + EDR due to the fact that LE is tested
in DTM (non-signaling mode) only.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 6
Basic Ideas

2.1.2 Channel Map

The channel map is provided by the master and contains the relevant information
about the 79 frequency channels of the piconet:
ı A channel classification in good or bad channels based on:
a) Local measurements (e.g. active or passive assessment in the Controller)
b) Information from the Host via the Host Controller Interface (HCI)
c) Report messages (PDUs) received from the slaves
ı A set of used and unused channels in the piconet. On the CMW:
Used channels are stated blocked with the Return value of 0.
Unused channels are stated clear with the Return value of 1.

Channel Classification
The following channel classification is taken from the BT SIG Core Specification
Version 4.2. Note, that the CMW does not distinguish between an unknown channel
and a bad channel. Bad channel is used for both instances.

Classification Definition
A channel is classified as If the channel assessment measurements are insufficient to reliably
unknown, classify the channel is not marked bad in the most recent HCI.
A channel is classified as If at least one of the following applies:
bad, a) An asynchronous (ACL) or synchronous (SCO) connection-oriented
logical transport throughput failure measure has exceeded a threshold.
b) An interference-level measure due to a coexisting radio signal has
exceeded a threshold.
c) The channel is marked bad in the most recent HCI.
A channel is classified as If it is neither unknown nor bad.
good,

Table 2-1: BT frequency channel classification

Channel Map Generation


Any channel that shows poor statistics is 'black-listed' via its Local Assessment
Scheme (LAS). This information is sent to the master device, which creates an Active
Channel Map.
“Active” means, that information is constantly provided, on which channels are clear to
use and those that should be avoided. This map is then continuously updated as
channels become blocked or un-blocked.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 7
Basic Ideas

Fig. 2-5: BT channel map generation

Applied on the master (CMW) and the slave (EUT)


The Local Assessment Scheme is well defined for the devices within the piconet:
ı MLAS: Master’s Local Assessment Scheme
The MLAS contains a channel list with the channels to be black-listed based on
the RX quality statistics at the master (CMW).
ı SLAS: Slave's Local Assessment Scheme
The SLAS contains a channel list with the channels to be black-listed based on
the RX quality statistics at the slave (EUT).
ı HCCC: Host Controller Channel Classification
The HCCC contains a channel list with the channels to be black-listed via
mechanisms, which are not based on over the air measurements.
E.g. in the case of a PC supporting both Bluetooth and WLAN:
The WLAN channel to be used is known in advance by the host controller (in-
device coexistence mitigation). The HCCC mechanism is also referred to as “User
Defined” mode. It allows the user to generate a custom channel map.

The Channel Map Generator implements a logical OR operation on these three inputs
in order to create the final AFH Channel Map utilized.
The CMW supports three AFH scenarios to generate the channel map:
ı CMW (MLAS) and EUT (SLAS) combination
ı EUT (SLAS) only
ı User Defined (HCCC equivalent)

Note: The majority of EUT's are not capable of modifying their AFH LAS, when in RF
Test mode. Instead, the Connection Test mode can be used.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 8
Basic Ideas

2.1.3 Channel Detection on the CMW

Bad Channel Detection


Bad channels may be detected in the following cases:
ı CMW (master) alone
ı CMW (master) and the EUT (slave) collectively

The BT stack within the CMW contains an error count channel table. For each channel
it counts the number of received errors as follows:
ı No answer; no packet received
ı HEC error
ı SCO/eSCO packet not received

Each time an error is detected on a particular channel, the error count is incremented.
If the error count on a particular channel reaches a threshold of six, then the channel is
classified and marked as a bad channel. Bad channels are temporarily excluded from
the channel hopping pattern.

Good Channel Detection


If a valid packet is received on a particular channel then the error count in the error
count channel table is reset to zero:
ı Valid packet received (DH1, DH3, DH5, etc, or Null/Poll)
ı SCO/eSCO packet received

The error count channel table is updated via the channel classification report sent from
the EUT (slave) back to the CMW (master). This allows for blocked channels to be
reintroduced in the active hopping pattern.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 9
Basic Ideas

2.1.4 Channel Reporting Algorithm

Fig. 2-6: BT channel reporting algorithm on the CMW

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 10
Basic Ideas

2.2 BT with a coexisting WLAN signal


The 2.4 GHz ISM Band is shared by multiple Radio Access Technologies (RATs), with
Bluetooth and WLAN being a few of them. The presence of WLAN signals can be
mapped within the channel map. Data transmission is stopped for the BT channel’s
falling within the WLAN signal bandwidth for each time slot.
In the example below a WLAN signal (802.11 b, g or n), located in the sixth WLAN
channel at 2.437 GHz is present in the vicinity of the nearby BT piconet. The masters
channel map has been modified by black listing the BT channels falling within the
WLAN signal bandwidth due to poor RX quality statistics. The hopping pattern will
avoid bad channels using the rest of the available spectrum, provided that a minimum
of 20 channels is available.
The BT channel characteristics of the piconet are indicated for each particular time slot
in the channel map:
ı Occupied channels are black
ı Blocked channels are yellow
ı Available but not used channels are white

Fig. 2-7: BT channel map displaying BT channels and channel characteristics for each time slot

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 11
Basic Ideas

2.3 Connection States


Since AFH will only affect connected BT devices’ channel maps, a brief overview over
the relevant connection states is given in the subchapters below. For more information
refer to the Bluetooth Firmware Applications User Manual.

2.3.1 TX Test Mode (ACL Connection)

The CMW (master) sends a Poll Packet every X number of slots depending upon the
ACL packet type (DH1, DH3, or DH5) to the EUT (slave). The CMW will expect to
receive an equivalent packet type response back in the next receive slot.

Fig. 2-8: Data transmission and timing of TX tests

2.3.2 Loopback Test Mode (ACL Connection)

The CMW (master) sends DH1, DH3, or DH5 ACL Packets every X number of slots
depending upon the ACL packet type (DH1, DH3, or DH5) to the EUT (slave). The
CMW will expect to receive an equivalent packet type response back in the next
receive slot.

Fig. 2-9: Data transmission and timing of loopback tests

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 12
Basic Ideas

2.3.3 Connection Test Mode (ACL Connection)

For the case of operating mode 'Connection Test' the CMW will send a Poll packet
every forty time slots. The CMW will expect to receive a Null packet response back in
the next receive slot.

2.3.4 Audio Profile (SCO Connection)

For the case of operating mode Profile' the CMW sends a SCO (HV1, HV2, or HV3)
packet every two slots and expects a SCO (HV1, HV2, or HV3) packet back every two
slots.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 13
Test Setups

3 Test Setups
Since AFH is available for Bluetooth BR/EDR devices only, the test setups described in
the CMW Bluetooth Signaling manual are covering all relevant test modes. A short
overview is given below.

3.1 EUT without USB Port

Fig. 3-1: Test setup without USB EUT

3.2 EUT with USB Port

Fig. 3-2: Test setup with USB EUT

Note: Some EUTs can be connected directly with a CMW’s USB port without USB
cable.
For more information on test setups with EUTs providing a USB port, a serial port or
even a 2-wire UART interface see the 1C105 application note.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 14
Remote Procedures

4 Remote Procedures
For remote operation the starting situation for all following configuration tasks is the
same:
ı The EUT is connected with the CMW.
ı The Bluetooth Signaling application is ON.
ı One of the connection states in chapter 2.3 is configured.
ı AFH is enabled.

4.1 AFH Remote Commands


AFH channel map generation
SENSe:BLUetooth:SIGNaling:CMAP?
<AFHChannelMap>
The command queries channels used by AFH and returns the current CSV AFH
channel map in use based on:
ı The final combination of the EUT(s) in the piconet.
ı The combined channel map of the EUT and the CMW.
ı A user configured channel map, where the user uses individual settings for each
channel.
Return values:
<AFHChannelMap> 0|1
79 comma separated values, one value per channel:
0: channel is blocked for AFH
1: channel is released for AFH
Note: When retrieving the current channel map in use, an active connection
established between the CMW and EUT is required first. In case of no active
connection there is no channel map to return. Upon initial power up the channel map
will report all 0’s, otherwise the last modified channel map will be reported.

Master and slave channel detection


CONFigure:BLUetooth:SIGN<i>:RFSettings:AFH
<CMWandEUTDetect>,NORM
The command disables / enables the combined CMW and EUT bad channel detection.
Parameters:
<CMWandEUTDetect> OFF|ON

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 15
Remote Procedures

Slave only channel detection


CONFigure:BLUetooth:SIGN<i>:RFSettings:AFH
<EUTOnlyDetect>,EUT
The command disables / enables EUT mode only bad channel detection.
Parameters:
<EUTOnlyDetect> OFF|ON

User defined AFH commands


CONFigure:BLUetooth:SIGN<i>:RFSettings:AFH
<ChannelMap>,USER
The command disables / enables the 79 channels of the user defined channel map.
Parameters:
<ChannelMap> OFF|ON

CONFigure:BLUetooth:SIGNaling:RFSettings:AFH:UCH
<CMAP>
The command specifies the user-defined channels of the channel map. The setting is
relevant for mode = USER.
Parameters:
<ChannelList> 0|1
79 comma separated values, one value per channel:
0: channel is blocked for AFH
1: channel is released for AFH
Note: The ability of the EUT to mark bad channels is dependent upon the CMWs TX
level, not only interferer level / bandwidth. Useful input TX levels range from about -15
dBm to -65 dBm.

4.2 AFH Configuration Examples


Example procedure for a user defined AFH configuration
1. Configure the initialisation parameters as required.
2. Enable frequency hopping in test mode.
CONF:BLU:SIGN:RFS:HOPP ON
3. Set the AFH mode to ‘USER’ prior to entering BT connected state.
CONF:BLU:SIGN:RFS:AFH ON,USER
4. Enter RF Test / Loopback mode (or alternatively Connection Test mode).
5. Return the current CSV AFH channel map in use (initial).
SENS:BLU:SIGNaling:CMAP?

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 16
Remote Procedures

6. Set the User defined CSV AFH channel map prior to entering BT connected state.
CONF:BLU:SIGN:RFS:AFH:UCH <CMAP>
7. A delay of 1 second is set to allow for the new channel map to take effect.
8. Return the current CSV AFH channel map in use (modified).
SENS:BLU:SIGNaling:CMAP?

Note: In the user defined AFH mode configuration a delay is required between setting
and returning the channel map. This delay can vary among EUTs. Typically a delay of
1 second is sufficient for AFH testing.
A future BT FWA update will allow the status of the active channel map to be queried.

Example procedure for a EUT AFH configuration


1. Configure the initialisation parameters as required.
2. Enable frequency hopping in test mode.
CONF:BLU:SIGN:RFS:HOPP ON
3. Set the AFH mode to ‘EUT’ prior to entering BT connected state.
CONF:BLU:SIGN:RFS:AFH ON,EUT
4. Disable the blocking signal, i.e. switch the RF output to OFF state.
5. Enter ‘RF Test’ Operation Mode and the ‘Loopback Test’ Test Mode or
alternatively ‘Connection Test’ Operation Mode.
6. Return the current CSV AFH channel map in use (initial).
SENS:BLU:SIGNaling:CMAP?
7. Enable the blocking signal, i.e. switch the RF output to ON state.
8. Wait a delay of 60 seconds to allow the EUT for detection and communication of
the new channel map to the master.
9. Return the current CSV AFH channel map in use (modified).
SENS:BLU:SIGNaling:CMAP?

Notes:
ı It can take up to 30 seconds or more for the channel map to be modified, which
appears to be EUT dependent. Black-listing channels is a much faster process
than reintroducing them, typically less than 5 seconds.
ı AFH configuration for AFH Mode = EUT in ‘RF Test’ Operation Mode is not
compatible with some of the tested EUTs. In this case the Operation Mode
‘Connection Test’ is used.

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 17
Ordering Information

5 Ordering Information
CMW Hardware
Designation Type Order No.

Radio Communication Tester R&S®CMW500 1201.0002K50


R&S®CMW270 1201.0002K75
Basic Assembly CMW-PS503 (CMW500) 1202.5408.02
CMW-PS272 (CMW270) 1202.9303.02

CMW Software
Designation Type Order No.

Bluetooth Basic Signaling CMW-KS600 1208.1004.02

Bluetooth BR/EDR Signaling CMW-KS610 1207.7650.02

Bluetooth, BR/EDR, TX Measurement CMW-KM610 1203.6350.02

1C108_0e Rohde & Schwarz Bluetooth Adaptive Frequency Hopping on a R&S CMW 18
Rohde & Schwarz Regional contact
The Rohde & Schwarz electronics group offers Europe, Africa, Middle East
innovative solutions in the following business fields: +49 89 4129 12345
test and measurement, broadcast and media, secure customersupport@rohde-schwarz.com
communications, cybersecurity, radiomonitoring and
North America
radiolocation. Founded more than 80 years ago, this
1 888 TEST RSA (1 888 837 87 72)
independent company has an extensive sales and customer.support@rsa.rohde-schwarz.com
service network and is present in more than 70
countries. Latin America
+1 410 910 79 88
The electronics group is among the world market
customersupport.la@rohde-schwarz.com
leaders in its established business fields. The
company is headquartered in Munich, Germany. It Asia Pacific
also has regional headquarters in Singapore and +65 65 13 04 88
Columbia, Maryland, USA, to manage its operations customersupport.asia@rohde-schwarz.com
in these regions.
China
+86 800 810 82 28 |+86 400 650 58 96
customersupport.china@rohde-schwarz.com

Sustainable product design


ı Environmental compatibility and eco-footprint
ı Energy efficiency and low emissions
ı Longevity and optimized total cost of ownership

This application note and the supplied programs


may only be used subject to the conditions of use
set forth in the download area of the Rohde &
Schwarz website.

R&S® is a registered trademark of Rohde & Schwarz GmbH & Co.


KG; Trade names are trademarks of the owners.
PAD-T-M: 3573.7380.02/02.05/EN/

Rohde & Schwarz GmbH & Co. KG


Mühldorfstraße 15 | 81671 Munich, Germany
Phone + 49 89 4129 - 0 | Fax + 49 89 4129 – 13777

www.rohde-schwarz.com

You might also like