In my application,I have written a code based on ble_hrs sample example. When I am checking the RSSI value at the tablet at 2 meter distance I am getting -56dbm. As per my knowledge, RSSI value is determined by the receiver based on the strength of the signal it received and it decreases as the distance between both central and peripheral device increases. Only way to get better strength of signal at receiver is to increase the transmitted power.
So, I want to understand what is the default tx power of the nrf52 when using SDK12.0.0 and S132 soft device. And how can I increase the power level from code? Is it any sample example available for this?
The default TX power with the softdevice is 0dbm. You can change the TX power using the softdevice function sd_ble_gap_tx_power_set().
I have a similar application wherein I need to scan for beacons within a particular range(say 10m, 20m etc). Will the above answer help?
TX power configuration will not affect scannable range. You can use the RSSI that is present in the advertising packet struct to get an indication of the strength of the received signal, but note that RSSI is not a good indication of range. Beacons can transmit with different output powers, and interference/objects can reduce signal strength.
Hi, good sample with description how to change TX power can find here https://github.com/NordicPlayground/nrf52-ble-multi-link-multi-role. I've learnt a lot from this sample about power consumption and coverage range.
Could you please share the source code for changing the TX power? for I'll be very grateful.