亲爱的Dialog,
我想知道为什么DA14580在被审问时断开连接。发生这种情况的任何条件或触发因素?
My code is based on sample128, which works well for most of time. But sometimes this problem happens -- DA14580 can not be connected by my app, and it's reported "The peripheral disconnected while being interrogated." by Light Blue tool. Meanwhile, the advertising works very well -- The advertising data changed dynamically by sensor detecting.
如果发生这种情况,DA14580将永远无法连接。唯一让它工作的方法是“掉电复位”。复位后,工作正常。这个问题很少发生,也不容易重现。
是调用断开连接函数引起的吗?我没有从我的代码中找到它,可能是某个地方或时间问题?到目前为止,我找不到任何线索。请帮帮我!
Thanks!
Keywords:
你好,Alex Luo,
to me it sounds like it could be a hardware problem / xtal calibration issue. I have had similar issues. Do you use your own hardware?
谢谢你,维萨,
是的,我用的是我自己的硬件。这个问题很少发生,这对我的申请来说是个问题。
We used our App to track the connection, it looks that after connected the DA14580 disconnected immediately. I added a LED indicator in app_connection_func(), and found the LED light-on that means app_env.conidx == GAP_INVILAD_CONIDX when the issue occurs, but I'm not sure each interrogation goes this point. So, I wonder if there is something wrong with timing? If so, why the issue occurs, the connections are never made until the power down reset?!
顺便说一下,我用了32.768KHz的RC振荡器,而不是Xtal。我还使用了计时器函数:app\u sample128\u timer\u handler()(我为应用程序设置了200ms、500ms和2s的计时器),以及app\u rtc\u timer\u handler()(为1s的固定计时器)。我不确定是否有任何冲突或与亚博国际官网平台网址堆栈中的其他计时器。
By the way, the code works very good for most of times, but sometimes this issue happens -- i didn't find where the problem is. Hope you can give me more clue.
Thanks,
Hello Alex,
阅读第7节。小心
If it is not calibrated precisely, you may encounter strange behavior
Thanks!
你好,维萨,
谢谢你分享你的经验,我也试着去做。由于xtal和组件的变化,您认为是修剪每一块板还是用一次修剪覆盖所有这些板进行生产?(达到下午5点?)
Could you share with me about the phenomenon of the problem you met? Advertising works well and the connection is never made until reset? If so, the problem was fixed by trimming the Xtal?
Do you thinks if there is something wrong from firmware ?
谢谢,
Hi Alex,
我想一个修剪应该涵盖所有董事会,然而,可能有一些变化。
对我来说,错误的校准导致广告有时“消失”和设备功能不正确的一般。操作它是不可能的。这个问题是修复我修剪的xtal,也改变了硬件设计一点。如果频率不正确,则生成的射频信号位于错误的频率区域。
在校准xtal时,您可能还会注意到一些漂移。
不能说固件有什么问题。
维萨坦克,
I will try to follow your advice, and meanwhile dig-out more from f/w. The interesting thing is that all of the issues occurred when updating advertising data (need app_adv_stop and app_adv_start...)
Thanks,
亚历克斯
你好,
您可能需要再次检查是否访问了错误的内存地址,以及adv数据包是否有效。试着用十六进制打印出来。
Hi Vesa,
It seems that is too difficult to find where the root of the problem is. The problem may not happen after running hundreds of times, and I wondering what trigger it. Very strange the connection never recovers after the problem occurs and advertising works very well. I don't know if there is any conflict after calling app_adv_stop and then calling app_adv_start() very close -- I can find more info about it. Do you have any experience on using add_adv_stop() and add_adv_start()? I used those after my advertising data updated in app_rtc_timer_handler() --which I created for RTC use (1sec/step). Hope you can find something there and let me know.
Thanks,
我也有同样的问题,我用5V电源,当我把它改成3.3v时,一切都很好!希望这个帮助
崔金飞你好,
DA14580工作电压高达3.6V,芯片在5V时不能正常工作,所以使用3.3V是正确的。
嗨,对话,
我遇到了和亚历克斯一样的问题。DA14580保持广告,但不能再连接。一旦问题发生,它就会一直存在,唯一的恢复操作就是重新启动芯片。
当我使用iPhone时遇到问题,我得到了air日志。但Android也存在这个问题。从日志中可以看出,LLCP版本交换后发生断开,DA14580没有响应。这个问题不容易重现,但确实存在。
对话能不能列出一些可能的原因?这是我的紧急窃听器,有人能帮我个忙吗?非常感谢。
Best Regards
安吉
Hi angelforest,
Is the device disconnected by its own and then you can't reconnect ?你的连接是否使用了安全措施,可能出了问题。当你发出连接请求时,你能告诉da收到连接请求(在调试模式下)。你能用嗅探器看看空气中有什么吗?
谢谢你的对话
Hi MT_dialog,
1问题:设备是否自行断开连接,然后无法重新连接?
答:我不确定断开连接是由设备或主机引起的。但在重置DA14580之前,无法再次建立连接。
2Q: 您的连接是否使用任何安全措施?
A: Yes. Our product involves HID and ANCS profiles.
// IO capabilities
cfm->data.u专长.iocap=间隙\u IO\u CAP\u NO\u输入\u NO\u输出;
//身份验证要求
cfm->data.u专长.auth=GAP\u auth\u REQ\u NO\u MITM\u BOND(间隙\u认证\u不需要最小保证);
//安全要求
//HID设备应使用LE安全模式1和安全级别2或3。
// here we use Mode 1, Level 2
cfm->data.pairing_feat.sec_req = GAP_SEC1_NOAUTH_PAIR_ENC;
3. Q: Can you use a sniffer in order to see whats in the air?
A: 我用了嗅探器。根据捕获,在LLCP版本交换之后总是出现断开连接。主机每次发送LLCP\u版本(操作码:LL\u Version\u IND),尝试6次,但DA14580没有响应。大约350毫秒后,嗅探器显示我们的设备回到“可连接状态”。
你以前见过这个吗?这是由安全设置引起的吗?非常感谢。
比尔
Angelforest
Hi angelforest,
不,据我所知没有这样的一个问题,如果the device can establish the first connection but not a reconnection it must be the key exchanging process in the second connection, maybe the keys aren't stored or exposed properly. Different handlers are used during reconnection, you can have a look in the keyboard reference design in order to see a proper HID connection.
谢谢你的对话