2025-10-03 12:44 AM - last edited on 2025-10-03 3:33 AM by mƎALLEm
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code
Hi All,
I’m developing a custom BLE Central + Zigbee Coordinator application, and I’ve implemented all the required functionalities.
Initially, I tested everything on the STM32WB55 Nucleo board, and both BLE and Zigbee worked perfectly.
However, after migrating the same application to my custom hardware, I’m facing an issue specifically with BLE connections.
I can successfully scan and see BLE advertising packets from nearby devices.
When I attempt to connect to a BLE smart relay/smart plug, I receive a Connection Complete Event (Success), but immediately afterwards I get a Disconnection Event with reason code 0x3E.
Zigbee still works fine — I can connect Zigbee end devices into my network without any issue.
So the surprising part is:
On the Nucleo board → BLE and Zigbee both work fine.
On my custom hardware → Zigbee works fine, but BLE connections always fail right after connecting.
I’ve already referred to related posts and tried changes (like adjusting configuration parameters), but the issue persists.
/**
* Source for the 32 kHz slow speed clock
*
* 1 : internal RO
* 0 : external crystal ( no calibration )
*/
#define CFG_BLE_LS_SOURCE
I have an external crystal and I had checked both conditions, still no good news.
I also came across this in Ble_P2P_Server/Client and I also tried this:
/**
* LsSource
* Some information for Low speed clock mapped in bits field
* - bit 0: 1: Calibration for the RF system wakeup clock source 0: No calibration for the RF system wakeup clock source
* - bit 1: 1: STM32WB5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module
* - bit 2: 1: HSE/1024 Clock config 0: LSE Clock config
*/
#if defined(STM32WB5Mxx)
#define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE)
#else
#define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE)
#endif
My doubt is whether there is anything more that could be done in the firmware?
Any help is appreciated.
Thanks!
Regards,
Viswajith P