cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase Tx Power on STM32WB?

MSasa.1
Associate II

Thre is an example “Thread_Coap_Generic that works very well. However, I’d like to increase Tx Power to improve de distance communication between the boards.

I saw in the Middleware folder, there is a radio.c file. In this file, talk about configure Tx power.

Is there anyone has set up or made it work?

5 REPLIES 5
Remi QUINTIN
ST Employee

You have to use the function below to configure the TX power

/**

* Set the radio's transmit power in dBm.

* Param[in] aPower    The transmit power in dBm.

*

* @retval OT_ERROR_NONE            Successfully set the transmit power.

* @retval OT_ERROR_NOT_IMPLEMENTED Transmit power configuration via dBm is not implemented.

*

*/

otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower)

Dispo dans radio.h

MSasa.1
Associate II

Hi, what means "otInstance *aInstance"?

Is there any example to set up to 6dBm?

Remi QUINTIN
ST Employee

otInstance *aInstance is created on the M0+ side and is not accessible by the M4 core.

Hence, as on other OT APIs, you have to set this parameter to NULL.

Regarding the 6 dBm, just set the parameter int8_t aPower to 6.

MSasa.1
Associate II

Hi, I set int8_t to 6 but I'cant see difference in the distance.

Is there anything else?

Remi QUINTIN
ST Employee

Regarding the setting of the power level, the implementation is:

 if (aPower > 6) {

   aPower = 6;

 } else if (aPower < -21) {

   aPower = -21;

 }

So nothing else to change on this side.

Now the power supply of the chip is key. Try 3.3V if it is not the case today.