cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox Bluetooth SDK

tho_ka
Employee

Hi,

 

I would like to reduce my Tx Power after establishing my connection to a central device in order to reduce the current consumption to a minimum.

However, I am not quite sure at which point I should call the API. I have already tried different points within the program. 
I am calling it like:

wiced_bt_set_tx_power(NULL,-16);                   %NULL is stated in the API description as bd_addr

I always get the Return Value 8109 (WICED_BT_ERROR). 

 

I have already implemented the wiced_bt_dev_set_adv_tx_power and it works perfectly fine!

 

Thank you in advance,

BR Thomas

 

 

0 Likes
1 Solution
SheetalJ
Moderator
Moderator

Hi @tho_ka ,

You will need to give the BD address of connected device as first parameter of API wiced_bt_set_tx_power. 

/******************************************************************************
* Function Name: wiced_bt_set_tx_power
***************************************************************************//**
*
* Commands to set the TX power on link
*
* \param[in] bd_addr peer address to set ADV TX power keep bd_addr NULL
* \param[in] power power value in db
*
* \return wiced_result_t
*
******************************************************************************/
wiced_result_t wiced_bt_set_tx_power ( wiced_bt_device_address_t bd_addr, INT8 power );

Above is the description of the API, can be found in wiced_bt_dev.h. 

 

You should use this API after connection is established.

wiced_bt_dev_set_adv_tx_power () is used to set the advertisement Tx power.

View solution in original post

0 Likes
2 Replies
SheetalJ
Moderator
Moderator

Hi @tho_ka ,

You will need to give the BD address of connected device as first parameter of API wiced_bt_set_tx_power. 

/******************************************************************************
* Function Name: wiced_bt_set_tx_power
***************************************************************************//**
*
* Commands to set the TX power on link
*
* \param[in] bd_addr peer address to set ADV TX power keep bd_addr NULL
* \param[in] power power value in db
*
* \return wiced_result_t
*
******************************************************************************/
wiced_result_t wiced_bt_set_tx_power ( wiced_bt_device_address_t bd_addr, INT8 power );

Above is the description of the API, can be found in wiced_bt_dev.h. 

 

You should use this API after connection is established.

wiced_bt_dev_set_adv_tx_power () is used to set the advertisement Tx power.

View solution in original post

0 Likes
tho_ka
Employee

Hey @SheetalJ ,

 

Thank you very much, I must have misread that like 50 times. This has solved my issue!

 

BR Thomas

0 Likes