How do I configure signal strength in sending advertisement data?

I'd like to minimize signal strength of nRF51822 chip in sending advertisement. How do I configure?

Thanks in advance.

  • Hi Ken,

    You can configure the output power using the call "sd_ble_gap_tx_power_set", defined in file ble_gap.h:

    /**@brief Set the radio's transmit power.
     *
     * @param[in] tx_power Radio transmit power in dBm (accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm).
     *
     * @note -40 dBm will not actually give -40 dBm, but will instead be remapped to -30 dBm.
     *
     * @return @ref NRF_SUCCESS Successfully changed the transmit power.
     * @return @ref NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.
     * @return @ref NRF_ERROR_BUSY The stack is busy, process pending events and retry.
     */
    SVCALL(SD_BLE_GAP_TX_POWER_SET, uint32_t, sd_ble_gap_tx_power_set(int8_t tx_power));
    
    

    Best regards Håkon

  • Hakon,

    Is there such a control mechanism for nrf8001 too? along with header file like ble_gap.h ?

  • Hi,

    The nRF8001 APIs are different compared to the nRF51. 8001 uses a library called "libaci". For setting the tx-power (libaci.c): retval = lib_aci_set_radio_tx_power(tx_power) Where the legal input is:

      ACI_DEVICE_OUTPUT_POWER_MINUS_18DBM = 0x00, /**< Output power set to -18dBm */
      ACI_DEVICE_OUTPUT_POWER_MINUS_12DBM = 0x01, /**< Output power set to -12dBm */
      ACI_DEVICE_OUTPUT_POWER_MINUS_6DBM  = 0x02, /**< Output power set to -6dBm  */
      ACI_DEVICE_OUTPUT_POWER_0DBM  = 0x03  /**< Output power set to 0dBm   - DEFAULT*/
    

    Best regards Håkon

  • Thank you so much for your detail answer.

  • Hello Hakon,

    The library I have is not c its c++ and its named lib_aci.cpp which I think is the correct place to look for this method as I also found it there, but I didnt found the definitions for the 18DB, 12DB bandwidth selection there or anywhere in any file from the library! can you send me the link to this library that you have from which you copied the above excerpt?

Related