The default Tx power used by the Bluetooth stack is +8dBm, meaning that all of the advertisement packets and data packets will be transmitted with this power level (except if your device has lower Tx power capability). This can be, however, changed both in positive and negative direction. The actual Tx power will be determined by both user configuration and actual circumstances. This article discusses how you can configure Tx power, and how the actual Tx power will change.
The global maximum Tx power can be set with the
gecko_cmd_system_set_tx_power(int16 max_power) API command. The units of the Tx power is 0.1dBm. For safe functioning radio operations should be suspended for the short time while the Tx power is changed. E.g. to set 2.3dBm 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 actually set value is provided in the return value of the
gecko_cmd_system_set_tx_power() function. You should always check this value as it can be much lower than the Tx power you wanted to set.
tx_power = gecko_cmd_system_set_tx_power(23)->set_power;
By default all radio operation will use the global maximum Tx power, if there are no other constraints. The possible constraints are discussed in the following sections.
Although the Bluetooth standard does not limit the Tx power, local regulatory bodies (CE, FCC, ...) can define the maximum Tx power that can be used. Different rules apply for different regions. Regarding Tx power it is ETSI (European Telecommunications Standards Institute) that has the most strict rules. Therefore to comply with regulations in all regions ETSI regulations has to be taken into account.
According to ETSI, the maximum allowed Tx power on a Bluetooth connection is +20dBm if Adaptive Frequency Hopping (AFH) is enabled, and it is +10dBm 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, then the Tx power of data packets is set to the global maximum – which cannot be more than +20dBm. If less than 15 channels are available, then the Tx power is set to the minimum of the global maximum Tx power and +10dBm. If AFH is disabled, then the Tx power is set to the minimum of the global maximum Tx power and +10dBm.
If using Bluetooth SDK v2.8 or older, you should ensure that the global Tx power is never higher than +10dBm. Note, that the stack allows to set +13dBm, to compensate RF path loss. E.g. if your HW has 3dB loss until the antenna, you are allowed to set +13dBm, so that the actual transmitted power on the antenna is 10dBm. Please always check this to comply with the Bluetooth standard.
The Tx power set in the stack means the output power of the PA (power amplifier). However, your signal may suffer some losses 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. E.g. if your HW has 3dB loss until the antenna, you can set 13dBm in your SW, which results in 10dBm 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. E.g. if you have 3dB loss, you should set this in the gecko_configuration structure in units of 0.1dB:
.rf.tx_gain = -30;
where the negative number means loss (and positive number means gain). Now, if you set +5dBm with
gecko_cmd_system_set_tx_power(), then it means +8dBm on the output of the PA, and +5dBm 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.
Bluetooth advertisements use 3 advertisement channels. This means, that even if AFH is enabled, the maximum Tx power for advertisements is +10dBm. If you set the global maximum higher than this, advertisements will be transmitted with +10dBm.
Extended advertisements use data channels, hence the extended advertisement packets can be transmitted with +20dBm if AFH is enabled and 15 or more data channels are available.
Since Bluetooth SDK v2.9 there is also possibility to set different Tx power levels for different advertisers. You can use the following API commands to set the Tx power for a specific advertiser (identified by an advertiser handle):
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 +10dBm if global Tx power is higher than that!). If you do not define Tx power for an advertiser it will automatically use the global maximum (or +10dBm 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!
I am using BG13P22 module on the BRD4306A radio module and WSTK. The Bluetooth SDK is v2.10
I have enabled Adaptive Frequency hopping by calling gecko_init_afh(); after gecko_init(&config);
However, I am not able to set the transmit power above +10dBm ?
The code still reports 10dBm and the measured RSSI is also unchanged from requesting 10dBm.
here is the code from the boot event...
gecko_cmd_system_halt(1); // temp halt radio operations to set power
struct gecko_msg_system_set_tx_power_rsp_t *setTX = gecko_cmd_system_set_tx_power(150); // 15dBm requested
printf("Tx Power Set, %d dBm\r\n", setTX->set_power / 10); // 10 dBm reported
I note that in board-features.h, the BRD4306A is not listed for #define FEATURE_PA_HIGH_POWER. Is this the problem?
#if (EMBER_AF_BOARD_TYPE == BRD4150B)\
|| (EMBER_AF_BOARD_TYPE == BRD4151A)\
|| (EMBER_AF_BOARD_TYPE == BRD4305E)\
|| (EMBER_AF_BOARD_TYPE == BRD4306B)\
|| (EMBER_AF_BOARD_TYPE == BRD4306D)
@BizKits, if you look at the BGM13P22 specification it is what you should expect.
Only BGM13P32 can output up to +19dBm