I'm sending HCI command LE Set Transmit Power Reporting Enable with both local and remote reporting requested.
The Bluetooth Core Specification says "If the Remote_Enable parameter is set to 0x01 and no prior LE Power Control Request procedure has been initiated on the ACL connection, then the Controller shall initiate a new LE Power Control Request procedure (LL5.1.17) on that ACL".
The Power Control Request procedure says "The Link Layer initiates this procedure by sending an LL_POWER_CONTROL_REQ PDU".
But I see no power control PDUs exchanged.
Here's my code, which I call once after establishing the connection:
void set_tx_power_reporting_enable() {
struct net_buf *rsp;
struct net_buf *command;
int err;
uint8_t local_enable = 1;
uint8_t remote_enable = 1;
uint16_t conn_handle = 0;
command = bt_hci_cmd_alloc(K_SECONDS(5));
if (!command) {
printk("set_tx_power_reporting_enable: No HCI command buffer!\n");
return;
}
net_buf_add_le16(command, conn_handle);
net_buf_add_u8(command, local_enable);
net_buf_add_u8(command, remote_enable);
err = bt_hci_cmd_send_sync(BT_HCI_OP_LE_SET_TX_POWER_REPORT_ENABLE, command, &rsp);
if (err) {
printk("set_tx_power_reporting_enable: HCI command failed (err %d)\n", err);
} else {
printk("set_tx_power_reporting_enable: HCI command OK\n");
}
net_buf_unref(rsp);
}
The command is working because I see this in the console:
set_tx_power_reporting_enable: HCI command OK

