从findeisen于sleep mode and start adv

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
z0806020433
Offline
Last seen:11 months 3 weeks ago
加入:2016-05-05 13:32
从findeisen于sleep mode and start adv

hi!
my project is based on SDK 3.0.10. My device is powered on and starts advertising for about 10s, if there is no any connection, the device will stop adv, then wait for an external wakeup by a button, so my device will start adv again.
How should i do to get above function? Is there some examples to ref ?
thanks!

Keywords:
Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi z0806020433,

Hi z0806020433,

Firstly i would recommend you to move to the latest version of the SDK which is 5.0.4, so has more api's and much more examples in order to check, for example the exact functionallity is implemented on ble_app_sleepmode. If you dont want to move to next SDK the procedure you should follow is to start a timer as soon as you start advertising, in order to count the amount of time that you will be advertising. In the callback of the timer you should just stop advertising by invoking the GAPM_CANCEL_CMD command and set up the wake up controller in the when you get the callback that the advertising has finished. Also as i ve mentioned for this exact case there is an implementation in ble_app_sleepmode in SDK 5.0.4.

Thanks MT_dialog

z0806020433
Offline
Last seen:11 months 3 weeks ago
加入:2016-05-05 13:32
Thanks very much!

Thanks very much!

Because the project is developed a long time ago, i just maintain it. My new projects are all based on SDK 5.
I have referenced the project( ble_app_sleepmode) in SDK 5.0.4 to modify the project(based on SDK 3), and run Successfully.