Re: onboarding just works does not complete sometimes


Kishen Maloor
 

Hello,

 

The two traces you've attached seem largely identical up to the end of your

ko3 logs. It would help to look at all further logs from that run. The ko3 logs stop

during a routine DTLS handshake that happens in obt_jw_11 with no indication of

failures that I could immediately spot. So, it’s hard to know what else may be happening.

 

> This client acts as a client (device id 1) and an onboarding tool (device id 0)

 

Have you defined two devices in your Client? If so, why is that necessary?

Also, when it failed were you attempting to onboard your Server or your Client?

 

> After some investigations, I see that the function is going up to the step 11 (obt_jw_11

> callback is called inside oc_obt_otm_justworks.c) and then never goes to the next

> callback.

 

Is your application's just_works_cb called back at all?

 

> The loop still works fine.

 

How do you mean?

 

> By the way, I cannot reproduce the issue using the example onboarding tool.

 

Are you referring to the sample onboarding tool on Android (or Linux)?

 

Thanks,

-Kishen.

 

 

-- 

Kishen Maloor

Intel Corporation

 

From: <iotivity-dev@iotivity.groups.io> on behalf of "Farid BENAMROUCHE via groups.io" <fariouche@...>
Reply-To: "fariouche@..." <fariouche@...>
Date: Saturday, July 11, 2020 at 2:12 AM
To: "iotivity-dev@iotivity.groups.io" <iotivity-dev@iotivity.groups.io>
Subject: [dev] onboarding just works does not complete sometimes

 

Hello,

I'm experiencing a strange issue and having hard time figuring out what is happening.
Using iotivity-lite's master branch, I'm using the example server and a client of my own in android.

This client acts as a client (device id 1) and an onboarding tool (device id 0)
Both server and client are running in an android emulator for simplicity.

The client call oc_obt_discover_owned_devices() and oc_obt_discover_unowned_devices() at the same time (but I reproduce the issue if a only call discover_unowned...)
Inside the callback of owned_devices, for each discovered device, oc_obt_retrieve_creds() to check if this device is fully onboarded.
Inside the unowned_devices callback, I call oc_do_get("/oic/d") and display the information on the UI.

They I select the discovered unowned device and to the onboarding.
This will call oc_obt_perform_just_works_otm() that returns no error.
Sometime I get blocked here, meaning that I never reveive the callback.

After some investigations, I see that the function is going up to the step 11 (obt_jw_11 callback is called inside oc_obt_otm_justworks.c) and then never goes to the next callback.
The loop still works fine.

I've attached two traces, one that works and one when it does not.
By the way, I cannot reproduce the issue using the example onboarding tool. But I fail to see any difference with what I'm doing.

Any idea on where to look at or maybe what could be the issue?

Thank you for your help

Farid

Join iotivity-dev@iotivity.groups.io to automatically receive all group messages.