Send manufacturer update data packets after wakeup

了解更多FAQsTutorials

10 posts / 0 new
Last post
Rajapurerohit
Offline
Last seen:6 months 1 week ago
加入:2017-04-20 09:17
Send manufacturer update data packets after wakeup

大家好,

我正在研究DA14583睡眠配置。

对于我的自定义代码开发,我使用了BLE_APP_PERITITAL SDK示例,并根据我的要求进行了必要的更改。没有睡眠配置和持续广告,我的功能是合理的。

我已经在扩展睡眠模式下配置了设备,并使用传感器引脚信号低中断唤醒。为此,我遵循BLE_APP_SLEEPMODE SDK示例以获取睡眠配置。

在广告期间,我在扩展睡眠模式下发送了设备。(即,在函数user_app_adv_start()中),并使用传感器引脚唤醒低检测并再次启动广告。

Details below,

1) advertising interval is 2sec.

2)#define app_param_update_request_to(50)

/* Advertising data update timer */
#define app_adv_data_update_to(50)

Requirement,

- 我必须连接到设备并分配一些设置。

- 我想将控制数据包发送到另一个设备(几乎我有50个我需要发送到另一个设备的数据包)。我正在使用更新制造商函数来执行此操作。

Before sleep mode incorporation in the code, I used continuous advertising of the device and there I am able to send all my packets with making slow advertising intervals.

But now as I have incorporated sleep and wake up call back using interrupt the logic changes. With the above details config, I tried to send data but only 1 packet is being sent to another device and that sticks for the advertising period. I am unable to other packets to the device so please help me how I can achieve this sending 50 packets when the device wakes up from sleep.

Please help me as early as possible.

谢谢并恭祝安康

Rohit R.

设备:
PM_Dialog
Offline
Last seen:15 hours 27 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

你的意思是50包?请澄清它并提供BLE嗅探器捕获,以便我们能够理解空中发生的事情。您是否可以检查设备是否已被遵循并提供SmartSnippets Toolbox的电源分布器的屏幕截图?

您提到才会在使用扩展睡眠模式时发生此问题。您是否使用任何外围块(I2C,SPI EC)?如果是,则所有外围域都会在任何睡眠模式中关闭。

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:6 months 1 week ago
加入:2017-04-20 09:17
嗨pm_dialog,

嗨pm_dialog,

50个数据包是指我向另一个设备发送一个数据包,该数据包包含其他设备的BDA,而它的控制值除此以外。设备]。

And, Yes, I have peripheral block using I2C, timer and I know very well that peripheral does not work in sleep, I know everything I have managed that part.

我告诉睡眠配置我在我的自定义代码中引用了BLE_APP_SLEEPMODE示例,没有问题。

我的问题是从睡眠唤醒后如何将数据包发送到另一个设备?当我连接到设备时,如何保持清醒?(意思是我想要当设备POR完成时应该保持清醒一段时间并睡觉,除非直到有中断) -I am waiting for this response.

Thanks for understanding

Rohit R.

Rajapurerohit
Offline
Last seen:6 months 1 week ago
加入:2017-04-20 09:17
嗨pm_dialog,

嗨pm_dialog,

Any update regarding the previous question?

谢谢并恭祝安康

Rohit R.

PM_Dialog
Offline
Last seen:15 hours 27 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

>>>我的问题是从睡眠唤醒后如何将数据包发送到另一个设备?

你能澄清你想要完成的事情吗?它是可连接的,还是不可连接的应用程序?您可以将数据放入广告或扫描响应数据,或通过向对等设备的通知/指示发送它们。

>>>And How can stay awake when I am connecting to a device?

如果您正在使用任何configuratio睡觉n setup, the device will wake up automatically via the BLE timer between connection intervals. If no sleep mode is used, the device will always wake up.

>>>means I want when device POR did it should stay awake for some time and go to sleep unless until there is interrupt

When the chip is advertising or when it is connected?

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:6 months 1 week ago
加入:2017-04-20 09:17
嗨pm_dialog,

嗨pm_dialog,

Thanks for the response,

>> Could you please clarify what you are trying to accomplish? Is it connectable, or not connectable application? You can place data into the advertising or scan response data, or send them through notifications/indication to the peer device.

- 我的设备是一种基于传感器的光控制装置,该装置是电池供电,应使用最小可能的功耗。我的设备应该是连接基础,它应该通过广告数据包发送数据。我想通过一个特征连接和分配一些设置,并使用mnf_data_update()将数据(发送数据包发送到另一个设备)。

>>如果您使用的是任何睡眠配置设置,设备将通过连接间隔之间的BLE定时器自动唤醒。如果没有使用睡眠模式,则设备将始终唤醒。

