Topics

how to share "same platform ID" among iotivity stack instances?


Joo-Chul Lee
 


Hi all,

 

I have had one question since I began to study OCF (OIC?) spec…

That is how to share “same platform ID” among logical OCF devices in IoTivity codes.

 

Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?

At least I have not found any sample codes in IoTivity stack…

 

Thanks & BR,

 

- Kevin


--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Nathan Heldt-Sheller
 

Hi Kevin,

 

If I’ve understood your question correctly, the answer is that the manufacturer would set the platform ID to the same value for all the Devices on the platform prior to shipping the product.  In IoTivity, this is done via the .dat file that IoTivity loads many default Resource values from.  

 

There’s no API in the stack to somehow determine that two Devices are on the same physical platform.

 

Thanks,
Nathan

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of Joo-Chul Lee
Sent: Monday, September 3, 2018 6:21 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] how to share "same platform ID" among iotivity stack instances?

 

 

Hi all,

 

I have had one question since I began to study OCF (OIC?) spec…

That is how to share “same platform ID” among logical OCF devices in IoTivity codes.

 

Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?

At least I have not found any sample codes in IoTivity stack…

 

Thanks & BR,

 

- Kevin


--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Gregg Reynolds
 



On Tue, Sep 4, 2018, 12:51 PM Nathan Heldt-Sheller <nathan.heldt-sheller@...> wrote:

Hi Kevin,

 

If I’ve understood your question correctly, the answer is that the manufacturer would set the platform ID to the same value for all the Devices on the platform prior to shipping the product.  In IoTivity, this is done via the .dat file that IoTivity loads many default Resource values from.  

 

There’s no API in the stack to somehow determine that two Devices are on the same physical platform.

IOW, one OCF app = one platform plus one or more devices?  Not really clear from the spec.

But one physical device can host more than one OCF app? I.e. platform != physical device?

Gregg

Thanks,
Nathan

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of Joo-Chul Lee
Sent: Monday, September 3, 2018 6:21 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] how to share "same platform ID" among iotivity stack instances?

 

 

Hi all,

 

I have had one question since I began to study OCF (OIC?) spec…

That is how to share “same platform ID” among logical OCF devices in IoTivity codes.

 

Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?

At least I have not found any sample codes in IoTivity stack…

 

Thanks & BR,

 

- Kevin


--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Joo-Chul Lee
 

Hi Nathan,

Thank you for explanation.

I have more questions about it.

Is the ".dat" file used to store default resource values same as the ".dat" file used to store SVR during/after onboarding ?
If not, then, does the ".dat" file have any specific format (json or something) ?

Thanks & BR

- Kevin







On Wed, Sep 5, 2018 at 2:51 AM Heldt-Sheller, Nathan <nathan.heldt-sheller@...> wrote:

Hi Kevin,

 

If I’ve understood your question correctly, the answer is that the manufacturer would set the platform ID to the same value for all the Devices on the platform prior to shipping the product.  In IoTivity, this is done via the .dat file that IoTivity loads many default Resource values from.  

 

There’s no API in the stack to somehow determine that two Devices are on the same physical platform.

 

Thanks,
Nathan

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of Joo-Chul Lee
Sent: Monday, September 3, 2018 6:21 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] how to share "same platform ID" among iotivity stack instances?

 

 

Hi all,

 

I have had one question since I began to study OCF (OIC?) spec…

That is how to share “same platform ID” among logical OCF devices in IoTivity codes.

 

Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?

At least I have not found any sample codes in IoTivity stack…

 

Thanks & BR,

 

- Kevin


--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Joo-Chul Lee
 

Hi Gregg,

In my understanding, usually, OCF app (== a process) is a "logical device" which has its own /oic/p and /oic/d.
An OCF platform is a physical device, and it may host more than one "logical device" in it,
and they share same "physical ID" among them. 

Thanks & BR

- Kevin


On Wed, Sep 5, 2018 at 5:13 AM Gregg Reynolds <dev@...> wrote:


On Tue, Sep 4, 2018, 12:51 PM Nathan Heldt-Sheller <nathan.heldt-sheller@...> wrote:

Hi Kevin,

 

If I’ve understood your question correctly, the answer is that the manufacturer would set the platform ID to the same value for all the Devices on the platform prior to shipping the product.  In IoTivity, this is done via the .dat file that IoTivity loads many default Resource values from.  

 

There’s no API in the stack to somehow determine that two Devices are on the same physical platform.

IOW, one OCF app = one platform plus one or more devices?  Not really clear from the spec.

But one physical device can host more than one OCF app? I.e. platform != physical device?

Gregg

Thanks,
Nathan

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of Joo-Chul Lee
Sent: Monday, September 3, 2018 6:21 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] how to share "same platform ID" among iotivity stack instances?

 

 

Hi all,

 

I have had one question since I began to study OCF (OIC?) spec…

That is how to share “same platform ID” among logical OCF devices in IoTivity codes.

 

Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?

At least I have not found any sample codes in IoTivity stack…

 

Thanks & BR,

 

- Kevin


--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Martin Roesch
 

Hi Kevin,

To set various properties of the /oic/d and /oic/p resources you can use the following API:

C:
OCStackResult OCSetPropertyValue(OCPayloadType type, const char *propName, const void *value)
defined in ocstack.h

C++:
OCStackResult OC::OCPlatform::setPropertyValue(OCPayloadType type, const std::string& tag, const std::string& value)
defined in OCPlatform.h

The OCPayloadType enum is defined in octypes.h.

E.g. To set the platform ID in C++ call:
OC::OCPlatform::setPropertyValue(PAYLOAD_TYPE_PLATFORM, OC_RSRVD_PLATFORM_ID, " 12345678-abcd-1234-abcd-abcdefghijkl")

