You are here

Broadcast Advertising While in a Connection? | Cypress Semiconductor

Broadcast Advertising While in a Connection?

Summary: 1 Reply, Latest post by BMAH on 19 Oct 2015 12:19 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
Pat Dolan's picture
24 posts

After connecting a peripheral to a central I want the peripheral to continue advertising in non-connectable mode while still maintaining the connection with the one central.  My strategy thus far has been to change the advertising type to broadcast and starting advertising again after the stack sends a connected message.  My code for the event handler is below.  The program compiles and does not crash.  But once in connection with my smart phone (the central) I don't see any advertising on my pc running CySmart1.1.  When I break the connection with the central the peripheral starts advertising again just fine in connectable mode.  Any ideas how to accomplish this?

void eventHandler( uint32 eventCode, void *eventParam )


switch( eventCode )




cyBle_discoveryModeInfo.discMode = CYBLE_GAPP_GEN_DISC_MODE;

CyBle_GappStartAdvertisement( CYBLE_ADVERTISING_FAST );


cyBle_discoveryModeInfo.discMode = CYBLE_GAPP_NONE_DISC_BROADCAST_MODE;

CyBle_GappStartAdvertisement( CYBLE_ADVERTISING_FAST );




BMAH's picture
Cypress Employee
189 posts


Can you please have a look at the below project:

Project #007: BLE Peripheral and Broadcaster - Changing GAP Roles

Log in to post new comments.