Changing tx power has no effect under Zephyr

Hello
I don't see any change in RSSI with different TX power values under Zephyr. 1.9.1

It used to work with Nordic SDK 3.2.0  (see table below)
The HCI  API in Zephyr  that is used to set TX power does not return any errors and query reports the saved tx power, but there is no measurable RSSI difference

API used

bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,...)
to write and 
bt_hci_cmd_send_sync(BT_HCI_OP_VS_READ_TX_POWER_LEVEL,...) 
to read
The functions return no errors
Under Nordic SK 3.2.0 the  following RSSI was reported at 1m 

TX Power 

Measured Power
(1 M RSSI -dBM)

Max,Average

0 (default)

55,61

8

52,54

7

52,54

6

52,55

5

52,56

4

53,57

3

53,59

2

53,60

-4

60,60

-8

63,62

-12

68,65

-16

73,69

-20

76,72

-40

Not detected,Not detected

In Zephyr it stays the same, around -55 regardless of TX power setting

Any ideas?

Thanks

Parents Reply
  • Hi,

    TX power can be set dynamically using the HCI, yes.

    Setting it dynamically is also the workaround prior to nRF Connect SDK 2.1.0, if you want a fixed TX power setting other than the default, since fixed TX power setting does not work for the SoftDevice Controller prior to SDK 2.1.0. Hence the note.

    I recommend having a look at the Bluetooth: HCI Power Control example, as it does exactly what you want; it changes TX power dynamically. In main.c you will find set_tx_power() and get_tx_power() functions, that are called from other functions inside main.c. I see that in that example, the CONFIG_BT_CTLR_ADVANCED_FEATURES is also enabled, although I am not sure which exact features used depend on this setting.

    Regards,
    Terje

Children
No Data
Related