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. 

  • Thanks for your information! I still have these two questions:

    1.I am buiding with the 21540 FEM. As you mentioned it should have high reslolution, but here is the result, you may kindly check "Adaptive Tx power selected" and "Actual Tx Power: "

    2. How could I allow TX RSSI and RX RSSI at the same level? As I am currently develop a PID Algorithm for TX side to maintain the RX RSSI at certain level.

  • Hi,

    Ziyao Zhou said:
    1.I am buiding with the 21540 FEM. As you mentioned it should have high reslolution, but here is the result, you may kindly check "Adaptive Tx power selected" and "Actual Tx Power: "

    Can you show how you have configured and enabled the nRF21540 includign how you build your project so that we can verify that it is in use? See here for how it can be enabled.

    Ziyao Zhou said:
    2. How could I allow TX RSSI and RX RSSI at the same level? As I am currently develop a PID Algorithm for TX side to maintain the RX RSSI at certain level.

    RSSI is a measurement of the signal strength of the received signal, so there is no RSSI for Tx. This is the power of the signal the radio receives (Rx). This cannot be modified by adjustments on the nRF, but for instance by moving closer to the peer device or incrase the Tx power on the peer device. (By adjusting the Tx power on the nRF you should see a change in the RSSI on the other device, as the signal it receives is transmitted with a different power).

  • Hi 

    Thanks for your information:

    1. I am buiding the program with 21540 EK. My config and build are:

    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. 

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

    Thank you so much for your help!

Reply
  • Hi 

    Thanks for your information:

    1. I am buiding the program with 21540 EK. My config and build are:

    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. 

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

    Thank you so much for your help!

Children
  • 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.