This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

direction finding rx example problem

I try to run zephyr direction finding cnnetionless rx example, but i get some problem. every time into enable receiving of cte , i got assertion fail

this is my prj.conf

CONFIG_SERIAL=y
CONFIG_NRFX_UARTE0=y
CONFIG_UART_ASYNC_API=y


CONFIG_BT=y
CONFIG_BT_DEVICE_NAME="DF Connectionless Locator App"

CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV_SYNC=y
CONFIG_BT_OBSERVER=y

# Enable Direction Finding Feature including AoA and AoD
CONFIG_BT_DF=y
CONFIG_BT_DF_CONNECTIONLESS_CTE_RX=y

CONFIG_BT_CTLR=y
CONFIG_BT_LL_SW_SPLIT=y

CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_SYNC_PERIODIC=y

# Enable Direction Finding Feature including AoA and AoD
CONFIG_BT_CTLR_DF=y

# Disable Direction Fiding TX mode
CONFIG_BT_CTLR_DF_ANT_SWITCH_TX=n
CONFIG_BT_CTLR_DF_ADV_CTE_TX=n

CONFIG_BT_CTLR_DF_PER_SCAN_CTE_NUM_MAX=16



CONFIG_BT_CTLR_DF_ANT_SWITCH_RX=n


CONFIG_BT_DF_CTE_RX_AOA=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

Parents
  • Hello Hang,

    I have a tried recreating your exact issue, but I haven't been able to. However, I do also run into issues using your configurations.

    It seems like you are trying to disable both AoA and AoD? Are you able to run the standard examples, with default configurations?

    Regards,

    Elfving

  • thank you Elfving

    I just want to disable AOA, but if i don't disable `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, the project will build failed, just like this

    C:\Users\Thomas\ncs\v1.9.1\zephyr\subsys\bluetooth\controller\ll_sw\nordic\hal\nrf5\radio\radio_df.c:81:1: error: static assertion failed: "Missing antenna pattern used to select antenna for PDU Tx during the DFE Idle state. Set the dfe-pdu-antenna devicetree property."
       81 | BUILD_ASSERT(HAS_PDU_ANTENNA,
          | ^~~~~~~~~~~~
    C:\Users\Thomas\ncs\v1.9.1\zephyr\subsys\bluetooth\controller\ll_sw\nordic\hal\nrf5\radio\radio_df.c:116:1: error: static assertion failed: "You must set the dfe-antenna-num property in the radio node to enable antenna switching."
      116 | BUILD_ASSERT(HAS_ANTENNA_NUM,
    I think AOD doesn't need set antenna pattern, so I disable `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, is problem here?

Reply
  • thank you Elfving

    I just want to disable AOA, but if i don't disable `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, the project will build failed, just like this

    C:\Users\Thomas\ncs\v1.9.1\zephyr\subsys\bluetooth\controller\ll_sw\nordic\hal\nrf5\radio\radio_df.c:81:1: error: static assertion failed: "Missing antenna pattern used to select antenna for PDU Tx during the DFE Idle state. Set the dfe-pdu-antenna devicetree property."
       81 | BUILD_ASSERT(HAS_PDU_ANTENNA,
          | ^~~~~~~~~~~~
    C:\Users\Thomas\ncs\v1.9.1\zephyr\subsys\bluetooth\controller\ll_sw\nordic\hal\nrf5\radio\radio_df.c:116:1: error: static assertion failed: "You must set the dfe-antenna-num property in the radio node to enable antenna switching."
      116 | BUILD_ASSERT(HAS_ANTENNA_NUM,
    I think AOD doesn't need set antenna pattern, so I disable `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, is problem here?

Children
  • I see.

    hang chen said:
    ut if i don't disable `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, the project will build failed, just like this

    That configuration is in the right place, and I believe that is the only configuration you would need, though I am not so sure about the other ones. Are you getting errors when you only use this configuration to disable AOA? 

    Are you seeing this problem in the basic examples as well? Is your project modified a lot compared to the default project?

    Regards,

    Elfving

  • I just copied the `nrf52833dk_nrf52833.conf` and `overlay-aod.conf` to my prj.conf.

    If I remove the `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, and configure a fake antenna switch, like this

    const static uint8_t ant_patterns[] = { 0x00, 0x00};

    my projectt will run correctly

  • hang chen said:

    If I remove the `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, and configure a fake antenna switch, like this

    hang chen said:
    my projectt will run correctly

    Okay, and by that you mean that it both builds correctly and does not throw an error during the receiving of a CTE? 

    hang chen said:

    I just want to disable AOA, but if i don't disable `CONFIG_BT_CTLR_DF_ANT_SWITCH_RX`, the project will build failed, just like this

    So in other words the build fails when you have only have set CONFIG_BT_DF_CTE_RX_AOA=n in addition to the default? Does it work for you with only the default enabled though? It is good to make sure that there are nothing wrong with your copy of the standard samples before continuing. 

    Regards,

    Elfving

  • thank you Elfving, Sorry for taking so long to reply to you.

    yes, Maybe I found the problem. I found that even in AOD, the instructions sent are still AOA. On line 326 of the direction.c, I found that the number of antennas sent in the official example is an invalid value. after I modify it, my project work succeed. 

    //dest_ant_ids = net_buf_add(*buf, params->num_ant_ids);
    dest_ant_ids = net_buf_add(*buf, switch_pattern_len);

    Thank you very much for your help

Related