Bonding and advertising data in dialog 14583

Learn MoreFAQsTutorials

6 posts / 0 new
Last post
karanshah28
Offline
Last seen:11 months 3 weeks ago
加入:2018-07-14 11:10
Bonding and advertising data in dialog 14583

Hi, I am a newbie and creating an android app which pairs and bonds with dialog 14583. I have a button on the PCB that is pressed. Once the button is pressed, android app needs to listen to the change. Is it possible to achieve it by advertising data? Can a device advertise once its bonded and connected?

Appreciate the help.

Device:
PM_Dialog
Offline
Last seen:2 days 12 hours ago
工作人员
加入:2018-02-08 11:03
Hi karanshah28,

Hi karanshah28,

请检查SDK的ble\u app\u睡眠模式示例。此示例演示如何使用唤醒控制器来设置按钮中断。如果在项目中使用延长睡眠,则应使用唤醒控制器检测按钮中断,因为设备在广告和连接间隔之间进入睡眠状态。我建议您检查user\u periph\u setup.c/h以获得适当的按钮配置。你要做的是,既然你按下了按钮,你应该更新广告字符串。所以,请查看SDK的ble\u app\u barebone示例。此示例在APP\u ADV\u data\u update\u到(10)秒后计时器过期时更新特定于制造商的数据,然后将add manufacturer specific data动态添加到广告字符串中。请按照以下步骤操作,以便按按钮更新广告字符串。请注意,我在ble\u app\u barebone示例中进行了演示。

  1. Do the button configurations into user_periph_setup.c/h files
  2. Comment out the mnf_data_update() function from the user_app_adv_start() of the user_bare_bone.c file
  3. Add static thevoid app_button_enable(void);into user_bare_bone.c header file.
  4. 添加附加的代码段into user_bare_bone.c
  5. Call theapp_button_enable()进入用户\u app \u adv \u start()和用户\u app \u init()。

After the steps below, you will see the manufacturer data of the advertising string updated every time you pressing the button after 10 seconds. If you want to reduce the advertising data update timer (APP_ADV_DATA_UPDATE_TO), please configure it with the value that you prefer. It is highly recommended to read theUM-B-050 : DA1458x Software Developers Guide (SDK5)user manual from our support page for getting more information about the ble_app_barebone example (pillar 1) and of the SDK.

Regarding your second question, do you meant that you want to connect the DA1453 with a BLE mobile application, and continue advising since it is connected? Did I understand correctly? If you mean that, when the device get connected, the user_app_connection() callback function will be trigger, so please call the user_app_adv_start() inside it to start advertising again.

Thanks, PM_Dialog

karanshah28
Offline
Last seen:11 months 3 weeks ago
加入:2018-07-14 11:10
Thank you so much for the

Thank you so much for the response. I will check and update the code and let you know.

Related to my second question what i meant is, I am pairing and bonding the device with the mobile application.Now once its bonded, can i advertise the data to the bonded device?
For example, on first time button press, my circuit wakes up and advertises some data to perform the operation and mobile app reacts to it. On second time of button press I want to advertise different data to the bonded device. On first time button press for example, I will advertise "ABCD". Now circuit is still waked up and I am again pressing the button. On second time I want to advertise "PQRS". On third time button press again "ABCD" and on fourth time button press "PQRS".

Is this possible to achieve? This question is in particular if the mobile device is paired and bonded. For non-paired device i am sure I achieve this functionality.

Appreciate your help.

Best Regards,
Karan

PM_Dialog
Offline
Last seen:2 days 12 hours ago
工作人员
加入:2018-02-08 11:03
Hi karanshah28,

Hi karanshah28,

Sorry but I am a little bit confused with what you are trying to accomplish. The advertising procedure is a different procedure from the pairing and bonding. Both pairing and ponding procedures concern the security functionality. Could you please clarify how the mobile application reacts into the DA14583? As I have already mentioned in my previous post, since you are connected to the mobile application, you want to continue advertising and change the advertising data with pressing a button? Please check the tutorial 1 & 5 from the Tutorial tab of our support page in order to get more information about the advertising and security procedures of DA1458x. In case you are newbie with our products and SDK, I strongly suggest you to read the tutorials first.

Thanks, PM_Dialog

Sparta
Offline
Last seen:10 months 4 days ago
加入:2016-03-14 14:22
Hello, Dialog experts. I have

Hello, Dialog experts. I have trouble with advertising data. It works around 4 minutes and stops. I use ble_peripherial example.

PM_Dialog
Offline
Last seen:2 days 12 hours ago
工作人员
加入:2018-02-08 11:03
Hi Sparta,

Hi Sparta,

Apologies, but your question is little bit generic, so could you please provide me additional inputs on your issue? What do you mean that your device stops? Stops advertising? If you mean that, the most possible reason is that your firmware gets stuck somewhere, due to the WDAG expiration or an NMI hit or you get any assertion, so it would be very helpful to run it in debug mode. Also, could you please let me know if you have done any modifications in the ble_app_beripheral project of the SDK?

Thanks, PM_Dialog