You are here

Updating Advertising Data | Cypress Semiconductor

Updating Advertising Data

Summary: 0 Replies, Latest post by rich.soennichsen_1592346 on 07 Dec 2017 11:04 AM PST
Verified Answers: 0
Log in to post new comments.
rich.soennichsen_1592346's picture
49 posts

I am attempting to do "live" updates of the advertising data.  I am using code from the Dynamic Broadcaster project:

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);


does this update manufacturer data in the advertising packet or the scan packet?  I have created both but do not see them change.






Log in to post new comments.