This section provides functions for reading and writing Transmit Power.
It lists APIs for setting advertisement Transmit power and for reading it and also for setting transmit power of active link.
wiced_result_t wiced_bt_ble_read_adv_tx_power | ( | wiced_bt_dev_cmpl_cback_t * | p_cback | ) |
Read LE Advertisement transmit power.
This API sends HCI_LE_Read_Advertising_Channel_Tx_Power command to controller.
[in] | p_cback | : Result callback (pointer to wiced_bt_tx_power_result_t will be passed to p_cback ) |
p_cback
is NULL wiced_result_t wiced_bt_ble_set_adv_tx_power | ( | int8_t | power, |
wiced_bt_dev_vendor_specific_command_complete_cback_t * | p_cb | ||
) |
Command to set LE Advertisement Transmit power.
This API helps to set Tx power of Legacy advertisement .
This API should not be used for setting Tx power during Extended advertisement. Instead wiced_bt_ble_set_ext_adv_parameters_v2() should be used.
[in] | power | : power value in db |
[in] | p_cb | : Result callback (pointer to wiced_bt_set_adv_tx_power_result_t will be passed as wiced_bt_dev_vendor_specific_command_complete_params_t::p_param_buf) |
p_cb
is not NULL p_cb
is NULL wiced_result_t wiced_bt_dev_read_tx_power | ( | wiced_bt_device_address_t | remote_bda, |
wiced_bt_transport_t | transport, | ||
wiced_bt_dev_cmpl_cback_t * | p_cback | ||
) |
API to read the transmit power for the requested link associated with remote_bda
This API sends HCI_Read_Transmit_Power_Level command to Controller.
[in] | remote_bda | : Bluetooth address of peer device |
[in] | transport | : Transport type (valid types: BT_TRANSPORT_BR_EDR and BT_TRANSPORT_LE) |
[in] | p_cback | : Result callback (wiced_bt_tx_power_result_t will be passed to the callback) |
remote_bda
specified wiced_result_t wiced_bt_set_transmit_power_range | ( | wiced_bt_device_address_t | bd_addr, |
int8_t | max_tx_power, | ||
int8_t | min_tx_power, | ||
wiced_bt_dev_vendor_specific_command_complete_cback_t * | p_cb | ||
) |
Command to set the range of transmit power on the link.
This command will set minimum and maximum values of transmit power for the link associated with remote device identified by bd_addr
[in] | bd_addr | : Bluetooth address of peer device |
[in] | max_tx_power | : maximum power value in dBm |
[in] | min_tx_power | : minimum power value in dBm |
[in] | p_cb | : Result callback (wiced_bt_set_transmit_power_range_result_t will be passed to the callback) |
p_cb
is not NULL bd_addr
or if bd_addr
is NULL p_cb
is NULL max_tx_power
and min_tx_power
are -28 dBm to 20 dBm max_tx_power
and min_tx_power
values are then rounded up to the nearest ceiling value in the power table. min_tx_power
and -7dBm is passed as max_tx_power
, controller will set power range as -16dBm to -4dBm.p_cb
wiced_result_t wiced_bt_set_tx_power | ( | wiced_bt_device_address_t | bd_addr, |
int8_t | power, | ||
wiced_bt_dev_vendor_specific_command_complete_cback_t * | p_cb | ||
) |
Command to set the transmit power on given link.
This command will adjust the transmit power attenuation for the link associated with remote device identified by bd_addr
[in] | bd_addr | : Bluetooth address of peer device To set Adv Tx power, keep bd_addr NULL |
[in] | power | : Power value in dBm |
[in] | p_cb | : Result callback (wiced_bt_set_adv_tx_power_result_t will be passed to the callback) |
p_cb
is not NULL bd_addr
bd_addr
is NULL p_cb
is NULL power
value is then rounded up to the nearest ceiling value in the power table. power
, controller will set power value to -4dBm.