2016-08-04 12:33 AM
Hi,
The description in the .h file states that: '' * @param en_high_power Can be only 0 or 1. Set high power bit on or off. It is strongly adviced to use the * right value, depending on the selected hardware configuration for the RF network: * normal mode or high power mode. '' So, which value should be used as en _high_power with the SPBTLE-RF module? Thanks Julien #spbtle-rf2018-05-11 02:06 AM
I know this is probably too late for you, but I was searching for the same thing and managed to find the following info inST document UM2295:
/* MACROS for Power Level definitions */
#define POWER_LEVEL_LOW 0
#define TX_POWER_LEVEL_MINUS_18DBM 0 // = -18 dBm,
#define TX_POWER_LEVEL_MINUS_15DBM 1 // = -15 dBm,
#define TX_POWER_LEVEL_MINUS_12DBM 2 // = -12 dBm,
#define TX_POWER_LEVEL_MINUS_9DBM 3 // = -9 dBm,
#define TX_POWER_LEVEL_MINUS_6DBM 4 // = -6 dBm,
#define TX_POWER_LEVEL_MINUS_2DBM 5 // = -2 dBm,
#define TX_POWER_LEVEL_0DBM 6 // = 0 dBm,
#define TX_POWER_LEVEL_PLUS_5DBM 7 // = +5 dBm.
#define POWER_LEVEL_HIGH 1
#define TX_POWER_LEVEL_MINUS_14DBM 0 // = -14 dBm,
#define TX_POWER_LEVEL_MINUS_11DBM 1 // = -11 dBm,
#define TX_POWER_LEVEL_MINUS_8DBM 2 // = -8 dBm,
#define TX_POWER_LEVEL_MINUS_5DBM 3 // = -5 dBm,
#define TX_POWER_LEVEL_PLUS_2DBM 5 // = +2 dBm,
#define TX_POWER_LEVEL_PLUS_4DBM 6 // = +4 dBm,
#define TX_POWER_LEVEL_PLUS_8DBM 7 // = +8 dBm�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
So callingaci_hal_set_tx_power_level(1, 7); will set the output power to +8dBm.
aci_hal_set_tx_power_level(0,4); will set the output power to -6dBm.
I believe maximum power isthe default power on state...
2018-05-14 12:01 PM
Interesting to see those constants in the mesh document referenced above, which are slightly different from this document:
PM0237 BlueNRG, BlueNRG-MS stacks programming guidelines, Rev 6, Dec 2016:
Set tx power levelDuring the initialization phase user can also select the transmitting power level using thefollowing API:aci_hal_set_tx_power_level(high or standard, power level)Follow a pseudocode example for setting the radio transmit power in high power and -2dBm output power:ret = aci_hal_set_tx_power_level(1,4);For a complete description of this API and related parameters refer to the UM1755 andUM1865 user manuals, on the Section 5: References.And then going to UM1865 document:
UM1865 BlueNRG-MS User manual, Rev 7, Jan 2017:
The system will keep the last received TX power level from the command, i.e. the 2nd
command overwrites the previous TX power level. The new TX power level remains untilanother Set TX Power command, or the system reboots.Event(s) generated:The controller will generate a command complete event.Table 291. Aci_Hal_Set_Tx_Power_Level command parametersParameter Size DescriptionEN_HIGH_POWER 1 byte Can be only 0 or 1. Set high power bit on or off.PA_LEVEL 1 byte Can be from 0 to 7. Set the PA level value.Table 292. Tx_power_level command parameters combinationEN_HIGH_POWER PA_LEVEL TX Power Level (dBm)0 0 -180 1 -14.70 2 -11.40 3 -8.10 4 -4.90 5 -1.60 6 1.70 7 5.01 0 -151 1 -11.71 2 -8.41 3 -5.11 4 -2.11 5 1.41 6 4.71 7 8.0 (default)