2022-03-14 07:36 AM
I'm writing firmware for a custom board using the STM32WB15CCU6E and am having trouble getting the BLE functionality to work properly. I have created a minimal project that gets BLE running, and have not changed anything in the STM32_WPAN section, so it's just running the default "Custom P2P Server".
The device advertises and is picked up by Windows and Android, but connection attempts always fail. During a connection attempt, HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE is received (in app_ble.c) with a Status of 0, and HCI_DISCONNECTION_COMPLETE_EVT_CODE is then received immediately after with a Reason of 0x3E (connection failed to be established).
Sniffing the packets shows that the master sends CONNECT_IND and then makes repeated requests with LL_FEATURE_REQ, but the slave never sends anything back. The slave then goes back to advertising a few seconds later.
I've been working on this issue for multiple days now and am out of ideas, so would really appreciate some help solving it.
Solved! Go to Solution.
2022-03-15 04:13 AM
Problem was solved by setting CFG_BLE_LSE_SOURCE to Enabled in CubeMX, as mentioned in https://community.st.com/s/question/0D50X0000C3BaK3SQK/migration-from-nucleo-to-my-own-board-doesnt-work. I had already switched RFWKP from LSE to HSE in Clock Configuration (as we do not have an LSE on our board), but this does not work without also changing CFG_BLE_LSE_SOURCE to match.
2022-03-15 04:13 AM
Problem was solved by setting CFG_BLE_LSE_SOURCE to Enabled in CubeMX, as mentioned in https://community.st.com/s/question/0D50X0000C3BaK3SQK/migration-from-nucleo-to-my-own-board-doesnt-work. I had already switched RFWKP from LSE to HSE in Clock Configuration (as we do not have an LSE on our board), but this does not work without also changing CFG_BLE_LSE_SOURCE to match.