SOS: what reason does DA14580 disconnect while being interrogated, but advertising works well

15个帖子/ 0新
Last post
Alex Luo
Offline
Last seen:1年3个月前
专家
Joined:2014-02-28 19:16
SOS: what reason does DA14580 disconnect while being interrogated, but advertising works well

Dear Dialog,

I would like to know what reason why DA14580 disconnected while being interrogated. Any condition or trigger for this case occurring?

我的代码基于Sample128,大部分时间都适用于很好。但有时会发生这个问题 - DA14580无法通过我的应用连接,并且它报告了“在被询问时断开连接。”通过浅蓝色工具。同时,广告效果很好 - 广告数据通过传感器检测动态地改变。

If this case occurs, DA14580 never be connected all the time. The only way to let it work is "power-down reset". After reset, it works well. The problem does rarely happen, and not easy to be reproduced.

Is it caused by calling disconnecting function? I didn't find it from my code, may be somewhere or timing issue? So far, I can't find any clue for it. Please help!

谢谢!

关键词:
VesaN
Offline
Last seen:5年6个月前
格鲁鲁 Master
Joined:2014-06-26 08:49
Hello Alex Luo,

Hello Alex Luo,

对我来说听起来可能是一个硬件问题/ XTAL校准问题。我有类似的问题。你用自己的硬件吗?

Alex Luo
Offline
Last seen:1年3个月前
专家
Joined:2014-02-28 19:16
Thanks Vesa,

Thanks Vesa,

Yes, I used my own hardware. The issue does rarely happen which is fetal issue for my application.

我们使用了应用程序来跟踪连接,它看起来立即连接DA14580后。我在app_connection_func()中添加了一个LED指示灯,并找到了当问题发生时app_env.conidx == gap_invilad_conidx的LED指示灯,但我不确定每次询问都会发生这种点。那么,我想知道时间有什么问题吗?如果是这样,为什么出现问题,直到电源关闭重置直到电源?!
By the way, I used RC oscillator for 32.768KHz, not Xtal. I also used to functions for timer: app_sample128_timer_handler() (I set timer for 200ms, 500ms and 2s for applications), and app_rtc_timer_handler() (for 1s fixed timer). I'm not sure if there is any conflict or with other timers in stack.

顺便说一下,代码对大多数时候工作非常好,但有时这个问题发生了 - 我没有找到问题所在。希望你能给我更多的线索。

谢谢,

VesaN
Offline
Last seen:5年6个月前
格鲁鲁 Master
Joined:2014-06-26 08:49
你好亚历克斯,

你好亚历克斯,

Read the section 7. carefully

如果它没有准确地校准,您可能会遇到奇怪的行为

谢谢!

Alex Luo
Offline
Last seen:1年3个月前
专家
Joined:2014-02-28 19:16
Hello Vesa,

Hello Vesa,

Thanks for your sharing your experience and I try to do it. Due to variation of the xtal and components, do you think to trim each of boards or using one trimming to cover all of those boards for production? (reaching 5ppm?)

你能与我分享你满足问题的现象吗?广告运行良好,连接直到重置直到重置?如果是这样,问题是通过修剪XTAL来修复的?

你认为固件有什么不对吗?

Thanks a lot,

VesaN
Offline
Last seen:5年6个月前
格鲁鲁 Master
Joined:2014-06-26 08:49
嗨,亚历克斯,

嗨,亚历克斯,

I guess one trim should cover all boards, however, there might be some variation.

For me, wrong calibration caused the advertising to "disappear" sometimes and the device function incorrectly in general. It was impossible to operate it. The problem was fixed my trimming the xtal and also changing the HW design a little. If the frequency is not correct, then the generated RF signal is in the wrong frequency zone.

When you are calibrating the xtal, you may also notice some drifting.

Can't say if there is anything wrong with the firmware.

Alex Luo
Offline
Last seen:1年3个月前
专家
Joined:2014-02-28 19:16
Tanks Vesa,

Tanks Vesa,

我会尽力遵循您的建议,同时从F / W中挖掘更多信息。有趣的是,在更新广告数据时发生了所有问题(需要app_adv_stop和app_adv_start ...)

