This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2642R: How to change transmit power of advertisment

Part Number: CC2642R
Other Parts Discussed in Thread: CC2640R2F, ENERGYTRACE, SYSCONFIG

I am using SDK 4.20 for developing BLE based application. Also, I am not using SysCfg for generating code. Initially, I have used SysCfg and then used the generated source code further and then disabled the SysCfg.

I am trying to change the transmit power for advertisement. I have changed following in the source code:

ble_user_config.c:

#ifndef SYSCFG
// Default Tx Power Index
#if defined(CC13X2P)
#define DEFAULT_TX_POWER               HCI_EXT_TX_POWER_0_DBM
#else // !CC13X2
#define DEFAULT_TX_POWER               HCI_EXT_TX_POWER_5_DBM
#endif // CC13X2
#endif // SYSCFG

I have also changed below code as well for the advertisement structure:

#define GAPADV_PARAMS_EMR_LEGACY_SCAN_CONN (GapAdv_params_t){                                                                                                   \
    .eventProps     = GAP_ADV_PROP_CONNECTABLE | GAP_ADV_PROP_SCANNABLE |                                                                                       \
                      GAP_ADV_PROP_LEGACY,                                                                                                                      \
    .primIntMin     = EMR_ADV_PRIM_INT_MIN,                                                                                                                     \
    .primIntMax     = EMR_ADV_PRIM_INT_MAX,                                                                                                                     \
    .primChanMap    = GAP_ADV_CHAN_ALL,                                                                                                                         \
    .peerAddrType   = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID,                                                                                                        \
    .peerAddr       = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },           /* peerAddr is not used since we're not using directed advertisements */                \
    .filterPolicy   = GAP_ADV_WL_POLICY_ANY_REQ,                                                                                                                \
    .txPower        = 5,                                                                                                           \
    .primPhy        = GAP_ADV_PRIM_PHY_1_MBPS,                                                                                                                  \
    .secPhy         = GAP_ADV_SEC_PHY_1_MBPS,                                                                                                                   \
    .sid            = 0                                                                                                                                         \
}

Essentially, I am trying for change the transmit power to 5 dBm.

When I run this code, the advertisement transmit power does not appear to change. I have tried setting it to -12dBm as well but RSSI value remains same. 

I also tried using the Simple Peripheral example and in SysCfg, I changed the transmit power to different values and it gets reflected as well in RSSI. 

Can you guide me where in the code I have to make changes such that the advertisement transmit power gets changed to desired value?

Also, what does it mean to have following transmit power macro used? What chipset uses as a transmit power then?

 .txPower        = GAP_ADV_TX_POWER_NO_PREFERENCE,