nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

nRF5340dk CTE extension is present but data is missing

Hi,

I have been evaluating the nRF5340dk for our application purposes and I am currently investigating on how the bluetooth directional finding works.

I happened to encounter an issue with the zephyr and nordic connectionless tx/rx examples, where the transmitter is clearly showing it wants to send AoA/AoD data in the CTE but then on the receiver, there is no data received. After receiving the 5 empty samples, the receiver encounters an error and restarts the program.This seems to be true for both, AoA and AoD modes, please see the program output below.

EDITS FOR TRACKING ISSUE PROGRESS:

- The error it throws is EAGAIN (11), however, that does not still explain why there is no data in the CTE packages?

- The function throwing the error on the cpuapp side is line 304 in hci_core.c: k_sem_take for opcode 0x2053 (HCI enable CTE RX), on cpunet this shows as <err> hci_rpmsg: Command payload length is not correct which is line 67 of main.c in the hci_rpmsg sample application

- The problem is the HCI CTE enable RX command (opcode 0x2053) which should contain 8 bytes in the payload but application core is only sending 6. (10 bytes total, first byte is packet indicator, the following three are header for which opcode is two bytes and the third is the length of parameter and then the rest are the parameter payload bytes).

*** Booting Zephyr OS build v2.7.99-ncs1-7-ga49c0691993c  ***
Starting Connectionless Locator Demo
Bluetooth initialization...success
Scan callbacks register...success.
Periodic Advertising callbacks register...success.
Start scanning...success
Waiting for periodic advertising...[DEVICE]: D5:5E:E4:F6:AB:44 (random), AD evt type 3, Tx Pwr: 127, RSSI -80  C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255
[DEVICE]: 1F:C1:8F:39:98:A0 (random), AD evt type 5, Tx Pwr: 127, RSSI -76 Zephyr C:0 S:0 D:0 SR:0 E:1 Prim: LE 1M, Secn: LE 2M, Interval: 0x0780 (2400 ms), SID: 0
success. Found periodic advertising.
Creating Periodic Advertising Sync...success.
Waiting for periodic sync...
PER_ADV_SYNC[0]: [DEVICE]: 1F:C1:8F:39:98:A0 (random) synced, Interval 0x0780 (2400 ms), PHY LE 2M
PER_ADV_SYNC[0]: [DEVICE]: 1F:C1:8F:39:98:A0 (random), tx_power 127, RSSI -83, CTE AOD 2 [us], data length 0, data: 
success. Periodic sync established.
Enable receiving of CTE...
PER_ADV_SYNC[0]: [DEVICE]: 1F:C1:8F:39:98:A0 (random), tx_power 127, RSSI -83, CTE AOD 2 [us], data length 0, data: 
PER_ADV_SYNC[0]: [DEVICE]: 1F:C1:8F:39:98:A0 (random), tx_power 127, RSSI -74, CTE AOD 2 [us], data length 0, data: 
PER_ADV_SYNC[0]: [DEVICE]: 1F:C1:8F:39:98:A0 (random), tx_power 127, RSSI -81, CTE AOD 2 [us], data length 0, data: 
PER_ADV_SYNC[0]: [DEVICE]: 1F:C1:8F:39:98:A0 (random), tx_power 127, RSSI -74, CTE AOD 2 [us], data length 0, data: 
ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:305
*** Booting Zephyr OS build v2.7.99-ncs1-7-ga49c0691993c  ***

Parents
  • Hi

    Okay, have you done the necessary configurations in order to make the direction finding applications run on an nRF5340 DK? As mentioned in both the TX and RX samples, for the nRF53 DK, the Bluetooth LE controller is part of a child image aimed to run on the network core. Configuration for the child image is stored in the child_image/ subdirectory.

    Also, to build the connectionless TX for AoA (or RX for AoD) you need to add the content of the overlay-aoa.conf file to your child_image/hcirpmsg.conf file.

    Best regards,

    Simon

  • Yes, I have done these and I have also tested the nrf examples where those child_image folders are all set and configured, the same thing happens.

    The problem is with opcode 0x2053 (enable HCI RX) which when sent from the application core to the network core cointains 10 bytes. When the network core parses the command, it expects 8 bytes for the parameter size after the packet indicator and the header (appointed by the header -> param_length) but there are 6 bytes left. This triggers the check, which then causes the network core to never enable CTE RX and also never give the sync semaphore, resulting in timeout on the application core.

Reply
  • Yes, I have done these and I have also tested the nrf examples where those child_image folders are all set and configured, the same thing happens.

    The problem is with opcode 0x2053 (enable HCI RX) which when sent from the application core to the network core cointains 10 bytes. When the network core parses the command, it expects 8 bytes for the parameter size after the packet indicator and the header (appointed by the header -> param_length) but there are 6 bytes left. This triggers the check, which then causes the network core to never enable CTE RX and also never give the sync semaphore, resulting in timeout on the application core.

Children
No Data
Related