LLC_TASK stuck at LLC_ENC_WAIT_LTK

6 posts / 0 new
Last post
meriororen
Offline
Last seen:3 years 8 months ago
Joined:2015-08-12 13:45
LLC_TASK stuck at LLC_ENC_WAIT_LTK

Hi Dialog,

I have been observing a behavior in my application where I can advertise without problem but I cannot connect.
The peripheral keeps returning 0x3E error (connection cannot be established). And this behavior can only be fixed
by applying reset.

From debugging, I can confirm that everything on application task is running ok, the GAPM task is running, timer is running..

However, when I check the status of LLC_TASK (ke_state_get(LLC_TASK)), I get 0x0D status (LLC_ENC_WAIT_LTK),
I check it regularly via timer, and it never changes.
This behavior happen after disconnection (probably erroneous disconnection), and rarely happens. I could reproduce
this behavior by :

1. Connecting to the peripheral
2. Force-disconnection of central from peripheral by using app_easy_gap_disconnect(), and at the same time
3. Disconnecting _from_ central (in this case, iPhone)
4. Trying to connect again

After step 2. and 3. The disconnection status on peripheral is either 0x16 (disconnection from local) or 0x13 (disconnection
from remote). When the behavior happened, the disconnection will almost certainly show 0x13. I am guessing that
this is a timing-related problem when there are disconnection request from both side at almost the same time.

Like I said, this happens really rarely, but I can reproduce it after trying several time every time.

My question is, when LLC task is stuck at LLC_ENC_WAIT_LTK status, is it right to assume that connection is impossible?
furthermore, do you have any recommendation to prevent this kind of error?

I am using Murata Type ZY that includes DA14580. And using app_barebone example of SDK5.

Overall, I am satisfied with the example provided by Dialog and their support on this website. However,
it is still really hard to debug errors that possibly comes from lower level tasks such as this.

Thanks in advance
Isa

Keywords:
Device:
MT_dialog
Offline
Last seen:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨meriororen,

嗨meriororen,

We had some issues with the LLC task going in awkward states when disconnecting under certain circustances that are going to be fixed with the new SDK.

Also you are right about the TASK_LLC, in that state it isn't free to handle the connection and probably this is causing the issue you experience.

Thanks MT_dialog

meriororen
Offline
Last seen:3 years 8 months ago
Joined:2015-08-12 13:45
Hi MT_dialog,

Hi MT_dialog,

Thanks for the confirmation.
So, when it happens, what steps could I take to recover connection? Is it safe to just reset the lower layers by executing GAPM_RESET? it should bring back the
link layer too, right? Since I want to avoid entire platform reset.

Thanks

MT_dialog
Offline
Last seen:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨meriororen,

嗨meriororen,

As far as i know you in order to recover from this kind of erroneous state we applied sw reset to a customer with a similar problem but i think that with a reset of the stack it would work just fine.

Thanks MT_dialog

meriororen
Offline
Last seen:3 years 8 months ago
Joined:2015-08-12 13:45
Right. Thank you for your

Right. Thank you for your answers. Is there any estimation of when the new SDK with the fix comes?

MT_dialog
Offline
Last seen:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨meriororen,

嗨meriororen,

Unfortunatelly there is no shedule for releasing an update on the SDK any time soon.

Thanks MT_dialog

Topic locked