2022-02-19 04:50 AM
In all ST devkit code, the command
aci_hal_set_tx_power_level(0,25)
is used, but changing the parameters has no effect on the transmit power (is always about 0dBm).
2022-02-21 07:12 AM
Hello,
This command is the right one to change the Tx power.
Now few things you should have in mind especially when considering advertising Tx power
1) In advertising mode and if advertising extension is not used, the output power will be defined by « ACI_HAL_SET_TX_POWER_LEVEL » API
2) In advertising mode and if advertising extension is used, the output power will not be defined with « ACI_HAL_SET_TX_POWER_LEVEL » API but through « Advertising_Tx_Power » field in « ACI_GAP_SET_ADVERTISING_CONFIGURATION » API.
Please note « Advertising_Tx_Power » field must be filled directly with expected value in dBm.
3) There is a known issue with latest DK available on st.com.
When you are advertising with an application running low power mode, only the first advertising sequence is done at expected power. Then the "high power" configuration is lost.
So if you set advertising with aci_hal_set_tx_power_level (1, 25), you will observe first advertising is done @+5dBm then the following ones will be done at 0dBm (so as if you would have defined aci_hal_set_tx_power_level (0, 25).
A fix is already available and will be included in next release.
Regards
Laurent