Announcements
Community Announcement : Welcome to the NEW Cypress Developer Community.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

We have a project where we'd like our BLE advertising device to only be connectable under certain circumstances (i.e. external stimuli).  Something along the lines of "push this button, and the device will be connectable for 30 seconds" would be perfect.  I'm sure there's an example of this someplace, but I'm having a difficult time identifying it.  Could anyone point me towards one?

0 Likes
1 Solution
SayaniS_66
Moderator
Moderator

Hi,

To make the peripheral device advertise for 30sec, you can change the timeout value in the BLE component customiser to 30 secs. Initially, the device will be in disconnected state. On switch press, an interrupt will be triggered which will make the peripheral device start connectable advertisement for 30 secs. If the device is in connected state and switch is pressed, then the device will be disconnected first and then start connectable advertisement again for 30 secs.

I am attaching the project for your reference.

-Sayani.

View solution in original post

0 Likes
1 Reply
SayaniS_66
Moderator
Moderator

Hi,

To make the peripheral device advertise for 30sec, you can change the timeout value in the BLE component customiser to 30 secs. Initially, the device will be in disconnected state. On switch press, an interrupt will be triggered which will make the peripheral device start connectable advertisement for 30 secs. If the device is in connected state and switch is pressed, then the device will be disconnected first and then start connectable advertisement again for 30 secs.

I am attaching the project for your reference.

-Sayani.

View solution in original post

0 Likes