start and stop Advertising

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

     i am currently working on the project to send the data to mobile and its working fine .i want to send the data every 5 minutes,  but the

problem is when i scan my mobile the ble device not showing after 5 minutes.so,i want to advertise my ble after sending of my data pavket to mobile

is there any APIs to start the advertisement of ble when i required.

please help me to rslove the issue

Thanks in adavnce

0 Likes
1 Solution
Anonymous
Not applicable

Hello,

You can use the following API call to start advertising:

CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);

Note that the BLE Component must be initialized.

Regards,

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

Hello,

You can use the following API call to start advertising:

CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);

Note that the BLE Component must be initialized.

Regards,

0 Likes
Anonymous
Not applicable

Thanks for your reply sir.

can i stop the advertisement when the ble conneceted to the device,.

Thanks in advance.

0 Likes
Anonymous
Not applicable

That should happen automatically when you connect to it.

Anonymous
Not applicable

Keep in mind that there is both active and passive scanning, and active scanning will be faster/more responsive.

Also, you can adjust the interval between advertisement packets in the BLE component (topdesign.cysch), and programmatically when you start advertisement (using the parameters passed to the API)