I have uploaded my project,
1832.direction_finding_connectionless.zip
This problem has been bothering me for a long time!And if possible, I really hope someone could download it to see where the problem is. Thank you in advance!I have listed some modifications I made to the SDK examples(D:\NCS\ncs2.5.0\v2.5.0\nrf\samples\bluetooth\direction_finding_connectionless_rx&tx) and the experimental results later.
hardware: nrf5340-dk
ncs:2.5.0
sample: direction_finding_connectionless_rx & direction_finding_connectionless_tx (AoD mode)
issue:
Creating Periodic Advertising Sync...ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:338 *** Booting nRF Connect SDK v2.5.0 ***with err -11
after debug, I find the code stall at hci_core.c 388:
err = k_sem_take(&sync_sem, HCI_CMD_TIMEOUT); BT_ASSERT_MSG(err == 0, "command opcode 0x%04x timeout with err %d", opcode, err);
I cannot run into create_sync() after the scan_enable() is runed even if I run the Rx sample along with the TX sample.






antenna

RF connector
I can not find CTE advertising package.
[DEVICE]: 76:E6:BA:B0:C6:17 (random), AD evt type 3, Tx Pwr: 127, RSSI -64 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255
but the interval always is 0. and SID always is 255.
I cannot find : success. Periodic sync established.So, never run to receive CTE.
I connected an external antenna matrix with 4 antennas at the TX end using an RF connector, I tried the connection example (Direction finding central/peripheral) and used the same configuration as direction_finding_connectionless_rx/tx,and according to Direction finding central/peripheral testing, the antenna signal was indeed successfully connected to the external antenna.It did connect successfully and received CTE data.But in direction_finding_connectionless_rx/tx example, using the same configuration failed.
direction_finding_connectionless_tx(AOD mode):
Configuration:



Control panel output:
*** Booting nRF Connect SDK v2.5.0 *** Starting Connectionless Beacon Demo Bluetooth initialization...success Advertising set create...success Update CTE params...success Periodic advertising params set...success Enable CTE...success Periodic advertising enable...success Extended advertising enable...success Started extended advertising as DF:51:35:BB:2D:FC (random)
direction_finding_connectionless_rx:
Configuration:





