Skip to main content

bluetooth.settxpower(power)

Sets the Bluetooth transmit power level

Availability

Device
Only available on the imp004m (impOS 38+) and imp006 (impOS 42+)

Parameters

Name Type Description
power Integer Transmission power in dBm

Returns

Nothing

Description

This method sets the transmit power level for advertisements and scan responses. The parameter power is an integer in the range -16 to +4, with values that are not a multiple of four being truncated (ie. -1 and -3 will be interpreted as -4). Passing in a value outside of this range will cause an exception to be thrown. The default (prior to calling this function after each bluetooth.open() and maximum transmit power is +4dBm.

The transmit power level can be altered whether or not advertising is enabled.