Skip to main content
PCu1
Senior
Jan 10, 2024 9:59 AM UTC
Question

aci_gap_create_connection() never returns on STM32WB5MM

Hello,

 

I'm using the client/server example with two Nucleo-WB55 kit, it works without issue.

Now I'm working with my own board:

Client : STM32WB5MM module

Server: the same nucleo-WB55 as above

 

At starting, the client scans and detects the server(with the right BLE address). But during the Connect_Request(), the client never returns from aci_gap_create_connection().

I did a clean configuration from cubeMX and I get exactly the same problem, and I have tried with two differents boards.

 

I have no idea why there is no return (success or not)... 

My BLE stack is 1.18.0

 

Thank you,

Pierre

This topic has been closed for replies.

5 replies

STTwo-32
ST Technical Moderator
Jan 11, 2024 7:42 AM UTC

Hello @PCu1 

I suggest you take a look at the following post, it may be helpful. Else, can you share more details about the issue.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
PCu1
PCu1Author
Senior
Jan 11, 2024 9:44 AM UTC

Hi @STTwo-32,

Thank you for your answer.

Unfortunately, I don't call ACI_GAP_START_CONNECTION_UPDATE as mentioned in the post you gave.

My initial firmware works in the router mode, but now I'm working on a clean configuration generated by CubeMX in CLIENT mode.

The only code I added is these lines at the end of APP_BLE_Init() to start the scan immediately (instead of a tactil switch with the Nucleo kit)

 

 /* USER CODE BEGIN APP_BLE_Init_2 */
 UTIL_SEQ_SetTask(1 << CFG_TASK_START_SCAN_ID, CFG_SCH_PRIO_0);
 /* USER CODE END APP_BLE_Init_2 */

 

After that, the scan detects the server and at the end of the procedure (case ACI_GAP_PROC_COMPLETE_VSEVT_CODE), the UTIL_SEQ_SetTask(1 << CFG_TASK_CONN_DEV_1_ID, CFG_SCH_PRIO_0) task is called.

When the code enters aci_gap_create_connection() it goes in the subfunction hci_send_req() and blocks in hci_cmd_resp_wait(HCI_TL_DEFAULT_TIMEOUT);

 

The sequencer is still running but the never returns from aci_gap_create_connection().

 

Note: I removed the stack and flashed again to be sure.

On the server side, I can connect with another nucleo-WB55 or a smartphone so in my opinion the code is correct in that side.

kr,

Pierre

 

PCu1
PCu1Author
Senior
Jan 15, 2024 2:51 PM UTC

I think my problem is with enabling CFG_LPM_SUPPORTED.

It doesn't seem to be supported by the client or router board, but I couldn't find any information about it.

Maybe someone can confirm or not?

Pierre