cancel
Showing results for 
Search instead for 
Did you mean: 

Tx radio power on STM32 Nucleo WBA55CG using Zephyr

BKaiwalya
Associate II

Hi,

 

I am using the STM32 Nucleo WBA52CG evaluation board and programming it using Zephyr v3.7.0 and am looking how to set the Tx output power of the BLE radio. Are there any configs available in Zephyr for the same? 

 

If not, alternatively please suggest a way to do this. I want to configure the Tx output power of the radio to +5 dBm.

 

Thanks, Kaiwalya

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @BKaiwalya 

Could you please change :

    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x0F;
    /* Deprecated and ignored */
    param->value[1= 0x00;
 
To :
    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x14;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a -5 dBm
Or 
  /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x1E;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a 5 dBm
  
Best Regards.
STTwo-32
 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

7 REPLIES 7
STTwo-32
ST Employee

Hello @BKaiwalya and welcome to the ST Community.

I'm checking this internally (throw internal ticket number 195885) and I will be back to you soon with an answer.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

STTwo-32
ST Employee

Hello @BKaiwalya 

Could you try to use the same implementation of the Zephyr Project zephyrproject-rtos/zephyr: Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. and replace the zephyr/samples/bluetooth/peripheral_hr/src/main.c at main · zephyrproject-rtos/zephyr by the attached main.c file (including a patch).

Please provide feedback as soon as you have tested this application.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi,

 

Thanks for providing the quick patch.I tried it and it gives me the following output on console:

 

Setting PA output level to : 0x0f

Current TX power level in dBm : -10

Is this expected?

 

However, I would like to set the Tx output power to +5 dBm, what do I need to configure in param here and where can I find the guide for it:

param = net_buf_add(buf, sizeof(*param));
 
    /* See STM32WBA table conversion in Annex A */
    param->value[0] = 0x0F;
    /* Deprecated and ignored */
    param->value[1] = 0x00;
 
?

Hello @BKaiwalya 

Could you please change :

    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x0F;
    /* Deprecated and ignored */
    param->value[1= 0x00;
 
To :
    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x14;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a -5 dBm
Or 
  /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x1E;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a 5 dBm
  
Best Regards.
STTwo-32
 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi,

 

with this I get the following Tx output power:

 

Current TX power level in dBm : -5

BKaiwalya
Associate II

Hi,

 

using 

    /* See STM32WBA table conversion in Annex A */
    param->value[0] = 0x1E;
    /* Deprecated and ignored */
    param->value[1] = 0x00;
 
I could get the Tx output power to +5dBm:output from console
 
Current TX power level in dBm : 5

The values for each power are available here. You can download this web page and open it to have the annexe table.

I've added this link to my post of solution. And added the necessary senario to my command. If you find that our support is helpful. Please select the original answer as best answer.

ST Community is always here for you.

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.