Trouble exporting BLE server from Nucleo to custom board.
Hello,
Working on a custom BLE server (peripheral role), I face a trouble exporting the working sources from a Nucleo project (STM32WB55) to a custom board (STM32WB55) project.
Everything is working fine on the Nucleo: advertissing, connection, bidirectional communication etc...
On the custom board, the BLE master sees the advertissing slave, but there is no way to connect to it. It fails connecting!
2 softwares were used on the Master side: ST BLE Toolbox and nRF Connect. Both give same results.
The nRF connect show an additional log error 133(0x85): GATT Error.
The custom board does not implement LSE crystal. HSE is used instead. I follow this URL but cannot find CFG_BLE_LSE_SOURCE in BLE configuration.
(community.st.com/s/article/configuring-stm32wb-for-bluetooth-le-without-an-lse-crystal).
I was expecting a trouble from this point, and found several ticket on the knowledge base, but no one have solution:
- community.st.com/s/question/0D50X0000C3BaK3SQK/migration-from-nucleo-to-my-own-board-doesnt-work
- st.force.com/community/s/question/0D53W000006qrigSAA/stm32wb55-pnucleowb55-advertising-works-but-i-cant-connect-when-building-application-using-code-generated-by-cubemx
No uart debug is possible on the custom board. Is there a way to use custom server application debug trace though STLink/JTAG?
The following items were verified on the custom board:
- Master clock is the expected one, verified on MCO pin.
- The application heartbeat is the expected. The system boot properly as well as the BLE full firmware stack.
- Debugging though STlink/JTAG is working.
- The RTC_WKUP_IRQHandler is verified woked up every 100ms (by toggling a pin).
- The advertising name, device type, tx power level and flags are properly received on the BLE master.
- Connect and Disconnect requests from master trigger the slave to go through Custom_APP_Notification CUSTOM_CONN_HANDLE_EVT and CUSTOM_DISCON_HANDLE_EVT cases on the custom application. This looks like a timeout is triggered on the master, not receiving properly the connection request.
Do you have any clue to help debug the situation?
