You are here

Switch between broadcaster and peripheral | Cypress Semiconductor

Switch between broadcaster and peripheral

Summary: 1 Reply, Latest post by Madhu Sudhan on 26 Jun 2016 03:03 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.
mroi_1551101's picture
3 posts

Hi there,

In a project in which it is required the embedded BLE device broadcasts permanently (the iBeacon way) when in "regular" mode and records some external sensor events. In case such event occurs:

1 - the broadcast message changes (the iBeacon minor in my case) to "I have data" mode

2 - the device switches between broadcaster and peripheral modes (say 20-30 seconds in each mode) so that another device can connect and retrieve the data and acknowledge them

It is in fact very close from Paul Donnely's topic except for the continuous switch as this project waits for acknowledge before switching back to broadcaster role.

The Day 007 peripheral and broadcaster is a good starting point but does not handle the switch aspect the way my project is expected to work.

I could not find the proper way to switch between those modes a regular time basis, for the moment the best clue I got is to decide what kind of role to start in the CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP event of my custom callback, having some WDT timer mechanism giving the time limit by stopping the current BLE advertisement or broadcast mode.

My issues are :

a - I can not determine the frequency of broadcast packets (the specifications require 2 seconds between between two packets)

b - I have no clue of the latency between stopping a mode (broadcaster or peripheral) and the beginning of the other (4 to 5 seconds would be OK)

c - Connection time in peripheral mode is very slow (about 4 seconds)

Is there some documentation and/or sample I missed that would help fixing that ?

Thanks a lot for your help,


mady's picture
Cypress Employee
955 posts


a. The rate at which the packets are broadcasted are also related to your advertisement interval.

b. 4 to 5 seconds is more than enough.

c. The faster connection can be established if you reduce your advertisement intervals.

Please create a Tech Support case with us so that we cna analyze your issues in detail.


- Madhu Sudhan

Log in to post new comments.