Bluetooth TX Power Settings#
Introduction#
The default TX power used by the Bluetooth stack is +8 dBm, meaning that all of the advertisement packets and data packets are transmitted with this power level (except if your device has a lower TX power capability). However, this can be changed both in positive and negative direction. The actual TX power is determined by both the user configuration and the actual circumstances. This document discusses how you can configure TX power and how the actual TX power will change.
Global Maximum TX Power#
The global maximum TX power can be set with the gecko_cmd_system_set_tx_power(int16 max_power)
API command. The unit of the TX power is 0.1 dBm. To ensure safe functioning, suspend radio operations for a short time while changing the TX power. For example, to set 2.3 dBm maximum TX power, use the following commands:
gecko_cmd_system_halt(1);
gecko_cmd_system_set_tx_power(23);
gecko_cmd_system_halt(0);
Note that, although you can set the TX power with 0.1 dBm granularity, the low power PA cannot be set to arbitrary TX levels – there are discrete power levels you can use. The set value is provided in the return value of the gecko_cmd_system_set_tx_power()
function. Always check this value because it can be much lower than the TX power you want to set.
tx_power = gecko_cmd_system_set_tx_power(23)->set_power;
By default, all radio operation use the global maximum TX power provided there are no other constraints. The possible constraints are discussed in the following sections.
TX Power for Data Packets#
Although the Bluetooth standard does not limit the TX power, local regulatory bodies (CE, FCC, and so on) can define the maximum TX power that can be used (see: TX Power Limitations for Regulatory Compliance). Different rules apply for different regions. ETSI (European Telecommunications Standards Institute) that has the strictest rules regarding the TX power. Therefore, to comply with regulations in all regions, ETSI regulations have to be taken into account.
According to ETSI, the maximum allowed TX power on a Bluetooth connection is +20 dBm if Adaptive Frequency Hopping (AFH) is enabled, and it is +10 dBm if AFH is not enabled or if AFH is enabled but less than 15 channels are available for use.
AFH can be enabled in Silicon Labs Bluetooth stack since Bluetooth SDK v2.9, see the following article: Adaptive Frequency Hopping. If AFH is enabled, the Bluetooth stack automatically controls the TX power. If 15 or more channels are available, the TX power of data packets is set to the global maximum, which cannot be more than +20 dBm. If less than 15 channels are available, then the TX power is set to the minimum of the global maximum TX power and +10 dBm. If AFH is disabled, then the TX power is set to the minimum of the global maximum TX power and +10 dBm.
If using Bluetooth SDK v2.8 or older, ensure that the global TX power is never higher than +10 dBm. Note, that the stack allows setting +13 dBm to compensate RF path loss. For example, if your hardware has 3 dB loss until the antenna, you are allowed to set +13 dBm, so that the actual transmitted power on the antenna is 10 dBm. Always check this to comply with the Bluetooth standard.
RF Path Compensation#
The TX power set in the stack is the output power of the PA (power amplifier). However, your signal may suffer some loss along the RF path, meaning that the actually radiated power is less than the power you set. Before Bluetooth SDK v2.9, you can compensate this loss by settings higher power in your SW. For example, if your hardware has 3 dB loss until the antenna, you can set 13 dBm in your SW, which results in 10 dBm radiated power.
Since Bluetooth SDK v2.9, the stack automatically controls the TX power according to the AFH settings. Consequently, it needs to know how much loss your RF path introduces. For example, if you have 3 dB loss, set this in the gecko_configuration structure in units of 0.1 dB:
.rf.tx_gain = -30;
where the negative number means loss (and positive number means gain). If you set +5 dBm with gecko_cmd_system_set_tx_power()
, it's +8 dBm on the output of the PA, and +5 dBm radiated power.
RF path compensation can be set for the receive path as well in the gecko_configuration structure:
.rf.rx_gain = -30;
In this case, the reported RSSI value will be compensated with this value.
TX Power for Advertisement Packets#
Bluetooth advertisements use 3 advertisement channels. As a result, even if AFH is enabled, the maximum TX power for advertisements is +10 dBm. If you set the global maximum higher than this, advertisements will be transmitted with +10 dBm.
Extended advertisements use data channels, hence the extended advertisement packets can be transmitted with +20 dBm if AFH is enabled and 15 or more data channels are available.
Since Bluetooth SDK v2.9, you can set different TX power levels for different advertisers. Use the following API commands to set the TX power for a specific advertiser (identified by an advertiser handle):
gecko_cmd_le_gap_set_advertise_tx_power(handle,tx_power)
Note however, that you still cannot go beyond the global maximum TX power, i.e., if you set a TX power higher than the global maximum, the global maximum will be applied (or +10 dBm if global TX power is higher than that). If you don't define TX power for an advertiser, it will automatically use the global maximum (or +10 dBm if global TX power is higher than that). If the advertiser is currently active, the TX power for the advertiser will change only after re-enabling it.
Supplying EFR32 PAVDD from 3.3V#
On EFR32 SoC based designs there is the possibility to supply the PAVDD (Power Amplifier voltage regulator VDD input) from the output of the DC/DC or straight from a 3.3V power supply. It is important for the Bluetooth stack to know which voltage is applied on PAVDD in order to be able to set the appropriate TX level.
Sample apps are configured so that they work well on Silicon Labs radio boards (PAVDD input is always selected based on the board type). On custom config, however you have to define if PAVDD is driven from 3.3V (VBAT) or 1.8V (DCDC).
If PAVDD is being supplied from DC/DC, then the following line must be added to app.c
file just before the call to gecko_init(pconfig)
. This will override the default configuration:
pconfig->pa.input = GECKO_RADIO_PA_INPUT_DCDC;
If PAVDD is supplied from 3.3V (VBAT), then add the following line:
pconfig->pa.input = GECKO_RADIO_PA_INPUT_VBAT;
Example#
This guide has a related code example, here: Testing TX Power Levels