Hi George,

 

Justworks ownership transfer is a part of Iotivity security stack, so you are right - just compiling the code is enough :), but there is a small remark - justworks otm method enabled in oic_svr_db_server_justworks.json config file (oxms value).

 

SetDisplayPinWithContextCB or SetGeneratePinCB are mandatory, SetClosePinDisplayCB & SetRandomPinPolicy - aren't.

 

Difference between simpleserver_preconfpin & simpleserver_justworks is oxms value in configuration, please check corresponding json configuration files.

 

Why it *.cpp? I don't know :) , but we can ask author of these source files...

 

 

Best regards,

Aleksey Volkov

 

 

--------- Original Message ---------

Sender : Nash, George <george.n...@intel.com>

Date : 2018-02-27 01:37 (GMT+2)

Title : [dev] Provisioning (ownership transfer)

 

I am reading the provisioning entry on the wiki https://wiki.iotivity.org/provisioning

 

It lists two example services simpleserver_justworks and simpleserver_randompin.

 

Looking through the simpleserver_justworks.cpp I don’t see any code for device ownership transfer. So I assume that just compiling the code will automatically add in the justworks ownership transfer. Is this correct?

 

The simplerserver_randompin.cpp has three function calls for setting up the random pin:

SetDisplayPinWithContextCB(…)

SetClosePinDisplayCB(…)

And

SetRandomPinPolicy(…)

 

Are all three of these functions required? For example can call SetDisplayPinWithContextCB(..) and not call SetClosePinDisplayCB(..) and it will still work? If I don’t call SetRandomPinPolicy will it still use the Display/Close callbacks? If it will still use the callbacks what is the default PinPolicy used? It is not hard to add all three just wanted to check requirements.

 

The sample folder also contains code for simpleserver_preconfpin.cpp. I did a diff of this code against the simpleserver_justworks and I didn’t see anything that would indicate it is using a pin preconfigured or otherwise. Is this sample completed? If so how is it specifying the preconfigured pin?

 

The samples have the *.cpp extension but I only see code from the csdk use in the samples. Should they be cpp?

 

George Nash

 

_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

 

 

 

 

  

_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to