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

change power of nrf51822 - setTxPower doesnt work.

Hello,

I have chip nrf51822 connected to nrf51dk. An usb connection provides power to both chips. While checking power of both chips via nrf connect on iphone7 i discovered that they both give me about -40 dBm even if almost put mobile on chip. So it seems that max power is -40dBm. I've read that nrf51822 should give me even +4dBm after using setTxPower(). I use mbed compiler to create hex file. I am not sure if i use setTxPower command correctly:

ble.gap().setTxPower(4);

or like this?

ble.setTxPower(4);

Does it matter where i set it (ie before starting of advertising)?

Any ideas would be more than appreciated. Kalreg

Parents
  • I'm afraid you don't understand the physics between radiation at the amplifier stage of the chip (which will generate 4/0/-4/-8/etc. dBm output), characteristic of antenna and its tuning (which can add gain or lower the effective observed power in 2.4GHz ISM band) and receiver sensitivity at given distance distance (which will again degrade the measured signal strength - because that's what you see, not what is effectively going through the air at transmitter's antenna). Ti make it worse 2.4GHz radio is already complex enough to have non-linear and non-homogenous topologies so your intuitive perception "when I measure at one point -40dBm I should see -50dBm when I go 2 meters further" doesn't need to match the reality (sometimes it does).

    To the coding: it shouldn't matter when you set this, it will be taken into account at very next Tx packet (whatever it is: advertisement PDU, connection link PDU or some proprietary packet). However the differences between +4/0/-4 don't need to be rally noticeable if you measure with equipment such as mobile phone (which doesn't have antenna/chip/SW stack to work properly in all situations and topologies).

  • You should be able to get slightly better performance with Nordic DK boards and reasonable phones (= typically most of "flag ships" in $400+ range) then -40dBm. That typically was achievable with Tx Power down to -4dBm and distance of 0-10cm from the DK board. But you will unlikely see higher values then let's say -20dBm with any phone and any distance.

Reply Children
No Data
Related