cancel
Showing results for 
Search instead for 
Did you mean: 

Which parameters are suitable for aci_hal_set_tx_power_level with SPBTLE-RF ?

JulienD
Senior
Posted on August 04, 2016 at 09:33

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-rf
2 REPLIES 2
AndyJT
Associate III
Posted on May 11, 2018 at 11:06

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...

Posted on May 14, 2018 at 19:01

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 level

During the initialization phase user can also select the transmitting power level using the

following 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 -2

dBm 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 and

UM1865 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 until

another 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 parameters

Parameter Size Description

EN_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 combination

EN_HIGH_POWER PA_LEVEL TX Power Level (dBm)

0 0 -18

0 1 -14.7

0 2 -11.4

0 3 -8.1

0 4 -4.9

0 5 -1.6

0 6 1.7

0 7 5.0

1 0 -15

1 1 -11.7

1 2 -8.4

1 3 -5.1

1 4 -2.1

1 5 1.4

1 6 4.7

1 7 8.0 (default)