When to set Tx Power CYW920819EVB-02

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
tho_ka
Employee
Employee
First like received 5 sign-ins First reply posted

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
Moderator
First comment on KBA 750 replies posted 500 likes received

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
3 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

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.

0 Likes
tho_ka
Employee
Employee
First like received 5 sign-ins First reply posted

Hey @SheetalJ ,

 

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

 

BR Thomas

0 Likes
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

For 8109 error-

Please use wiced_bt_ble_set_adv_tx_power() API to set adv tx power. The documentation for wiced_bt_set_tx_power() needs to be updated to remove the line that says setting BD ADDR null will update adv tx power. We will fix this in next BTSDK version.

 

0 Likes