How to set Tx Power in KW45

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set Tx Power in KW45

644 Views
nidhintomy
Contributor IV

Hi All,

How to set Tx Power in KW45 ?

I tried 2 ways.

  1. Controller_SetTxPowerLevelDbm(TxPower, gAdvTxChannel_c) api. TxPower ranges from -127 to +127. But function return error for -127 to -1. I don't understand why? Because data sheet says Tx Output power upto +10dBm. From comments in the sample code i understand range is from -127 to +10. So why this api give success to all +ve values.
  2. In app_config.c, by changing Tx power in advertising parameter. This parameter takes -127 to +127 and it will advertise this value.

 

Also try to use this Gap_ReadRadioPowerLevel(gTxPowerLevelForAdvertising_c, 0U) api.But don't receive corresponding generic event gAdvTxPowerLevelRead_c .

Appreciate any Help.

Best Regards,
Nidhin

Tags (2)
0 Kudos
3 Replies

606 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @nidhintomy 

Hope you are doing well.

What SDK version are you using? Could you please confirm that you have updated the NBU corresponding to your SDK version? (more information how to update the NBU can be found in the Getting Started with the K32W148 Development Platform).

What demo application from the SDK are you using as base?

How are you trying to modify the Tx Power Level? Where are you calling this API in your project?

By any chance, are you trying to use Extended Advertising?

Regards,
Eduardo.

0 Kudos

523 Views
nidhintomy
Contributor IV

Hi @EduardoZamora ,

I am fine. Hope you are doing well.

I am using SDK_2_12_5_KW45B41Z-EVK, example application kw45b41zevk_adv_ext_peripheral_freertos.

I am using extended advertising. After updating NBU, now Controller_SetTxPowerLevelDbm API accept all +ve and -ve values(-127 to +128 tested, the API return success).

I think, I missed something because the max configurable tx power is +10dBm. Can you help me on how to config output tx power on advetising.

Also the Gap_ReadRadioPowerLevel API doesn't return generic event gAdvTxPowerLevelRead_c. Can i call this API anytime in application like even not advertising?

I want to perform an range test based on tx values.

Best Regards,
Nidhin

0 Kudos

508 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Regardless of the power level set by the Controller_SetTxPowerLevelDbm() API, the Controller should be able to choose the appropriate power level in the available range for this device.

To read the Radio Power Level using Gap_ReadAdvertisingTxPowerLevel() (equivalent to Gap_ReadRadioPowerLevel with gTxPowerLevelForAdvertising_c as ReadType to read the TX Power level) API, you can call this API to read the radio transmitter power when advertising.

You can try adding the gAdvTxPowerLevelRead_c event in BleConnManager_GenericEvent() (inside ble_conn_manager.c file); this event should be triggered after reading Tx Power Level and the actual value should be found in pGenericEvent->eventData.advTxPowerLevel_dBm.
 EduardoZamora_0-1695057379490.png

Regards,
Eduardo.

0 Kudos