4 Replies Latest reply on Dec 11, 2017 10:10 AM by rich.soennichsen_1592346

    Updating Manufacturer Data in Advertised Packet is not Working

    rich.soennichsen_1592346

      I am using the code from the Dynamic Broadcaster project.  I have created Manufacturer bytes in both the advertised packet and in the scan packet.  I am not seeing them change...

       

      CyBle_GapUpdateAdvData is not returning an error.  I am not using low power modes.

       

      Thanks

       

      Rich

       

      void DynamicADVPayloadUpdate(void)

      {

         static uint32_t count = 0;

         

          if(CyBle_GetBleSsState() == CYBLE_BLESS_STATE_EVENT_CLOSE)

          {

              count++; /* Loop counter */

             

              /* Once the system enters Sleep/Deepsleep mode during advertisement, the source of wake-up is the next 

               * advertisement interval which has a wakeup interval of 1 advertisement (ADV) interval (100ms).

               * LOOP_DELAY * ADV interval is the interval after which ADV data is updated in this firmware.*/

             

              if(count >= LOOP_DELAY)

              {

                  /* Dynamic payload will be continuously updated */

                  advPayload[MANUFACTURER_SPECIFIC_DYNAMIC_DATA_INDEX] = dynamicPayload++;

                 

                  if(dynamicPayload == MAX_PAYLOAD_VALUE)

                  {

                      dynamicPayload = MIN_PAYLOAD_VALUE;

                  }

                 

                  count = 0;

                 

                  CyBle_GapUpdateAdvData(cyBle_discoveryModeInfo.advData, cyBle_discoveryModeInfo.scanRspData);

              }

          }

      }