This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TX power with OpenThread.

Hi, I tested "Simple_coap_client" and "simple_coap_server" on NRF52840 using Threading SDK.

I want to change the transmit power, so I used "otPlatRadioSetTransmitPower ()".

Although the transmit power range is -20 to 8dBm, I can set an abnormal value such as 100 with otPlatRadioSetTransmitPower ().

When setting 100 with otPlatRadioSetTransmitPower (), it was confirmed that the value was 100 with otPlatRadioGetTransmitPower ().

Is the transmit power range -20 to 8 dBm? Or is there a mistake in the transmit power setting method?

I'm sorry in poor English.

Parents
  • Hello,

     

    Is the transmit power range -20 to 8 dBm? Or is there a mistake in the transmit power setting method?

     This otCall is not implemented in the nRF version of openthread. That is, it will work, but the return values are not correct.

    otPlatRadioSetTransmitPower() will call nrf_802154_tx_power_set(), but it will always return OT_ERROR_NONE, whether the power is within the valid output power range or not. The same way, 

    You can check their implementation here:

    https://github.com/openthread/openthread/blob/master/examples/platforms/nrf528xx/src/radio.c#L594

    Try to use nrf_802154_tx_power_set() and nrf_802154_tx_power_get() directly, and see if it makes more sense.

    BR,

    Edvin

  • Hello, 

    I have confirmed that tx power can be set to -40 to 8 using nrf_802154_tx_power_set () and nrf_802154_tx_power_get ().

    But, there was no change in the communication range.

    I conducted an experiment in a place with good visibility, but there was no change in the communication range.

    Is there a clear difference in communication distance between tx power of -40 and 8?

    It was my code.

    I'm sorry in poor English.

    int main(int argc, char * argv[])
    {
        nrf_802154_init();
        
        
        log_init();
        scheduler_init();
        timer_init();
    
        thread_instance_init();
        thread_coap_init();
        thread_bsp_init();
    
    
        
        nrf_802154_tx_power_set(8);
        NRF_LOG_INFO("%d", nrf_802154_tx_power_get());
        
    
        while (true)
        {
            thread_process();
            app_sched_execute();
    
            if (NRF_LOG_PROCESS() == false)
            {
                thread_sleep();
            }
        }
    }

  • Hello,

    Can you try to use the nRF Sniffer for 802154 to measure the Received Signal Strength (RSS) on the device? Does it change if you keep the devices at the same distance, but increase the output power?

  • Hello,

    I'm not nRF Sniffer for 802154, but I got the RSSI using nrf_802154_rssi_last_get (). I changed the tx power while keeping the devices at the same distance, but the RSSI did not change.
    This seems to indicate that tx power is unchanged.
    Is there a problem with how to change tx power?

    I'm sorry in poor English.

Reply Children
  • Hello,

    What TX powers do you try to use? And what RSSI do you see? Are you trying +4 and +8? Because you will not see much difference. Perhaps you can try -40dBm and +8dBm?

    This should work. You can double check by reading out the RADIO TX power register after you have changed the output. You can check it either by breaking and monitoring the register directly, or you can use:

    int8_t tx_power = NRF_RADIO->TXPOWER;

    Remember to add a short delay after you set the power before you read it out. Use a timer to set and read the TX power.

    Alternatively, try with -40 and +8 dBm and check the nrf_802154_rssi_last_get(). What values do you get?

    BR,
    Edvin

  • Hello,

    I was able to solve the problem.
    When I output the log in nrf_802154_tx_power_set (), it seems that the transmission power is periodically returned to 0.
    Therefore, I set the transmission power without using nrf_802154_tx_power_set ().

    I'm really thankful to you.

Related