2020-04-22 2:21 AM - last edited on 2026-02-13 2:21 AM by Andrew Neil
Hi all,
I'm working on my first implementation of Bluetooth in a client custom bord. The board MCU is an STM32L151VeT6 with an BLUENRG-M2 module. I'm not new to STM32 development but new to Bluetooth. Im using STM32CubeMX with STM32IDE.
I started first with an X-Nucleo-BNRG2A1 with an Nucleo-L476RG. I got the SensorDemo_BLESensor-App working fine. All the config was done from scratch with MX.
Now the problem comes when I try to use the same demo with my custom board. I cannot get the module to initialize correctly.
I would like to know why using this demo application on my custom board in not as straight forward as I thought. I cannot find any help on the web.
I understand that the demo application was done for the X-Nucleo-BNRG2A1 but apparently changing Platform setting to match the custom board is not enough.
Are there any modifications other than in CubeMX that should be done in the generated source and header file when using a custom board??
HCI_init seems to be fin but I am getting a BLE_STATUS_TIMEOUT error when trying to do a hci_reset.
tBleStatus hci_reset(void)
{
struct hci_request rq;
tBleStatus status = 0;
BLUENRG_memset(&rq, 0, sizeof(rq));
rq.ogf = 0x03;
rq.ocf = 0x003;
rq.rparam = &status;
rq.rlen = 1;
if (hci_send_req(&rq, FALSE) < 0)
return BLE_STATUS_TIMEOUT;
if (status) {
return status;
}
return BLE_STATUS_SUCCESS;
}Thanks for your help!
2026-02-13 2:19 AM - edited 2026-03-24 5:18 AM
Anyupdates?