When the device boots, it will start advertising. The default sleep mode is set to extended sleep ( see app_default_sleep_mode in user_config.h ) , so this meant that the DA14531 sleeps between the adverting or connection intervals and will wake up automatically via the BLE timer.
在一个预定义的时间(见.advertise_period item in user_default_hnd_conf is user_config.h) , it will stop advertising and go to the permanent sleep mope. The app_advertise_complete() will be triggered once the advertisement has been stopped. Then the device can wakeup via an external interrupt in the WKAE-UP controller – see app_button_enable(). Specifically, the GPIO_BUTTON_PORT / _PIN (P0_11) is configured as a wake up pin with low polarity.
嗨3hl3rt,
谢谢你的问题在线。
您可以使用DA1453A和SDK6开始的最佳项目是SDK的Prox_reporter示例。
这也是包含基于Eclipse项目的唯一示例。请参阅下面您如何使用SmartSnippet Studio编译,运行和调试它的方式:
https://support.dialog-seminile.com/forums/post/dialog-smartbond-bluetooth-low-energy-%2%80%93-software/wake-hw-interrupt- whigh-example.
When the device boots, it will start advertising. The default sleep mode is set to extended sleep ( see app_default_sleep_mode in user_config.h ) , so this meant that the DA14531 sleeps between the adverting or connection intervals and will wake up automatically via the BLE timer.
在一个预定义的时间(见.advertise_period item in user_default_hnd_conf is user_config.h) , it will stop advertising and go to the permanent sleep mope. The app_advertise_complete() will be triggered once the advertisement has been stopped. Then the device can wakeup via an external interrupt in the WKAE-UP controller – see app_button_enable(). Specifically, the GPIO_BUTTON_PORT / _PIN (P0_11) is configured as a wake up pin with low polarity.
如果您使用的是PRO-DK,则此引脚映射到SW2,因此,一旦设备停止广告,您就可以唤醒它并通过按SW2按钮再次启动广告。
当设备广告时,它是可连接的,因此您可以使用BLE通用移动应用程序来连接。
我会推荐使用SDK6(HTML)入门和DA14531睡眠模式教程(HTML)教程也!
谢谢,PM_DIALOG.
非常感谢您的这一点 - 一个问题:
之后“请参阅下面的方式如何编译,运行和调试它与smartsnippets studio:”您链接到这个论坛帖子 - 这是为了指出其他地方?
嗨3hl3rt,
我的道歉 - 这是一个错误的副本粘贴。您可以在下面找到文件:
http://lpccs-docs.dialog-semicondiondum/tutorial_sdk6/eclipse_gcc.html.
谢谢,PM_DIALOG.
感谢您的答案,我正在取得良好的进展 - 代码符合(Prox_reporter),我可以更改设备名称等,更改睡眠时机,按钮按下按钮等。
遵循DA145xx_Advertising_tutorial,我试图弄清楚广告数据如何工作。
“user_advertise_data”和“user_advertise_scan_response_data”之间的差异是什么 - 他们的用途是什么?
I am experimenting with the code below, but I am unsure where I can expect this data to end up?
I am testing with the LightBlue BLE app, the attached pictures shows the output from the app.
嗨3hl3rt,
广告字符串和扫描响应数据应遵循特定格式。制造商特定数据是开发人员可以包含自己的数据并在设备广告时填充它们的标志。要将自定义数据添加到广告字符串中,格式应该像 。中央发送扫描请求以读取扫描响应数据。
找到以下示例:
我在我身边使用了BLE Scanner应用程序。在特定的设备名称中,如果单击原始数据,您将看到man_data_1和man_data_2。
在附加的屏幕截图中,我假设您处于已连接状态,那么您所看到的是配置文件,服务等。
如果您有任何后续问题,请提出一个新的论坛线程。
谢谢,PM_DIALOG.