Cannot add more than 12 antenna patterns when use direction_finding_conntectless_rx example

I am using the latest code(v1.9.0-rc2). The board is nrf52833_nrf52833. The board overlay file set antenna number to 13. (The original value is 12). 

        dfe-antenna-num = <13>;

It seems that I can only have maximum 12 patterns in the ant-patterns. If I set 12 patterns, I will get an error.

main.c: 

static const uint8_t ant_patterns[] = { 0x2, 0x0, 0x5, 0x6, 0x1, 0x4,
					0xC, 0x9, 0xE, 0xD, 0x8, 0xA };
					
Got an error if adding more patterns:
static const uint8_t ant_patterns[] = { 0x2, 0x0, 0x5, 0x6, 0x1, 0x4,
					0xC, 0x9, 0xE, 0xD, 0x8, 0xA, 0x2};

When I have 13+ patterns, I got a CTE failed message(-22) from the device, and I cannot receive CTE. It is OK if I keep the number of ant_pattern under 12. 

PER_ADV_SYNC[0]: [DEVICE]: 1A:36:DC:A3:B0:74 (random), tx_power 127, RSSI -58, CTE AOA, data length 0, data: 
success. Periodic sync established.
Enable receiving of CTE...
failed (err -22)
Scan disable...Success.

Parents Reply Children
  • These configuration files haven't been changed.  I assume they are correct. I just tried the new v1.9.0 (coming out today.) It has the same problem.

    Here is nrf52833dk_nrf52833.overlay I am using:

    &radio {
            status = "okay";
            /* This is a number of antennas that are available on antenna matrix
             * designed by Nordic. For more information see README.rst.
             */
            dfe-antenna-num = <12>;
            /* This is a setting that enables antenna 12 (in antenna matrix designed
             * by Nordic) for Rx PDU. For more information see README.rst.
             */
            dfe-pdu-antenna = <0x0>;
    
            /* These are GPIO pin numbers that are provided to
             * Radio peripheral. The pins will be acquired by Radio to
             * drive antenna switching when AoA is enabled.
             * Pin numbers are selected to drive switches on antenna matrix
             * desinged by Nordic. For more information see README.rst.
             */
            dfegpio0-gpios = <&gpio0 3 0>;
            dfegpio1-gpios = <&gpio0 4 0>;
            dfegpio2-gpios = <&gpio0 28 0>;
            dfegpio3-gpios = <&gpio0 29 0>;
    };
    

  • Hi, 

    There is one Kconfig option in Zephyr that limits the number of allowed antenna IDs in antenna switch patterns: CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN.

    By default, it is set to 12. For Nordic devices, it can be set in the range 3-39. That is limited due to memory usage optimization. For the Nordic proprietary antenna, there was no point to use longer antenna switch patterns because it didn’t improve the performance of angles evaluation by our proprietary algorithms.

    It has to add the nrf52833dk_nrf52833.conf with CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN=N, where N is a required number for antenna switch pattern length.

    -Amanda

  • thanks,i set CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN,nowi have  no err.

Related