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

Regarding setting Tx power to +8dbm

Hi,

 I am using Nordic nRF52840 SoC with nRF5_SDK_15.2.0_9412b96(SDK) and S140 softdevice. I tried to set Tx power to +8dbm using 

rc = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV ,m_adv_handle,+8); after calling advertising_init(); in ble_app_multipepripheral example.But when i see the RSSI signal in mobile using nRF connect for mobile app its showing maximum of -15dbm instead of +8dbm when i place the mobile near the device. The ret_code(rc) of this api sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV ,m_adv_handle,+8); is 0 when i printed which means NRF_SUCCESS.Can anyone please help me why its showing -15dbm instead of +8dbm?

  • rc = sd_ble_gap_tx_power_set( BLE_GAP_TX_POWER_ROLE_ADV , m_adv_handle, +8 );

    Are you sure that "+8" is the correct way to specify  the power?

    What does the documentation say ... ?

    How to properly post source code:

  • Hi awneil, Thanks for the quick reply.

    I am placing +8 based on the API description.

    /**@brief Set the radio's transmit power.
     *
     * @param[in] role The role to set the transmit power for, see @ref BLE_GAP_TX_POWER_ROLES for
     *                 possible roles.
     * @param[in] handle   The handle parameter is interpreted depending on role:
     *                     - If role is @ref BLE_GAP_TX_POWER_ROLE_CONN, this value is the specific connection handle.
     *                     - If role is @ref BLE_GAP_TX_POWER_ROLE_ADV, the advertising set identified with the advertising handle,
     *                       will use the specified transmit power, and include it in the advertising packet headers if
     *                       @ref ble_gap_adv_properties_t::include_tx_power set.
     *                     - For all other roles handle is ignored.
     * @param[in] tx_power Radio transmit power in dBm (see note for accepted values).
     *
      * @note Supported tx_power values: -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +2dBm, +3dBm, +4dBm, +5dBm, +6dBm, +7dBm and +8dBm.
      * @note The initiator will have the same transmit power as the scanner.
     * @note When a connection is created it will inherit the transmit power from the initiator or
     *       advertiser leading to the connection.
     *
     * @retval ::NRF_SUCCESS Successfully changed the transmit power.
     * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.
     * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found.
     * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.
     */
    SVCALL(SD_BLE_GAP_TX_POWER_SET, uint32_t, sd_ble_gap_tx_power_set(uint8_t role, uint16_t handle, int8_t tx_power));
    
    

  • when i see the RSSI signal in mobile using nRF connect for mobile app its showing maximum of -15dbm instead of +8dbm

    Of course you won't see +8dBm !

    "RSSI" = Received Signal Strength Indication - it is what your phone is receiving - not what the peripheral is transmitting!

  • Hi awneil,

    When I place the mobile near the device, Mobile should receive almost the same signal strength transmitted by peripheral?

    Is there any way to know whether peripheral is transmitting 8dbm signal or not?

  • There will always be losses. An RSSI of -15dBm sounds pretty good.

    Is there any way to know whether peripheral is transmitting 8dbm signal or not

    you would need a proper RF analyser.

    Remember that the +8dBm figure is the output from the chip itself;  so it will be affected by your PCB layout, antenna, and antenna tuning - before it even leaves your board!

    You can verify that you code is actually having an effect by changing between, say, +8 and -8 ...

Related