Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

User84021
Level 1
Level 1
Welcome! First question asked First reply posted

Hello,

I am trying to develop a PSoC 4 BLE application where I will be dynamically changing the advertising type between connectable and unconnectable advertising.

Is there an API to achieve this functionality? Also, can I just call that API to change the advertising type between advertising events? Or do I need to restart the BLE stack for that change to take affect?

Thank you.

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

We do not have an API to update the advertisement type parameter. User can stop advertisement, update advType and re-start advertisement for this purpose.

  • You can stop the advertisement using CyBle_GappStopAdvertisement() API. This will exit from the discovery mode.
  • Exiting the discovery mode will generate CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP event. Use a flag to confirm whether this event is generated after the CyBle_GappStopAdvertisement() call.
  • If yes, update the advType and enter discovery mode using CyBle_GappEnterDiscoveryMode(&cyBle_discoveryModeInfo). You can also use CyBle_GappStartAdvertisement(parameter) to restart advertisement.

View solution in original post

0 Likes
1 Reply
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

We do not have an API to update the advertisement type parameter. User can stop advertisement, update advType and re-start advertisement for this purpose.

  • You can stop the advertisement using CyBle_GappStopAdvertisement() API. This will exit from the discovery mode.
  • Exiting the discovery mode will generate CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP event. Use a flag to confirm whether this event is generated after the CyBle_GappStopAdvertisement() call.
  • If yes, update the advType and enter discovery mode using CyBle_GappEnterDiscoveryMode(&cyBle_discoveryModeInfo). You can also use CyBle_GappStartAdvertisement(parameter) to restart advertisement.
0 Likes