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

nrf52820 power control not working from samples

We use nrf connect sdk under linux.

I need to control tx power to be able to adjust working range.

I take example from zephyr/samples/bluetooth/hci_pwr_ctrl

Add segger_rtt 

CONFIG_LOG_MINIMAL=n
CONFIG_CONSOLE=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=512
CONFIG_LOG_BUFFER_SIZE=512
CONFIG_LOG_PROCESS_THREAD=y
CONFIG_DEBUG_OPTIMIZATIONS=n
CONFIG_LOG_PRINTK=y
CONFIG_PRINTK=y
CONFIG_LOG_PRINTK_MAX_STRING_LENGTH=512

Slightly increase stack size to prevent stack overflow errors

Run it on the board and get errors

00> Set Tx power level to 4
00> 
00> Actual Tx Power: 4
00> 
00> Get Tx power level -> [00:00:15.010,467] <wrn> bt_hci_core: opcode 0xfc0f status 0x01
00> Read Tx power err: -5 reason 0x00
00> 
00> TXP = -1
00> 
00> Set Tx power level to 0
00> 
00> Actual Tx Power: 0
00> 
00> Get Tx power level -> [00:00:20.011,260] <wrn> bt_hci_core: opcode 0xfc0f status 0x01
00> Read Tx power err: -5 reason 0x00
00> 
00> TXP = -1
00> 
00> Set Tx power level to -3
00> 
00> [00:00:20.011,657] <wrn> bt_hci_core: opcode 0xfc0e status 0x12
00> Set Tx power err: -5 reason 0x00
00> 
00> Get Tx power level -> [00:00:25.012,084] <wrn> bt_hci_core: opcode 0xfc0f status 0x01
00> Read Tx power err: -5 reason 0x00
00> 
00> TXP = -1
00> 
00> Set Tx power level to -8
00> 
00> Actual Tx Power: -8
00> 
00> Get Tx power level -> [00:00:30.013,000] <wrn> bt_hci_core: opcode 0xfc0f status 0x01
00> Read Tx power err: -5 reason 0x00
00> 
00> TXP = -1
00> 
00> Set Tx power level to -15
00> 
00> [00:00:30.013,427] <wrn> bt_hci_core: opcode 0xfc0e status 0x12
00> Set Tx power err: -5 reason 0x00
00> 

Where is my mistake? May be there are other ways to control tx power? 

Parents Reply Children
No Data
Related