This is definitely a bit confusing in the current code base. To set advertising 
power for a particular advertising state machine you need to use the 
multi-advertising code. If you see the code in this function: 
ble_ll_adv_set_adv_params() you will see that the advsm->adv_txpwr element gets 
set to either a syscfg value, or in the case of multi-advertising supported, 
the value specified in the command.

The code here:  ble_ll_adv_tx_start_cb() calls the ble phy power set command 
and thus effectively trumps whatever you set it to if you used 
ble_phy_txpwr_set() elsewhere in the code. It sets the transmit power to 
advsm->adv_txpwr.


> On May 15, 2017, at 4:05 PM, Gurpreet Singh <gurpr...@mistsys.com> wrote:
> 
> Hi,
> 
> I used the example snippet from this mail thread
> <http://www.mail-archive.com/dev@mynewt.incubator.apache.org/msg01236.html> 
> [1]
> to adjust the Tx Power Level of an eddystone URL beacon from the nRF52dk
> 
> Unfortunately, I dont see the rssi change as I change the values. I checked
> and tried values in the range 4 and -40, but lightblue and eBeacon on my
> iPhone dont show a change in the rssi values.
> 
> I do see the call to ble_phy_txpwr_get returns the newly applied value,
> however.
> 
> Am I missing some configuration somewhere, because in the thread I
> referenced Simon did mention that he saw the power change?
> 
> Right now I'm changing this at compile time, but at some point I'd like to
> be able to do this as a configuration switch at run time, if thats
> possible?
> 
> Thanks in advance,
> Gurpreet
> 
> [1]
> http://www.mail-archive.com/dev@mynewt.incubator.apache.org/msg01236.html

Reply via email to