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

nRF51 DK SDKv10 with S110 iBeacon beacon example: How to increase TX power?

My requirement is simple: Want to increase the iBeacon transmit power to (i.e. -4, 0 or 4dbm). In the beacon example, I tried adding in the main loop after calling advertising_init():

    uint32_t err_code = sd_ble_gap_tx_power_set(TX_POWER_LEVEL);
		APP_ERROR_CHECK(err_code);

where TX_POWER_LEVEL is defined as 0.

However when I execute the code on nRF51 DK (PCA10028), I am not able to observe increase in transmit power. I still see it as default (-30/-40dbm).

I request you to provide an example, where I can increase the iBeacon transmit power. I would further like to also tweak the advertising interval to optimize power usage.

Thank you and best regards,

Nitin

Parents Reply Children
  • I am measuring it using a smartphone apps such as Beacon Analyzer, Beacon Scanner, etc. The measured RSSI when I keep the smartphone right on top of the dev kit is always around -35dbm.

  • Hi, that explains your problems. You should measure conducted or according to the ibeacon guidelines (1 meter away > 10 seconds). If you want to measure any difference it is essential that neither phone or ibeacon change orientation, distance, or location when changing the output power. In your case you are measuring in the near fields of the antenna, which will give strange results.

  • Hi Kenneth, I have tried measuring the as several locations, I just mentioned the closest measurement of atround-35dbm. At around 1 meter, I am consistently getting measured rssi in the range of -60dbm or less. 

    int main(void)
    {
        uint32_t err_code;
        // Initialize.
        APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
        err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);
        APP_ERROR_CHECK(err_code);
        ble_stack_init();
        advertising_init();
    		
    		err_code = sd_ble_gap_tx_power_set(0); //Radio transmit power in dBm (accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm).
        APP_ERROR_CHECK(err_code);
    		
        // Start execution.
        advertising_start();
    
        // Enter main loop.
        for (;; )
        {
    				err_code = sd_ble_gap_tx_power_set(0); //Radio transmit power in dBm (accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm).
    				APP_ERROR_CHECK(err_code);
            power_manage();
        }
    }
    

    I have even tried calling sd_ble_gap_tx_power_set(0) inside the for loop, which has no effect either.

    -Nitin

  • Is there any difference if you use:

    int8_t tx_power = 0; // -40, -20, -16, -12, -8, -4, 0, 3, and 4

    err_code = sd_ble_gap_tx_power_set(tx_power);

    APP_ERROR_CHECK(err_code);

  • I have tried various values from -20 to +4, but there is no difference in measured rssi@1m. I have also tried the same code on our custom PCB with nRF51822. I am not getting higher transmit power there as well.

Related