send single advertising packet on button press

3 posts / 0 new
Last post
hssmltd
Offline
Last seen:4 months 3 weeks ago
加入:2015-09-05 08:29
send single advertising packet on button press

Hi,
I'm playing with beacon_3.40.4 reference project.
I'm trying to make it send just one advertising packed when button is pressed instead of continiously advertising.
I configured button and callback functions.
Please help me with following questions:
1.Which line to remove to avoid advertising after startup?
2. which function is used to modify advertising data
3. which function to call in button callback to start advertising - i tried app_adv_start() but it is now starting??

Thank you!

Device:
MT_dialog
Offline
Last seen:6 days 6 hours ago
圣aff
加入:2015-06-08 11:34
Hi hssmltd,

Hi hssmltd,

1. Remove the app_adv_start located in function app_db_init_complete_func().

2. There is no implemented function for changing advertising data. If you configure your app to use dynamic data (CFG_DYNAMIC_BEACON_DATA) then the application will change the major and the minor fields of the advertising string with the values from P01 channel. There are a lot of posts in the forum indicating how to change the data in the advertising string dynamically please check other forum posts.

3. To start advertising you can call app_adv_start(), check with a ble application or with smart snippets to confirm that your device is advertising.

Thanks MT_dialog

hssmltd
Offline
Last seen:4 months 3 weeks ago
加入:2015-09-05 08:29
它与你的帮助工作正常。

它与你的帮助工作正常。谢谢! !

Topic locked