Desired TX power is not consistent with exact TXP when using nRF21540

Hi

I am using HCI Power Control sample to dynamically control TX power. I found that the TX side's connection RSSI and RX side's are diferent, at some point it even has 20 db difference!  Which one is the correct one?

My TX code:

My RX code:

Thank you so much for your time!

Parents
  • Another problem is that the granularity of adjustment does not seem to be very high. I used my method to select a new TX power each time, but it could not be configured successfully. It seems that the system can only work at a few discrete values. (I am using nrf21540 EK and have add the related stuff)

    Thank you so much

  • Hi,

    How are you building the project? If you are building for the nRF21540 FEM, the output power is configurable with high resolution. However, when building withotu the FEM, the output power is limited to the steps that are supported in HW (see TXPOWER in the product specification), and if you specify an unsupported value, the closest lower output power is used.

    Regarding the measured RSSI that depend on many factors, one is real factors and only give a ball park number. The RSSI measurment itself is specified to be +-1 2 dBm, but there are other factors such as antenna, sampling time, perhaps the devices are not transmitting with the same power, etc. 

  • Hi,

    Ziyao Zhou said:
    2. If TX do not have RSSI,, what is this parameter "printk("Connected (%d) - RSSI = %d\n",default_conn_handle, rssi);"This is the original sentence from sample. 

    This is the strength of the received signal. As mentionned, RSSI is the Receive signal strength indicator.

    Ziyao Zhou said:

    I want this "rssi" parameter be barely equal to the RX RSSI, so that I can tract the target signal strength precisely.

    Where do you get the other number from? Is it from the other device (which I thoght) or something else? What are you actually comparing? If you are comparing the nubmer on different devices (the two peer), you will see different numbers most of the time, even if both are transmitting with the same Tx power from the radio and even if the channel is the same (differences in antenna, measurment error, etc).

  • Thank you for your information. Actually I am using TX to read the rssi, the function printk("Connected (%d) - RSSI = %d\n",default_conn_handle, rssi) is runing in TX side. So from your explanation, I can not get the precise signal strength at TX side right?

    By the way, is my configuration wrong? As I found I can not have a high resolution of adjusting TX power.

    Thank you!

  • Hi,

    Ziyao Zhou said:
    I can not get the precise signal strength at TX side right?

    In Bluetooth both devices do both Rx and Tx in connections (in fact in anything apart from non-connectable advertising or scanning). Also in this case, the RSSI printed on what you refer to as Tx is the measured signal strengs of the packets it receives from the peer in a connection.

    Ziyao Zhou said:
    By the way, is my configuration wrong? As I found I can not have a high resolution of adjusting TX power.

    Yes. It seems you have not enabled dynamic power control for the FEM.  You need CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y. See Setting the FEM output power.

  • Thank you! I have just try this new config, hoever, I still cannot precisely change the parameter, you may simply check this result "Adaptive Tx power selected = -" and "Actual Tx Power: " 

  • Hi, how could I have a high resolution of adjusting TX power.

Reply Children
  • Hi,

    The "actual" Tx power you read back does not fully reflect the power you get, but you should see expected power if you measure. For reference, this is a slightly modified hci_pwr_ctrl sample that includes the nRF21540 EK enabled in CMakeLists.txt, and configurations for GPIO + SPI configuration, so that you get the power model.

  • Hi, thank you for the information. Does that mean TX power can only be tuned with these numbers = {20, 10, 4, 0, -3, -8, + -15, -18, -23, -30}? I want the TX power the be the closest number to my Calculated  " Adaptive Tx power", but sometimes it doesn't follow, for example

    Thank you so much for your time!

  • Hi,

    Ziyao Zhou said:
    Hi, thank you for the information. Does that mean TX power can only be tuned with these numbers = {20, 10, 4, 0, -3, -8, + -15, -18, -23, -30}?

    No, these are just the numbers used in the sample (with my modification ading two more with higher output).

    The Tx power you read back will not be exactly what you set if the combination of FEM gain and nRF52833 Tx power does not add up to what you requested (see this post).

  • Thank you for your information! My problem is when I request Tx power lower than - 10, the exact Tx to be set will always be -30, I cannot go lower than that

  • Hi,

    From what I understand the get_tx_power() function may not represent the actuall configuation when using the nRF21540 FEM with dynamic power control. Have you measured the actual Tx power out of the FEM? There you should see values that are closer to what you configure.