谢谢,
Alex

VesaN
Offline
Last seen:5年6个月前
格鲁鲁 Master
Joined:2014-06-26 08:49
Hello,

Hello,

you may want to double check that you don't access wrong memory addresses, and that your adv packet is valid. Try printing it out in hex.

Alex Luo
Offline
Last seen:1年3个月前
专家
Joined:2014-02-28 19:16
嗨Vesa,

嗨Vesa,

似乎太难以找到问题的根源。运行数百次后,问题可能不会发生,我想知道什么触发它。非常奇怪的连接在问题发生后从未恢复过,广告工作得很好。我不知道在调用app_adv_stop之后是否存在任何冲突,然后调用app_adv_start()非常关闭 - 我可以找到更多关于它的信息。您是否在使用add_adv_stop()和add_adv_start()有任何经验?我在app_rtc_timer_handler()中更新的广告数据后使用了那些 - 我为RTC使用创建了(1SEC /步骤)。希望你能在那里找到一些东西,让我知道。

谢谢,

崔金飞
Offline
Last seen:4 years 3 months ago
Joined:2015-03-17 01:25
我有同样的问题,我用

我有同样的问题,我用5V supply,when i change it to 3.3v,everything is fine!hope this help!

Alex Luo
Offline
Last seen:1年3个月前
专家
Joined:2014-02-28 19:16
Hello cuijinfei,

Hello cuijinfei,

DA14580 working voltage up to 3.6V, the chip can't work properly at 5V. So, using 3.3V is right.

angelforest
Offline
Last seen:3年11个月前
Joined:2014-11-07 01:08
Hi Dialog,

Hi Dialog,

我遇到了同样的问题,亚历克斯。DA14580保持advertising but cannot be connected any more. Once the problem happens, it'll be always there and the only recovery operation is to restart the chip.

I got the air log when met the problem when using iPhone. But the problem also exists with Android. From the log, disconnection occurs after LLCP Version Exchange and no response from DA14580. The problem is not easy to reproduce but exists.

Could Dialog help to list some protential reasons? This's an urgent bug for me, can anyone give a favor? Thank u very much.

此致

Angie

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
嗨angelforest,

嗨angelforest,

设备是否已自行断开连接,然后您无法重新连接?Is your connection using any security, maybe something goes wrong there. When you issue the connection request can you tell of the da gets the connection request (in debug mode). Can you use a sniffer in order to see whats in the air ?

Thanks MT_dialog

angelforest
Offline
Last seen:3年11个月前
Joined:2014-11-07 01:08
嗨mt_dialog,

嗨mt_dialog,

1. Question: Is the device disconnected by its own and then you can't reconnect ?
Answer: I am not sure the disconnection is caused by the device or host. But the connection cannot be established again until reset the DA14580.

2. Q: Is your connection using any security?
答:是的。我们的产品涉及HID和ANC的配置文件。
// IO能力
cfm->data.pairing_feat.iocap = GAP_IO_CAP_NO_INPUT_NO_OUTPUT;
// Authentication requirements
cfm->data.pairing_feat.auth = GAP_AUTH_REQ_NO_MITM_BOND;
//Security requirements
// The HID Device shall use LE Security Mode 1 and either Security Level 2 or 3.
//我们在这里使用模式1,级别2
cfm-> data.pairing_feat.sec_req = gap_sec1_noauth_pair_enc;

3.问:你能用嗅探器吗?为了看看空中有什么?
A: I used a sniffer. According the capture, disconnection always appears after LLCP Version Exchange. The master sent LLCP_Version(Opcode: LL_VERSION_IND) everytime with 6 tries, but no response from DA14580. Then after around 350ms, the sniffer showed our device turns back to "connectable state".

Have u met this before? Is that caused by security settings? Thank you.

BR

令人惊艳

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
嗨angelforest,

嗨angelforest,

不,据我所知,如果没有这样的问题,如果设备可以建立第一个连接而不是重新连接,它必须是第二连接中的关键交换过程,也许键不会正确存储或暴露。在重新连接期间使用不同的处理程序,您可以看看键盘参考设计,以便看到适当的HID连接。

Thanks MT_dialog