Details:
I would expect the nRF21540 DK to run out of the box as a very simple BLE Peripheral on Zephyr but that is not the case.
While the Peripheral starts advertising, I cannot connect to it successfully either with the nRF Dongle or via nRF Connect App on my phone.
The Centrals see the Peripheral, try to connect and most often fail with a BLE_HCICONN_FAILED_TO_BE_ESTABLISHED error.
Very rarely the connection succeeds but lasts just for a moment and then it gets dropped receiving the BLE_HCI_CONNECTION_TIMEOUT error.
From my research and debugging it's seems to be a Connection Supervision Timeout.
I've tried a variety of samples from the Zephyr library (Peripheral, Peripheral UART, Peripheral CTS, Peripheral HR, etc) and the same errors occur. Quite surprised an evaluation board does not run correctly out of the box with basic examples.
Setup and information:
- NCS SDK 2.5.1
- Utilizing the nRF21540DK: https://www.nordicsemi.com/Products/Development-hardware/nRF21540-DB
- Reference program: https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/bluetooth/peripheral
- Dongle used as BLE Central in nRF Connect for Desktop BLE: https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle
Extras:
- Similar issues from other Nordic DevZone Q&A are hinting the issue might be related to the LF Clock, unfortunately there seems no way to control this in Zephyr (the following were using the older NRF5 SDK):
- Images below from both central and peripheral sides.