BL5340 nrf5340 dynamic transmit power for connected device does not appeared to work with the hci_pwr_ctrl example (RSSI does not reflect that)

Hello, I have a problem on getting the dynamic tx power to work properly on the BL5340 using the hci_pwr_ctrl. I tried the example, it build and flash correctly, no error being thrown out. The dynamic transmit power worked flawlessly I can see the step change that reflect on the RSSI. However, during connection, I have the code to sweep through the TX power, however, the RSSI does not reflect the change with going from -20 dBM to 20 dBm, RSSI remained the same at around -40 dBm at 1m distance. 

Below is the modified code with tx power sweep

void modulate_tx_power(void *p1, void *p2, void *p3)
{
    int8_t txp_get = 0;
    uint8_t idx = 0;

    while (1) {
        if (!default_conn) {
            printk("Set Tx power level to %d\n", txpower[idx]);
            set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV,
                     0, txpower[idx]);

            k_sleep(K_SECONDS(5));

            printk("Get Tx power level -> ");
            get_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV,
                     0, &txp_get);
            printk("TXP = %d\n", txp_get);

            idx = (idx+1) % DEVICE_BEACON_TXPOWER_NUM;
        } else {
            int8_t rssi = 0xFF;
            for(int8_t i = -20;i<=20;i++){
                read_conn_rssi(default_conn_handle, &rssi);
                set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN,default_conn_handle, i);
                printk("Connected (%d) - RSSI = %d\n",
                    default_conn_handle, rssi);
                k_sleep(K_SECONDS(1));
            }
           
        }
    }
}
Parents
  • Hi,

    If you are measuring this radiated I think it's difficult to give any meaningful results (potentially very short packet, spread over many channels), do you by any chance have a spectrum analyzer that you can hook to the antenna connector or even a Power Profiler Kit II so you can measure the current consumption during a BLE event?

    Kenneth

Reply
  • Hi,

    If you are measuring this radiated I think it's difficult to give any meaningful results (potentially very short packet, spread over many channels), do you by any chance have a spectrum analyzer that you can hook to the antenna connector or even a Power Profiler Kit II so you can measure the current consumption during a BLE event?

    Kenneth

Children
No Data
Related