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.
Thanks for your attention,
uta_lc
Hi uta_lc,
The description of your problem is quite generic, so I can’t be so much specific of what might go wrong. There are a few reasons that your device isn’t connectable and after the reset can be connectable, so I will refer the most possible and common reasons in order to debug this.
Please check the above recommendations, in order to clarify if this is a hardware or a software issue.
Thanks, PM_Dialog
Thanks for your response.
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?
Thanks for your help,
uta_lc
Hi 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.
希望这可以帮助. .
Best,
LC_Dialog
Thanks for the wonderful suggestions.
当我们试图捕捉bug发现the root cause, we do have a pending release where I was asked to detect the failed connection attempt, once that happens for a few times, we have to reboot to work around. Do we have such a point in the SDK so that I can put a hook in to capture failed connection attempt?
Thanks for your attention,
uta_lc
Hi 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