Hi,
We're currently in the prototyping phase of our product which uses a DA14580. A customer brought back a prototype which failed to connect.
When I try to connect to the device, it immediately disconnects. My BLE tool shows disconnect reason 0x23e ('LL initiated a connection but the connection has failed to be established. Controller did not receive any packets from remote end').
I checked this behavior using a BLE sniffer. Sniffer shows that the first packet after the connection request is ACK'ed by the slave (DA14580 device) but all other packets are not ACK'ed, no further data is exchanged (so no connection parameters update etc).
So I'm not able to connect to the device, only a hardware reset of the DA14580 solves this problem.
有人知道这个公关可能会导致什么oblem?
BR,
Jesper
Hi,
Found out today that I called app_param_update_func at the end of app_connection_func in stead of inside the if-clause in app_connection_func. That was obviously wrong, but could this be a possible cause for the problem I encountered? Were able to connect to the device numerous times before this problem occurred, so I'd like to have an idea what could be the cause of this. Please advice.
BR,
Jesper
Hi Jda,
It might be the reason of your disconnection, we ve never experience something like that as far as i know, but we place the update parameters function after the connect confirmation and after a certain amount of time in the new SDK. This is done not because we get disconnections but to make sure that the host has finished sending his parameters and we be on the safe side when we send our update request. Now if you issue a update parameter request before the connection confirmation a disconnection is a possibility.
Thanks MT_dialog
Hi MT_dialog,
Thanks for your reply. If I understand correctly, it is safe if I update the parameters inside the if-clause in app_connection_func but safer if I introduce a delay before updating the parameters, am I correct?
BR,
Jesper
Hi Jda,
Yes, Please have a look at the barebone example in the new SDK5 at the user_app_connection() function. It checks for the indicated parameters from the peripheral and if they are not the ones prefered it starts a timer in order to issue an update parameter request.
Thanks MT_dialog
Hi MT_dialog,
Thank you very much,. I've looked at the solution you provided in the new SDK and I'll create a similar construction in my application.
BR,
Jesper