Sending BT_HCI_OP_LE_TX_TEST_v4 DTM command doesn't work any more after ncs 2.6 update

Hey,

After updating the nRF Connect SDK v2.60 (from 2.3.0) package an attempt to turn a BLE carrier ON by sending the BT_HCI_OP_LE_TX_TEST_v4 DTM command over the HCI interface by calling the bt_hci_cmd_send_sync() function just keeps on returning the -EOI (-5) error response (the status byte returned is BT_HCI_ERR_UNKNOWN_CMD = 1).

We have the nRF5340 chip in our device and this same test was working just fine before the update. On the BLE controller we are running For the test we have just added the following config settings to hci_ipc.conf (in ...\gitrepo\ourplatform\child_image\ folder).

Are you aware of any reason why the carrier test wouldn't work anymore with the new ncs version? Or are we missing some vital changes in the config of our product?

Thanks,

-Jari

Parents Reply Children
  • Hi,

    Our intention was to run RF tests with our device so we just added the following config lines to hci_ipc.conf file (in  the../ourdevice/child_image/ folder) to get the Zephyr BLE controller into use:

    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_DTM_HCI=y
    CONFIG_BT_CTLR_DTM_HCI_TX_V4=y

    And we have one more change in the ourdevice_macro_cpunet.dts (in ../ourdevice/boards/arm/ourdevice_macro/ folder: the timer0 definition ("&timer0 { status = "okay"; };") was commented out.

    Regards,

    Jari

  • Firstly, could I suggest that you use v2.6.1 instead of v2.6.0, since the newer has some bug-fixes in general?

    For the HCI command, it should also be supported for v2.6.x, as we see here.
    Check for Kconfig override warnings to make sure that the configurations were really set.

    Try to log with CONFIG_BT_HCI_DRIVER_LOG_LEVEL and see if that returns anything useful.

  • Hi,

    First see my 2 edits in my previous comment/answer ((1) the name of the .conf file was corrected and (2) the 2nd change we have in the .dts file was added).

    I tried the ncs version 2.6.1 and it didn't solve our issue.

    I also checked that we have the "CONFIG_BT_HCI_DRIVER_LOG_LEVEL=3" line in the final autoconf.h. Also the build output shows only the following warnings:

    • warning: Experimental symbol BT_LL_SW_SPLIT is enabled.
    • warning: The choice symbol HRM_PAGES_LOG_LEVEL_ERR.
    • warning: Deprecated symbol BT_DEBUG_LOG is enabled.

    Regards,

    Jari

  • In that case, it looks like configuration should be correct.

    Could you share the source code you use to call the HCI command?

  • Here are the functions (handle_rf_test_data()->ble_test_start_carrier_tx()->ble_transmitter_test_v4_cmd():

    static void handle_rf_test_data(rf_acceptance_prod_test_t const * const data)
    {
    switch(data->mode){
    case RF_CARRIER:
    {
    ble_test_stop();
    uint8_t channel = get_channel(data->freq);
    int ret = ble_test_start_carrier_tx(channel, 0);
    if (ret)
    {
    LOG_ERR("ble_test_start_carrier_tx returned: %i", ret);
    }
    break;
    }
    ...
    }
    }

    int ble_test_start_carrier_tx(uint8_t channel, uint8_t tx_power) {
    transmitter_test_params_t params;
    params.tx_channel= channel;
    params.packet_payload = 0x11; //Vendor specific
    params.test_packet_length = 0xff;
    params.tx_power_level = tx_power;
    params.cte_length = 0;
    params.cte_type = 0;
    params.phy = 0x01; //1M
    return ble_transmitter_test_v4_cmd(&params);
    }

    int ble_transmitter_test_v4_cmd(transmitter_test_params_t * params)
    {
    struct net_buf* buf;
    uint8_t packet[TRANSMITTER_TEST_V4_PAYLOAD_LENGTH];
    int i = 0;
    packet[0] = params->tx_channel;
    packet[1] = params->test_packet_length;
    packet[2] = params->packet_payload;
    packet[3] = params->phy;
    packet[4] = params->cte_length;
    packet[5] = params->cte_type;
    packet[6] = params->switching_pattern_length;
    if(params->switching_pattern_length){
    for(i = 0;i<params->switching_pattern_length; ++i){
    packet[7+i] = params->antenna_ids[i];
    }
    }
    packet[7+i] = params->tx_power_level;

    buf = bt_hci_cmd_create(BT_HCI_OP_LE_TX_TEST_V4, 7+i+1);
    if (!buf) {
    return -ENOBUFS;
    }

    net_buf_add_mem(buf, packet, 7+i+1);

    return bt_hci_cmd_send_sync(BT_HCI_OP_LE_TX_TEST_V4, buf, NULL);
    }

    And below is a screenshot of the function which catches the error (-5):

Related