Regards,

Martin Rösch


Von: iotivity-dev@lists.iotivity.org [mailto:iotivity-dev@lists.iotivity.org] Im Auftrag von Joo-Chul Lee
Gesendet: Dienstag, 4. September 2018 03:21
An: iotivity-dev
Betreff: [dev] how to share "same platform ID" among iotivity stack instances?


Hi all,
 
I have had one question since I began to study OCF (OIC?) spec…
That is how to share “same platform ID” among logical OCF devices in IoTivity codes.
 
Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?
At least I have not found any sample codes in IoTivity stack…
 
Thanks & BR,
 
- Kevin

--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@etri.re.kr/cms.rune@gmail.com Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Nathan Heldt-Sheller
 

Hi Kevin,

 

Yes, same .dat file.  If you read here: https://wiki.iotivity.org/security_resource_manager?s[]=json2cbor, you’ll find more info about the .dat file and manufacturer defaults.  There’s also more info regarding the “resetpf” (Reset Profile), a backup of the .dat file that allows resetting to mfr defaults, here: https://wiki.iotivity.org/doku.php?id=provisioning (search for “resetpf”).

 

Hope that helps,

 

Thanks,
Nathan

 

From: Joo-Chul Kevin Lee [mailto:cms.rune@...]
Sent: Tuesday, September 4, 2018 10:47 PM
To: Heldt-Sheller, Nathan <nathan.heldt-sheller@...>
Cc: iotivity-dev <iotivity-dev@...>
Subject: Re: [dev] how to share "same platform ID" among iotivity stack instances?

 

Hi Nathan,

 

Thank you for explanation.

 

I have more questions about it.

 

Is the ".dat" file used to store default resource values same as the ".dat" file used to store SVR during/after onboarding ?

If not, then, does the ".dat" file have any specific format (json or something) ?

 

Thanks & BR

 

- Kevin

 

 

 

 

 

 

 

On Wed, Sep 5, 2018 at 2:51 AM Heldt-Sheller, Nathan <nathan.heldt-sheller@...> wrote:

Hi Kevin,

 

If I’ve understood your question correctly, the answer is that the manufacturer would set the platform ID to the same value for all the Devices on the platform prior to shipping the product.  In IoTivity, this is done via the .dat file that IoTivity loads many default Resource values from.  

 

There’s no API in the stack to somehow determine that two Devices are on the same physical platform.

 

Thanks,
Nathan

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of Joo-Chul Lee
Sent: Monday, September 3, 2018 6:21 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] how to share "same platform ID" among iotivity stack instances?

 

 

Hi all,

 

I have had one question since I began to study OCF (OIC?) spec…

That is how to share “same platform ID” among logical OCF devices in IoTivity codes.

 

Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?

At least I have not found any sample codes in IoTivity stack…

 

Thanks & BR,

 

- Kevin


--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Joo-Chul Lee
 

Hi Nathan,

Thank you for valuable information!

Actually I have tested provisioning sample with sample ".dat" file before.
However, I couldn't find how "platform ID" is stored in ".dat" file. 
Do you have any idea about this?

Thanks & BR

- Kevin


On Thu, Sep 6, 2018 at 8:27 AM Heldt-Sheller, Nathan <nathan.heldt-sheller@...> wrote:

Hi Kevin,

 

Yes, same .dat file.  If you read here: https://wiki.iotivity.org/security_resource_manager?s[]=json2cbor, you’ll find more info about the .dat file and manufacturer defaults.  There’s also more info regarding the “resetpf” (Reset Profile), a backup of the .dat file that allows resetting to mfr defaults, here: https://wiki.iotivity.org/doku.php?id=provisioning (search for “resetpf”).

 

Hope that helps,

 

Thanks,
Nathan

 

From: Joo-Chul Kevin Lee [mailto:cms.rune@...]
Sent: Tuesday, September 4, 2018 10:47 PM
To: Heldt-Sheller, Nathan <nathan.heldt-sheller@...>
Cc: iotivity-dev <iotivity-dev@...>
Subject: Re: [dev] how to share "same platform ID" among iotivity stack instances?

 

Hi Nathan,

 

Thank you for explanation.

 

I have more questions about it.

 

Is the ".dat" file used to store default resource values same as the ".dat" file used to store SVR during/after onboarding ?

If not, then, does the ".dat" file have any specific format (json or something) ?

 

Thanks & BR

 

- Kevin

 

 

 

 

 

 

 

On Wed, Sep 5, 2018 at 2:51 AM Heldt-Sheller, Nathan <nathan.heldt-sheller@...> wrote:

Hi Kevin,

 

If I’ve understood your question correctly, the answer is that the manufacturer would set the platform ID to the same value for all the Devices on the platform prior to shipping the product.  In IoTivity, this is done via the .dat file that IoTivity loads many default Resource values from.  

 

There’s no API in the stack to somehow determine that two Devices are on the same physical platform.

 

Thanks,
Nathan

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of Joo-Chul Lee
Sent: Monday, September 3, 2018 6:21 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] how to share "same platform ID" among iotivity stack instances?

 

 

Hi all,

 

I have had one question since I began to study OCF (OIC?) spec…

That is how to share “same platform ID” among logical OCF devices in IoTivity codes.

 

Is this just an implementation skill (dependent on programmer) ? or is there any typical way used in codes ?

At least I have not found any sample codes in IoTivity stack…

 

Thanks & BR,

 

- Kevin


--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



--

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Joo-Chul Kevin Lee, ETRI
161 Gajeong-dong, Yuseong-gu, daejon, 305-700, KOREA
E-mail: rune@.../cms.rune@... Tel: +82-42-860-1021
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+