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
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
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)?
From: <email@example.com> on behalf of "Farid BENAMROUCHE via groups.io" <fariouche@...>
SOrry for the loong delay, the covid disturbed me a lot, but I'm back on business.
I do not remember exactly why I had to create two devices, (at the begining I've created only one acting as both a client and a obt, but I've reached an limitation which I could not remember...)
Now I've moved on the esp32 for the server, no longer testing the linux version of the server....
For now, I will close this subject until I see it again.
Thank you for your help