connection failure but recoverable by system reset

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
uta_lc
Offline
Last seen:1年前1年前
加入:2016-05-03 07:39
connection failure but recoverable by system reset

Dear DLG support,

We have observed the case where a running product all of a sudden is not connectable any more. We tried to sniff it but for some reason, the sniffer can only capture the CONNECT_REQ message and the rest are some empty PDUs from the master (iPhone) but no response from the peripheral side (14580) - likely the connection is half way through but just cannot finish.

We then did a reset of the peripheral and it is OK to connect from iPhone again.

From your experience, what can cause the above issue? Is it something DLG can help with?

If not, do we have a way to capture the failure at some point so that I can test whether we have failed a number of connection retries. At least at this point I can reset the system to recover it from the state.

Note: We are actually using 5.0.3 but not sure why it is in the pull-down list above.

感谢您的关注,
uta_lc

Device:
PM_Dialog
Offline
Last seen:10小时56分钟前
Staff
加入:2018-02-08 11:03
嗨Uta_lc,

嗨Uta_lc,

你的问题的描述是非常通用的,所以我不能这么多可能出错。有一些原因是您的设备无法连接,并且重置可连接后,我将引用最可能和常见的原因以调试此操作。

  1. Regarding your description. Could you please make sure that your device is still advertising and that the device you see on your mobile application is not cached from the central device.
  2. In order for a device to be connectable, it must advertise undirected advertising packets, so could you please check that the packets emitted are in accordance with connectable ones?
  3. Please try to use a development kit, for example with a Pro Dev kit, in order to check if you face the same problem and verify that what you are experiencing is a sw or a hw issue. Also, I suggest you try to use a different BLE phone and possibly an android in order eliminate the case of the phone having issues.
  4. Please make sure that you don’t use P1_2 and P1_3 , because they affect the XTAL16 if you toggle them in high frequency (UART, PWM, SPI, etc).
  5. Also, I suggest you to check the behavior of your code while you try to connect, so can you please try to run it in debug mode and add some breakpoint in the user_app_connection and user_app_adv_undirect_complete callback functions, can you see them occur when the issue happens ? In case you are using a custom board, can you replicate the issue on your board using a default SDK example?

Please check the above recommendations, in order to clarify if this is a hardware or a software issue.

Thanks, PM_Dialog

uta_lc
Offline
Last seen:1年前1年前
加入:2016-05-03 07:39
感谢您的答复。

感谢您的答复。

1. Yes - it is advertising
2. Yes - it is doing undirectional advertising
3. The failure is hard to capture / reproduce and we only captured once on our own. We plan to isolate the cause down the track but in the short term, we are more interested in finding a work around. That is, do we have a way to monitor failed connection so that we can reboot?

4. We are not using P12 or P13 at all.

5. See answer to above point 3.

We will follow your advice to track down the cause but right now we are keen to know if we have a way to monitor whether a connection is successful or not - say upon receiving CONNECT_REQ we set up a timeout timer, in user_on_connection we can cancel the timer otherwise it will trigger a time out event?

谢谢你的帮助,
uta_lc

LC_Dialog
Offline
Last seen:6 days 7 hours ago
Staff
加入:2016-09-19 23:20
嗨Uta_lc,

嗨Uta_lc,

Adding to the previous suggestions.,

If you have the debugger connections exposed on your hardware, you might want to hot attach the debugger and see where the system stands at the time of this connection issue. This will provide some insight into what might be going wrong in the software execution flow.

Also, you can power your target board with a Pro Dev kit and observe the power consumption using the power profiler tool available in our Smart Snippets software. The power drawn can point to some specific operation.

希望这有助于..

最好的,
LC_Dialog

uta_lc
Offline
Last seen:1年前1年前
加入:2016-05-03 07:39
谢谢你的精彩

谢谢你的精彩suggestions.

正如我们正试图捕获臭虫以找出根本原因,我们确实有一个待处理的发布,我被要求检测失败的连接尝试,一旦发生了几次,我们必须重启才能解决问题。我们是否在SDK中有这样的点,以便我可以将钩子放入捕获失败的连接尝试?

感谢您的关注,
uta_lc

PM_Dialog
Offline
Last seen:10小时56分钟前
Staff
加入:2018-02-08 11:03
嗨Uta_lc,

嗨Uta_lc,

There is no point in the SDK that you are able to put a hook in order to capture a failed connection attempt.

Thanks, PM_Dialog