Control panel output:
First time programming code:
*** Booting nRF Connect SDK v2.5.0 *** Starting Connectionless Locator Demo Bluetooth initialization...success Scan callbacks register...success. Periodic Advertising callbacks register...success. Start scanning...success Waiting for periodic advertising... [DEVICE]: 36:24:D7:AC:34:13 (random), AD evt type 3, Tx Pwr: 127, RSSI -96 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 70:BD:2C:AA:B9:D6 (random), AD evt type 0, Tx Pwr: 127, RSSI -90 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 70:BD:2C:AA:B9:D6 (random), AD evt type 4, Tx Pwr: 127, RSSI -89 C:1 S:1 D:0 SR:1 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 12:86:E6:5C:F9:40 (random), AD evt type 3, Tx Pwr: 127, RSSI -61 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 69:1B:97:62:73:42 (random), AD evt type 0, Tx Pwr: 127, RSSI -89 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 7F:13:80:1F:B5:29 (random), AD evt type 0, Tx Pwr: 127, RSSI -96 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 29:5A:96:94:BD:E3 (random), AD evt type 3, Tx Pwr: 127, RSSI -93 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 5F:97:DC:DC:01:BE (random), AD evt type 3, Tx Pwr: 127, RSSI -94 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 38:E9:2C:46:09:43 (random), AD evt type 3, Tx Pwr: 127, RSSI -86 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 7D:85:8C:FE:F6:99 (random), AD evt type 2, Tx Pwr: 127, RSSI -76 C:0 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 7A:73:92:C1:D1:1C (random), AD evt type 2, Tx Pwr: 127, RSSI -80 C:0 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 33:A5:ED:97:96:BF (random), AD evt type 3, Tx Pwr: 127, RSSI -78 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255
Continuous second time programming code:
[DEVICE]: 7B:34:B4:83:65:85 (random), AD evt type 3, Tx Pwr: 127, RSSI -68 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 76:E6:BA:B0:C6:17 (random), AD evt type 3, Tx Pwr: 127, RSSI -64 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 success. Found periodic advertising. Creating Periodic Advertising Sync...ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:338 *** Booting nRF Connect SDK v2.5.0 ***with err -11 Starting Connectionless Locator Demo Bluetooth initialization...failed (err -11) success Scan callbacks register...success. Periodic Advertising callbacks register...success. Start scanning...failed (err -11) Waiting for periodic advertising... *** Booting nRF Connect SDK v2.5.0 *** Starting Connectionless Locator Demo Bluetooth initialization...success Scan callbacks register...success. Periodic Advertising callbacks register...success. Start scanning...success Waiting for periodic advertising... [DEVICE]: FC:02:F2:8B:8A:8E (public), AD evt type 0, Tx Pwr: 127, RSSI -89 FR8010_MI C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 75:26:60:D1:5E:74 (random), AD evt type 3, Tx Pwr: 127, RSSI -92 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 38:FC:98:8C:0F:B3 (public), AD evt type 0, Tx Pwr: 127, RSSI -93 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 38:FC:98:8C:0F:B3 (public), AD evt type 4, Tx Pwr: 127, RSSI -92 C:1 S:1 D:0 SR:1 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 72:E9:B7:AD:B2:40 (random), AD evt type 0, Tx Pwr: 127, RSSI -75 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 72:E9:B7:AD:B2:40 (random), AD evt type 4, Tx Pwr: 127, RSSI -75 C:1 S:1 D:0 SR:1 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255
When I modify the code(hci_core.c 388) ,err -11 disappeared, but synchronization was still not achieved and CTE data was not received:
(Change HCI_CMD_TIMEOUT to K_FOREVER;I did not modify this code in the project I uploaded;
hci_core.c 66: #define HCI_CMD_TIMEOUT K_SECONDS(10))
err = k_sem_take(&sync_sem, K_FOREVER);
BT_ASSERT_MSG(err == 0, "command opcode 0x%04x timeout with err %d", opcode, err);
First time programming code:
*** Booting nRF Connect SDK v2.5.0 *** Starting Connectionless Locator Demo Bluetooth initialization...success Scan callbacks register...success. Periodic Advertising callbacks register...success. Start scanning...success Waiting for periodic advertising... [DEVICE]: 0B:77:C4:66:D4:59 (random), AD evt type 3, Tx Pwr: 127, RSSI -88 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 18:96:1D:03:92:A7 (random), AD evt type 3, Tx Pwr: 127, RSSI -92 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 6A:6A:79:86:AA:30 (random), AD evt type 0, Tx Pwr: 127, RSSI -78 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 32:73:62:FF:00:78 (random), AD evt type 3, Tx Pwr: 127, RSSI -97 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 30:0A:60:4B:94:22 (random), AD evt type 3, Tx Pwr: 127, RSSI -98 C:0 S:0 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255
Continuous second time programming code:
[DEVICE]: 7A:29:E0:CF:BD:C0 (random), AD evt type 0, Tx Pwr: 127, RSSI -73 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 7A:29:E0:CF:BD:C0 (random), AD evt type 4, Tx Pwr: 127, RSSI -71 C:1 S:1 D:0 SR:1 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 success. Found periodic advertising. Creating Periodic Advertising Sync...*** Booting nRF Connect SDK v2.5.0 *** Starting Connectionless Locator Demo Bluetooth initialization...success Scan callbacks register...success. Periodic Advertising callbacks register...success. Start scanning...success Waiting for periodic advertising... [DEVICE]: 59:A5:67:B4:31:29 (random), AD evt type 2, Tx Pwr: 127, RSSI -82 C:0 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 7A:29:E0:CF:BD:C0 (random), AD evt type 0, Tx Pwr: 127, RSSI -70 C:1 S:1 D:0 SR:0 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255 [DEVICE]: 7A:29:E0:CF:BD:C0 (random), AD evt type 4, Tx Pwr: 127, RSSI -70 C:1 S:1 D:0 SR:1 E:0 Prim: LE 1M, Secn: No packets, Interval: 0x0000 (0 ms), SID: 255
Antenna matrix connection(TX AOD):
Four GPIOs used to control antenna switching are connected to the external antenna matrix via DuPont cables.The antenna array is connected through RF connectors.




I don't know if it's a problem with my hardware configuration or software configuration.