1 Reply Latest reply on Jul 31, 2016 6:34 AM by cjoachim_1597296

    Change the BLE advertising rate

    songfq24_1694131

      Hi,

         

      My project is based on the "AltBeacon" example, and it use broadcasting mode for the BLE component. 

         

      However, I the data broadcasting rate is about 100ms. I want to slow it down to, like 1s. 

         

      I tried a few things:

         

      1. I tried to add a Cydelay() in the main while loop, but it does not help.

         

      2. In the "BLE interface.c" file, I modified the  CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST) to  CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_SLOW), and I can not change the data rate either.

         

      Is there anyone know that if is there a method to slow down the advertising rate for broadcasting mode?

         

      Or, do we have to use the general profile that we can go to the deepsleep mode to save the energy?

         

      Thanks!

         

       

         

      Song

        • 1. Re: Change the BLE advertising rate
          cjoachim_1597296

          cyBle_discoveryModeInfo.advParam->advIntvMin =
              /* your advertise interval m, minimal. seconds are m * 0.000625 s */;
          cyBle_discoveryModeInfo.advParam->advIntvMax =

              /* your advertise interval m, maximal. seconds are m * 0.000625 s */;
          cyBle_discoveryModeInfo.discMode = CYBLE_GAPP_GEN_DISC_MODE;

             

          // you can set a lot of other parameters, like advertising data,
          // advertising timeout, etc. see API documentation for
          // CYBLE_GAPP_DISC_MODE_INFO_T

             

          CYBLE_API_RESULT_T res = CyBle_GappEnterDiscoveryMode( &cyBle_discoveryModeInfo );

             

           

             

          Your call to CyBle_GappStartAdvertisement() should instead be replaced with the code above.