You are here

Project #009: Dynamic Broadcaster - Changing Advertising Packets | Cypress Semiconductor

Project #009: Dynamic Broadcaster - Changing Advertising Packets

Today's project is a demonstration of dynamically changing Advertising Packets on a GAP Broadcaster.

Recall, in Project #008, we learn why a Brodcaster-only application can be benificial for certain use-cases like continuous Advertising to multiple nearyby devices (e.g. an iBeacon)

Project #009 implements a GAP Broadcaster that constantly updates the Mfg. Specific Data string in its Advertisement Packets. The time interval at which these Advertising Packets are updated are based on a firmware parameter called "LOOP_DELAY". This causes nearby GAP Central devices (like mobile phones) to receive new and updated data from the Broadcaster at this defined time interval.

This project also enables the use of low-power modes by switching the device into its 60-nA Hibernate mode after a 1-hour timeout, allowing you to maximize battery life.

 

You can download this PSoC Creator project and a detailed PDF from GitHub here: https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day009_Dynamic_Broadcaster

 

     

Comments

isyq's picture

It doesn't work in Creator 3.1SP1. Please check it.

Gagan Luthra's picture

@tianwanggaidihu
thanks for the note! yes, we'll check with Creator 3.1 SP1 and update the project in GitHub to resolve the issue.

shari765's picture

Thanks for the update @gagan - it's now working for me. However, is there a way to have CySmart on the PC continuously display the changes of that data value? Currently I have to stop and start the scan (scanning the devices) to see the updated data value.

Pushek Madaan's picture

Shari - No, CySmart doesn't continuously updates the value of the advertising parameters. I'll make this suggestion to our development team.

shari765's picture

Thanks!

shari765's picture

Thanks!

shari765's picture

Also, I'm not sure if this will get to you guys, but if it does --> I keep getting this error in the comment section area after submitting a comment:

We're sorry, we couldn't find the page you are looking for.

The page might have been removed, had its URL changed or is temporarily unavailable. Use the links below to locate the page you wanted, or use our search bar at the top to find what you are looking for.

If you are sure the URL is a valid URL and may be a broken link, please contact us and we'll take a look right away.

Not sure if it's due to my browser (tried it in Chrome and Firefox so I'm doubting it) or an actual issue with the comment section here in this Project or for the blog. I had that problem when trying to post my previous comment/question and didn't think it went through after always getting that error, so I was pretty surprised when I revisited this page to check something and saw it here :) So something else worth looking into as well.

Pushek Madaan's picture

Shari - I never faced this issue, may be because I have the Cypress account. Let me try with my other account.

BTW, all the comments posted comes to the blog owner for approval. It appears once the owner approves the comment.

Ser60's picture

The app did not update the payload (EZ-BLE, Stack v2.30) until I replaced line 221 in main() with "if(CyBle_GetBleSsState() == CYBLE_BLESS_STATE_EVENT_CLOSE)".

Another question: for broadcasting short dynamic data (i.e. the ambient temperature) it would be nice to put it as a part of the device name. In this case the device name could be like "Garage: 55F" - that is, the place where the sensor is mounted followed by the temperature. This way any BLE scanner that displays discovered BLE devices by name can display the temperature right away without a need to explore the ADV data. So, no any special app would be needed and no extra click/taps. However, it looks that after the BLE device is initialized, any name change with BLE APIs is ignored. So, is it possible to change the device name dynamically?

Fabrizio Restori's picture

Let me see if I've understood. The dynamic broadcaster send a messages that change periodically (I can see with the dongle, but is not easy, because the display doesn't refresh and the data are in hex).
But, where is stored the data that I send? What is Dynamic Broadcaster hex file, included on example, and what it does?

 

Thanks, Fabrizio

sean.mahnken's picture

I can see that this example shows you how to change your data payload dynamically, but it always contains the same number of data bytes.  How would one change this if the number of data bytes changes dynamically?

jordanss123 jordanss123's picture

replica yeezy boost 350 Thanks for your submission. I also think that laptop computers are becoming more and more popular these days, and now will often be the only sort of computer used in a household.

r143011_2835121's picture

Good to read about the details of the dynamic broadcaster feature in the latest PSOC device. This is carried out by a GAP Broadcaster that constantly updates the Mfg. Specific Data string in its Advertisement Packets. Thanks for sharing these details regarding the same.  

http://bestwholesaletablets.com
 

taylorshaw151_2687531's picture

The site has been providing a lot of such interesting topics regarding PSOC 6 Software Enablement. The detailed instructions along with the image helped to understand the concept. The codes offered here are very helpful in making the project all by myself. https://joyjolt.com

Muneer Ahmed's picture

You completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog. preschool in Owensboro

asadalikhatrint_2946251's picture

Powerdirector TemplateZone is a place where you will find a variety of free graphic sources for your video projects. powerdirector 15 theme designer templates

Muneer Ahmed's picture

Im no master, however I trust you simply made a fantastic point. You unquestionably completely comprehend what youre talking about, and I can really get behind that. trade here

Muneer Ahmed's picture

Good website! I truly love how it is easy on my eyes it is. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your RSS which may do the trick? Have a great day! click to know

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.