- I referred ble_app_sleepmode() example for sleep configuration. During advertising user_app_adv_start() function called arch_set_extended_sleep(). And wakeup using sensor pin signal low interrupt detection and start advertising

>>>意味着我想要当设备POR完成时应该保持清醒一段时间并睡觉,除非在芯片广告或连接时存在中断,否则

- when POR is done stay awake for a few seconds and then go to sleep. If the user tries to connect then stay awake and remain is wake up state until and unless device disconnects from App. And also it should wakeup on interrupt (sensor pin signal low interrupt detection and start advertising) send all packets and once packets over again go back to sleep.

谢谢并恭祝安康

Rohit R.

Rajapurerohit
Offline
Last seen:6 months 1 week ago
加入:2017-04-20 09:17
嗨pm_dialog,

嗨pm_dialog,

Any update to my previous question.

谢谢并恭祝安康

Rohit R.

PM_Dialog
Offline
Last seen:15 hours 27 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

在所有SDK示例中,设备将默认启动adverting。如果芯片在睡眠或活动模式下运行,则由用户取决于用户。如果在睡眠模式下配置,则它将在广告或连接间隔之间睡眠,并且它将通过BLE定时器唤醒。

你提到说:当Por完成时,保持醒来几秒钟,然后去睡觉。

Do you mean that the device will start advertising for a while without sleeping? If yes, you should change the app_default_sleep_mode variable. When it goes into sleep, do you mean that you want to stop advertising and put in in extended sleep mode?

Thanks, PM_Dialog

Rajapurerohit
Offline
Last seen:6 months 1 week ago
加入:2017-04-20 09:17
嗨pm_dialog,

嗨pm_dialog,

请首先尝试了解我的申请,然后您可以更好地帮助我,

My Application for my Device: I want a BLE peripheral based application with sleep mode enabled. My device is a kind of event-based Sensor Host where the sensor is programmed in such a way that it interrupts (this interrupt is nothing but event) the dialog MCU whenever there is some data available for MCU.

请注意,传感器是基于I2C的。

Whenever the MCU is interrupted it should wake up from the sleep and check any data on I2C from the sensor. If yes, then send controlling packets through advertising.

这些广告数据包由范围(网络)中的节点收集,并分别反应,我还必须向用户提供用户具有改变传感器参数/读取设备状态的连接设施,这是通过交换数据来完成的在连接模式下的特征。

Now as I told earlier, My server host is battery operated, which has to work with the least possible power consumption so I am using sleep mode. Also, I know that in sleep all peripheral shut down.

现在,对于此应用程序设计,我提到了“BLE_APP_SLEEPMODE”示例进行睡眠和唤醒中断。我的应用程序我在广告和唤醒中,在中断时将设备设置在睡眠状态。唤醒后,我再次启用我的外围设备(我在项目中使用的i2c和timer)。

In short, my device should work as mentioned below,

1)在几秒钟之后(例15SEC或30SEC)的电源UPSTART通告后,然后停止广告并在睡眠模式下发送设备。

2)Now device only wakes up when there is interrupt from the sensor,

3) If MCU is interrupted, wake up, then check I2C data and start advertising again for a few seconds (15 to 30 secs). here while advertising if I2C data is valid update the user bytes in the advertising packet.

4)现在用户可以随时随地连接到设备。此外,如果建立连接,那么设备应保留在唤醒状态,直至断开连接。

5)如果没有连接请求,那么睡眠(延长睡眠意味着停止广告)

6)If there no interrupt then the device should always in sleep (no advertise).

However, I am facing the below-mentioned issues so I request you to please help me to diagnose these issues and fix them.

1)当我在广告期间在扩展睡眠模式下设置设备时(如我使用DA14583),我无法连接到设备。
- 为此,我的问题是如何获得最长时间才能将我的应用连接到设备?

2)唤醒后,我说我想在广告字符串中发送控制节点报文。我能够只发送1个数据包但不是所有数据包(因为我在早期帖子中解释了我的数据包)
- For this, my question is, after wakeup how I can send my all node packets in one shot and after completion of the packet device should go to extended sleep again?

谢谢并恭祝安康

Rohit R.

PM_Dialog
Offline
Last seen:15 hours 27 min ago
Staff
加入:2018-02-08 11:03
Hi Rohit,

Hi Rohit,

  1. Can you detect the device over the air? I would recommend using Power Profiler from the SmartSnippets toolbox in order to check if it is advertising.
  2. 您是否意味着您希望将数据放入广告字符串中,或​​将数据发送到对等设备的通知?您能否分享一个嗅探器日志,以了解在空中发生的事情?应该通过ble发送数据量是多少?

Thanks, PM_Dialog