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