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();
            }
        }
    }

Reply
  • 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();
            }
        }
    }

Children
Related