Skip to main content
Associate III
May 8, 2025
Solved

How to start and stop advertising individually with BLE_p2pServer example?

  • May 8, 2025
  • 1 reply
  • 377 views

Hi,

i am using NUCLEO-WBA55 with the BLE_p2pServer example from firmware package.

Here for example in file app_ble.c is a define statement

#define ADV_TIMEOUT_MS (60 * 1000)

and this ends the advertising after 60 seconds.

However, I would like to start and stop the advertising individually with a command, for example.

Can someone explain to me how I can do this?

Best answer by STTwo-32

Hello @ledi7 

To start the advertising, you can use the "ACI_GAP_SET_DISCOVERABLE " command. And to stop it, you can use the "ACI_GAP_SET_NON_DISCOVERABLE" command. More details available on the paragraphs 2.4.1 and 2.4.3 of the AN5270 - Rev 30.

Best Regards.

STTwo-32

 

1 reply

STTwo-32
STTwo-32Best answer
Technical Moderator
May 8, 2025

Hello @ledi7 

To start the advertising, you can use the "ACI_GAP_SET_DISCOVERABLE " command. And to stop it, you can use the "ACI_GAP_SET_NON_DISCOVERABLE" command. More details available on the paragraphs 2.4.1 and 2.4.3 of the AN5270 - Rev 30.

Best Regards.

STTwo-32