This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352R: Updating BLE Scan Response Data Prevents BLE Beacons from Being Sent

Part Number: CC1352R

Hello,

I am developing a product based on the CC1352R using the 4.40.04.04 SDK. This design needs to send two legacy advertisement beacons simultaneously, one of which may be updated each measurement interval.

I have encountered strange behavior where one of the beacons may not be transmitted, depending on how the advertisement interval aligns with the moment at which the scan response data is updated.

Design:

With the above configuration, Beacon #1 is not transmitted (but Beacon #2 is). I can "fix" the problem and get Beacon #1 to transmit in a couple ways:

  • Reduce the interval for Beacon #1 to 950ms
  • Remove calls to GapAdv_prepareLoadByBuffer and GapAdv_loadByBuffer (update the scan response data blindly)

This leads me to believe that updating the scan response data in sync with the advertisement interval is causing problems. Hypothesis:

  1. Task #2 calls GapAdv_prepareLoadByBuffer just prior to the advertisement interval for Beacon #1, which prevents Beacon #1 from being sent in that interval.
  2. Task #2 calls GapAdv_loadByBuffer and an advertisement is scheduled for the next interval (1 second later)
  3. Task #2 sleeps for 1 second
  4. Repeat

Please tell me: How can I update the scan response data periodically without preventing beacons from being transmitted?

---- 

I have managed to reproduce this issue using the latest Simple Broadcaster example from the CC13xx 6.20.0.29 SDK. I made minor changes to main.c, simple_broadcaster.c, and simple_broadcaster.syscfg:

simple-broadcaster-modified-files.zip

If you copy the modified files into your project, you should find that your device sends only one beacon.
If you disable updates to the scan response data by commenting out Task_create(mainTaskFxn, &mainTaskParams, NULL); in main.c, both beacons will be transmitted.

What am I doing wrong?