1 Reply Latest reply on Jul 23, 2019 6:52 AM by GeonaP_26

    Dynamically change advertising type

    StLu_2280906

      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.

        • 1. Re: Dynamically change advertising type
          GeonaP_26

          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.