Date   

Re: Gerrit no longer accepts draft changes

George Nash
 

I got a response from the helpdesk.  The draft work flow that was used in older versions of gerrit are no longer supported in the updated version of gerrit.

 

Now it supports work in progress (wip) and private code.  See the linked pipermail thread.

 

https://lists.opendaylight.org/pipermail/discuss/2019-July/008387.html

 

The new work flow is not much different then drafts just use a different command when pushing the code.  I will play around with it a little and update the wiki to reflect the new commands for doing draft commits.

 

George Nash

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of George Nash
Sent: Monday, August 12, 2019 3:15 PM
To: Heldt-Sheller, Nathan <nathan.heldt-sheller@...>
Cc: iotivity-dev@...
Subject: Re: [dev] Gerrit no longer accepts draft changes

 

Thanks Nathan I will submit a ticket to the helpdesk.

 

George Nash

 

From: Heldt-Sheller, Nathan
Sent: Monday, August 12, 2019 1:54 PM
To: Nash, George <george.nash@...>
Cc: iotivity-dev@...
Subject: Re: [dev] Gerrit no longer accepts draft changes

 

No, they were not... thanks George for checking into it for us.

Thanks,

Nathan


On Aug 12, 2019, at 12:27 PM, George Nash <george.nash@...> wrote:

Ever since gerrit was upgraded I have not been able to push draft commits.

 

Before the upgrade I regularly used draft commits to share work in progress with other reviewers or to move it from one development system to another for testing. (i.e. Move from Windows to Linux).  I just accepted that draft commits were no longer allowed.  Today, I  found a section in the wiki (https://wiki.iotivity.org/submitting_to_gerrit) that encourages using draft commits exactly for the reason I was using draft commits.

 

Were draft commits turned off on purpose?

 

If not, I will submit a helpdesk ticket to re-enable draft commits.

 

Thanks,

 

George Nash


Re: Gerrit no longer accepts draft changes

George Nash
 

Thanks Nathan I will submit a ticket to the helpdesk.

 

George Nash

 

From: Heldt-Sheller, Nathan
Sent: Monday, August 12, 2019 1:54 PM
To: Nash, George <george.nash@...>
Cc: iotivity-dev@...
Subject: Re: [dev] Gerrit no longer accepts draft changes

 

No, they were not... thanks George for checking into it for us.

Thanks,

Nathan


On Aug 12, 2019, at 12:27 PM, George Nash <george.nash@...> wrote:

Ever since gerrit was upgraded I have not been able to push draft commits.

 

Before the upgrade I regularly used draft commits to share work in progress with other reviewers or to move it from one development system to another for testing. (i.e. Move from Windows to Linux).  I just accepted that draft commits were no longer allowed.  Today, I  found a section in the wiki (https://wiki.iotivity.org/submitting_to_gerrit) that encourages using draft commits exactly for the reason I was using draft commits.

 

Were draft commits turned off on purpose?

 

If not, I will submit a helpdesk ticket to re-enable draft commits.

 

Thanks,

 

George Nash


Re: Gerrit no longer accepts draft changes

Nathan Heldt-Sheller
 

No, they were not... thanks George for checking into it for us.

Thanks,
Nathan

On Aug 12, 2019, at 12:27 PM, George Nash <george.nash@...> wrote:

Ever since gerrit was upgraded I have not been able to push draft commits.

 

Before the upgrade I regularly used draft commits to share work in progress with other reviewers or to move it from one development system to another for testing. (i.e. Move from Windows to Linux).  I just accepted that draft commits were no longer allowed.  Today, I  found a section in the wiki (https://wiki.iotivity.org/submitting_to_gerrit) that encourages using draft commits exactly for the reason I was using draft commits.

 

Were draft commits turned off on purpose?

 

If not, I will submit a helpdesk ticket to re-enable draft commits.

 

Thanks,

 

George Nash


Gerrit no longer accepts draft changes

George Nash
 

Ever since gerrit was upgraded I have not been able to push draft commits.

 

Before the upgrade I regularly used draft commits to share work in progress with other reviewers or to move it from one development system to another for testing. (i.e. Move from Windows to Linux).  I just accepted that draft commits were no longer allowed.  Today, I  found a section in the wiki (https://wiki.iotivity.org/submitting_to_gerrit) that encourages using draft commits exactly for the reason I was using draft commits.

 

Were draft commits turned off on purpose?

 

If not, I will submit a helpdesk ticket to re-enable draft commits.

 

Thanks,

 

George Nash


Re: [iotivity classic] Question about SVR DB example in IoTivity classic

Joo-Chul Lee
 

FYI.

I added answers from Oleksiy Volkov.

-----------

Hi Kevin,

 

Yes, this looks like a 'copy-paste' typo for such case, but I can’t definitely say that this is a error. Rowner value doesn't always belong to the device owner, and no one forbids owning a security resource on their own.

If the test scenario doesn't provide for provisioning, then this can be an acceptable configuration.. .

( But it still seems to me that this is the wrong configuration. :) )

-----------


Thanks & Regards


- Kevin


On Wed, Aug 7, 2019 at 12:45 AM Joo-Chul Lee via Lists.Iotivity.Org <cms.rune=gmail.com@...> wrote:

I attached related SVR DB jsons.

Thanks & BR :0

- Kevin


On Wed, Aug 7, 2019 at 12:11 AM Joo-Chul Lee via Lists.Iotivity.Org <cms.rune=gmail.com@...> wrote:

 

Hi 

 

I have a question about SVR DB sample in IoTivity classic.

There are sample codes & SVR DB in "resource/csdk/stack/samples/linux/secure".

 

There are 2 samples (occlientbasicops, ocserverbasicops). 

occlientbasicops uses oic_svr_db_client_devowner.json or oic_svr_db_client_nondevowner.json

ocserverbasicops uses oic_svr_db_server.json.

 

network topology is as follows:

image.png


 

according to oic_svr_db_server.json, Server has already been onboarded by DevOwnerClient

(doxm.devowneruuid is 32323232-3232-3232-3232-323232323232)

 

The strange point in oic_svr_db_server.json is rowneruuid of /oic/sec/doxm, /oic/sec/pstat, /oic/sec/acl2 are Server itself (31313131-3131-3131-3131-313131313131).

In my understanding rowneruuid of them should be OBT (in case that DOTS, CMS, AMS are implemented in the same  device).

 

5.4.2 of Security spec says:

The DOTS shall update the rowneruuid Property of the "/oic/sec/doxm" and "/oic/sec/pstat" resources with the  DOTS resource owner identifier. 

The DOTS shall update the rowneruuid Property of the "/oic/sec/cred" resource with the CMS resource owner  identifier. 

The DOTS shall update the rowneruuid Property of the "/oic/sec/acl2" resource with the AMS resource owner  identifier

 

Is this correct SVR DB or not?

 

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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Currently "iotivity-classic" returns the same result for "oic.if.r" and "oic.if.baseline".

yonggu ha
 

I used getDeviceInfo () in the iotivity-classic client to retrieve the server's device type(ex: "oic.d.light") and use it to configure the client's UI.
 
However, this behavior works well between Classic client and server.
but It does not work with class clients and lite servers.
 
I was able to review this issue with the help of intel kishen.
As a result, classic was returning values to "oic.if.r" and "oic.if.baseline" indifferently.

I mean, with getDeviceInfo(), i was able to find device type.[with "oic.if.r"]
but, in specification . 
For get the property (ex device type), have to use "oic.if.baseline".

According to the specification, rt is returned for oic.if.baseline.
I knew the cause of this problem with the help of kishen.

so, I modified the two and tested them according to kishen's suggestion.

1) getDeviceInfo("/oic/d?if=oic.if.baseline")
2) some fix in oicstack.c

I think it needed review, so I write this issue in here.


Re: [iotivity classic] Question about SVR DB example in IoTivity classic

Joo-Chul Lee
 


I attached related SVR DB jsons.

Thanks & BR :0

- Kevin


On Wed, Aug 7, 2019 at 12:11 AM Joo-Chul Lee via Lists.Iotivity.Org <cms.rune=gmail.com@...> wrote:

 

Hi 

 

I have a question about SVR DB sample in IoTivity classic.

There are sample codes & SVR DB in "resource/csdk/stack/samples/linux/secure".

 

There are 2 samples (occlientbasicops, ocserverbasicops). 

occlientbasicops uses oic_svr_db_client_devowner.json or oic_svr_db_client_nondevowner.json

ocserverbasicops uses oic_svr_db_server.json.

 

network topology is as follows:

image.png


 

according to oic_svr_db_server.json, Server has already been onboarded by DevOwnerClient

(doxm.devowneruuid is 32323232-3232-3232-3232-323232323232)

 

The strange point in oic_svr_db_server.json is rowneruuid of /oic/sec/doxm, /oic/sec/pstat, /oic/sec/acl2 are Server itself (31313131-3131-3131-3131-313131313131).

In my understanding rowneruuid of them should be OBT (in case that DOTS, CMS, AMS are implemented in the same  device).

 

5.4.2 of Security spec says:

The DOTS shall update the rowneruuid Property of the "/oic/sec/doxm" and "/oic/sec/pstat" resources with the  DOTS resource owner identifier. 

The DOTS shall update the rowneruuid Property of the "/oic/sec/cred" resource with the CMS resource owner  identifier. 

The DOTS shall update the rowneruuid Property of the "/oic/sec/acl2" resource with the AMS resource owner  identifier

 

Is this correct SVR DB or not?

 

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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


[iotivity classic] Question about SVR DB example in IoTivity classic

Joo-Chul Lee
 

 

Hi 

 

I have a question about SVR DB sample in IoTivity classic.

There are sample codes & SVR DB in "resource/csdk/stack/samples/linux/secure".

 

There are 2 samples (occlientbasicops, ocserverbasicops). 

occlientbasicops uses oic_svr_db_client_devowner.json or oic_svr_db_client_nondevowner.json

ocserverbasicops uses oic_svr_db_server.json.

 

network topology is as follows:

image.png


 

according to oic_svr_db_server.json, Server has already been onboarded by DevOwnerClient

(doxm.devowneruuid is 32323232-3232-3232-3232-323232323232)

 

The strange point in oic_svr_db_server.json is rowneruuid of /oic/sec/doxm, /oic/sec/pstat, /oic/sec/acl2 are Server itself (31313131-3131-3131-3131-313131313131).

In my understanding rowneruuid of them should be OBT (in case that DOTS, CMS, AMS are implemented in the same  device).

 

5.4.2 of Security spec says:

The DOTS shall update the rowneruuid Property of the "/oic/sec/doxm" and "/oic/sec/pstat" resources with the  DOTS resource owner identifier. 

The DOTS shall update the rowneruuid Property of the "/oic/sec/cred" resource with the CMS resource owner  identifier. 

The DOTS shall update the rowneruuid Property of the "/oic/sec/acl2" resource with the AMS resource owner  identifier

 

Is this correct SVR DB or not?

 

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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Re: [Requesting for IoTivity-Lite Android build procedure]

George Nash
 

Vino,

 

Clarke is correct that there is not yet a publicly available release of IoTivity-lite for Android.  The work to make a Java language port that works on Android has been in progress for several months now. The work can be found in the swig branch, as pointed out by yonggu ha.

 

The work is mature enough that a merge to the master branch is in review at the time I am writing this.

 

You are welcome to try out the code yourself.  Use git to download the latest version of IoTivity-lite source code  from gerrit or github:

 

https://gerrit.iotivity.org/gerrit/admin/repos/iotivity-lite (official repository)

https://github.com/iotivity/iotivity-lite (mirror of the official repository)

 

checkout the swig branch

 

follow the build instructions found in <iotivity-lite>/port/android/README.md

 

If you want to use Android I recommend sticking to the tip of the swig branch for the time being. It is typically never more than a few days behind master.

 

If you have any difficulties feel free to ask for additional help.

 

Thanks,

 

George

 

 

 

From: iotivity-dev@... [mailto:iotivity-dev@...] On Behalf Of VINODH KUMAR.A ARJUNAN.S
Sent: Friday, August 2, 2019 11:41 AM
To: Clarke Stevens <cstevens63@...>
Cc: yonggu ha <yghafivehome@...>; iotivity-dev@...
Subject: Re: [dev] [Requesting for IoTivity-Lite Android build procedure]

 

Hi Clarke and Younggu,

 

Thanks for your information.

I will check and get back to you if any support needed.

 

Thanks,

Vino

 

On Fri, 2 Aug, 2019, 8:09 PM Clarke Stevens, <cstevens63@...> wrote:

Vino,

 

The IoTivity-lite version of OTGC is not yet publicly available. I think we will have it ready in August. We’ll make an announcement on this list.

 

Thanks,

-Clarke

 

From: <iotivity-dev@...> on behalf of yonggu ha <yghafivehome@...>
Date: Friday, August 2, 2019 at 8:29 AM
To: "VINODH KUMAR.A ARJUNAN.S" <avino.arjunan@...>
Cc: <iotivity-dev@...>
Subject: Re: [dev] [Requesting for IoTivity-Lite Android build procedure]

 

You can find swig branch in iotivity lite github

 

There is information about android build procedure

 

2019 8 2 () 오후 11:25, VINODH KUMAR.A ARJUNAN.S <avino.arjunan@...>님이 작성:

Hi Team,

 

Greeting !!!

This is Vinodh and i started analysing and working on IoTivity-Lite.

 

As of now i want to build a IoTivity-Lite fo android. So that i can try to make OTGC application by own.

 

I could not find the build procedure for android in IoTivity- Lite.

 

could you please give the procedure for the same?

Kindly give me your valuable feedbacks and support.

 

Thanks,

Vino


Re: [Requesting for IoTivity-Lite Android build procedure]

VINODH KUMAR.A ARJUNAN.S <avino.arjunan@...>
 

Hi Clarke and Younggu,

Thanks for your information.
I will check and get back to you if any support needed.

Thanks,
Vino

On Fri, 2 Aug, 2019, 8:09 PM Clarke Stevens, <cstevens63@...> wrote:

Vino,

 

The IoTivity-lite version of OTGC is not yet publicly available. I think we will have it ready in August. We’ll make an announcement on this list.

 

Thanks,

-Clarke

 

From: <iotivity-dev@...> on behalf of yonggu ha <yghafivehome@...>
Date: Friday, August 2, 2019 at 8:29 AM
To: "VINODH KUMAR.A ARJUNAN.S" <avino.arjunan@...>
Cc: <iotivity-dev@...>
Subject: Re: [dev] [Requesting for IoTivity-Lite Android build procedure]

 

You can find swig branch in iotivity lite github

 

There is information about android build procedure

 

2019 8 2 () 오후 11:25, VINODH KUMAR.A ARJUNAN.S <avino.arjunan@...>님이 작성:

Hi Team,

 

Greeting !!!

This is Vinodh and i started analysing and working on IoTivity-Lite.

 

As of now i want to build a IoTivity-Lite fo android. So that i can try to make OTGC application by own.

 

I could not find the build procedure for android in IoTivity- Lite.

 

could you please give the procedure for the same?

Kindly give me your valuable feedbacks and support.

 

Thanks,

Vino


Re: [Requesting for IoTivity-Lite Android build procedure]

Clarke Stevens
 

Vino,

 

The IoTivity-lite version of OTGC is not yet publicly available. I think we will have it ready in August. We’ll make an announcement on this list.

 

Thanks,

-Clarke

 

From: <iotivity-dev@...> on behalf of yonggu ha <yghafivehome@...>
Date: Friday, August 2, 2019 at 8:29 AM
To: "VINODH KUMAR.A ARJUNAN.S" <avino.arjunan@...>
Cc: <iotivity-dev@...>
Subject: Re: [dev] [Requesting for IoTivity-Lite Android build procedure]

 

You can find swig branch in iotivity lite github

 

There is information about android build procedure

 

2019 8 2 () 오후 11:25, VINODH KUMAR.A ARJUNAN.S <avino.arjunan@...>님이 작성:

Hi Team,

 

Greeting !!!

This is Vinodh and i started analysing and working on IoTivity-Lite.

 

As of now i want to build a IoTivity-Lite fo android. So that i can try to make OTGC application by own.

 

I could not find the build procedure for android in IoTivity- Lite.

 

could you please give the procedure for the same?

Kindly give me your valuable feedbacks and support.

 

Thanks,

Vino


Re: [Requesting for IoTivity-Lite Android build procedure]

yonggu ha
 

You can find swig branch in iotivity lite github

There is information about android build procedure

2019년 8월 2일 (금) 오후 11:25, VINODH KUMAR.A ARJUNAN.S <avino.arjunan@...>님이 작성:

Hi Team,

Greeting !!!
This is Vinodh and i started analysing and working on IoTivity-Lite.

As of now i want to build a IoTivity-Lite fo android. So that i can try to make OTGC application by own.

I could not find the build procedure for android in IoTivity- Lite.

could you please give the procedure for the same?
Kindly give me your valuable feedbacks and support.

Thanks,
Vino


[Requesting for IoTivity-Lite Android build procedure]

VINODH KUMAR.A ARJUNAN.S <avino.arjunan@...>
 

Hi Team,

Greeting !!!
This is Vinodh and i started analysing and working on IoTivity-Lite.

As of now i want to build a IoTivity-Lite fo android. So that i can try to make OTGC application by own.

I could not find the build procedure for android in IoTivity- Lite.

could you please give the procedure for the same?
Kindly give me your valuable feedbacks and support.

Thanks,
Vino


Re: IoTivity Lite code for OBT to onboard self?

Kishen Maloor
 

Hi,

 

The OBT initialization API security/oc_obt.c:oc_obt_init() performs the self-onboarding.

 

An OBT implementation (e.g. onboarding_tool/obtmain.c) would invoke this API twice:

a) at startup (inside the .requests_entry callback),

b) following every RESET inside the factory_presets callback (onboarding_tool/obtmain.c:factory_presets_cb()).

 

Thanks,

-Kishen.

 

-- 

Kishen Maloor

Intel Corporation

 

From: <iotivity-dev@...> on behalf of Nathan Heldt-Sheller <nathan.heldt-sheller@...>
Date: Wednesday, July 31, 2019 at 11:06 PM
To: "iotivity-dev@..." <iotivity-dev@...>
Subject: [dev] IoTivity Lite code for OBT to onboard self?

 

Hi folks,

 

I’m looking for the code that takes an OBT itself from /pstat.dos.s = RFOTM to RFNOP, essentially self-onboarding.  Kishen (or anyone else who might know) can you please point me to the right starting point (file and function)?

 

Thanks,
Nathan

 


IoTivity Lite code for OBT to onboard self?

Nathan Heldt-Sheller
 

Hi folks,

 

I’m looking for the code that takes an OBT itself from /pstat.dos.s = RFOTM to RFNOP, essentially self-onboarding.  Kishen (or anyone else who might know) can you please point me to the right starting point (file and function)?

 

Thanks,
Nathan

 


OCF Fargo draft version 0.3 CRs for IoTivity review

OCF Staff <staff@...>
 

Dear IoTivity Developers,

 

In the attached .zip file you will find early drafts (v0.3) of CRs against the Open Connectivity Foundation’s next specification (codenamed “Fargo”). These draft documents provide a current snapshot of the specification development and are subject to change. Additional early draft CRs will follow as OCF technical WGs complete work on the next version of the specifications. If you have any questions, please direct them to staff@....

 

Best regards,

OCF Staff

___________________________

Open Connectivity Foundation
3855 SW 153rd Drive
Beaverton, Oregon  97003
Phone:  +1.503.619.0673
Email: staff@...

 

 


Re: [iotivity-lite] how to handle notification in iotivity-lite?

Kishen Maloor
 

Hi Kevin,

 

> ==> Basically I understand this situation. but what if a server updates its Observable

> Resource by itself without any POST/PUT requests from outside?

> Can current stack send notification automatically in this case?

 

No. The application code needs to call oc_notify_observers() whenever it induces or becomes aware of a change in the resource's state. For e.g., consider the resource's state

as some data structure/value (temperature) that’s just been written into/changed. Application code should be written such that this change somehow leads to an oc_notify_observers()

call. When oc_notify_observers() is called, it makes the stack capture the most current state (by leveraging the resource's GET handler) and sends notifications

with that representation to all of the resource's observers.

 

apps/server_multithread_linux.c has a trivial example of this pattern.

 

Thanks,

-Kishen.

 

 

-- 

Kishen Maloor

Intel Corporation

 

From: Joo-Chul Kevin Lee <cms.rune@...>
Date: Wednesday, July 24, 2019 at 12:08 AM
To: "Maloor, Kishen" <kishen.maloor@...>
Cc: iotivity-dev <iotivity-dev@...>
Subject: Re: [dev] [iotivity-lite] how to handle notification in iotivity-lite?

 

Hi Kishen,

 

I'm very happy to receive your reply!

I've been waiting for you :)

 

BTW, thank you for explanation.

Some of them matches what I have guessed.

 

But, I have additional question.. please see inline

 

Thanks & BR :)

 

- Kevin

 

On Wed, Jul 24, 2019 at 3:41 PM Maloor, Kishen <kishen.maloor@...> wrote:

Hi Kevin,

 

Notifications are constructed and sent internally by the stack following a few triggers as explained below.

 

Notifications are automatically sent following all POST/PUT requests to any Observable resource. This is handled internally by capturing the

most recent resource state and packaging it into a notification.

==> Basically I understand this situation. but what if a server updates its Observable Resource by itself without any POST/PUT requests from outside?

Can current stack send notification automatically in this case?

 

The resource's state is whatever is usually read by the GET handler of the resource.

 

If you want notifications to be periodic, you must use  oc_resource_set_periodic_observable() on the resource specifying a frequency of that

observation. In this case, the stack internally polls the resource and sends out a notification with its most recent state every time a notification is scheduled.

The application doesn't have to do thing.

 

If you need to send notifications asynchronously, you will instead use  oc_resource_set_observable() on the resource, and later call oc_notify_observers()

(synchronizing with oc_main_poll()) from any task in your application that produces a change in the resource's state (again data structures

read by the resource's GET handler).

 

-Kishen.

 

-- 

Kishen Maloor

Intel Corporation

 

From: <iotivity-dev@...> on behalf of Joo-Chul Lee <cms.rune@...>
Date: Tuesday, July 23, 2019 at 7:28 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] [iotivity-lite] how to handle notification in iotivity-lite?

 

Hi iotivity folks,

 

I have a question about notification mechanism in IoTivity-lite.
In IoTivity classic, server can check existence of “observe option” in callback function registered to specific Resource.
and therefore the server can send following notification responses based on its notification logic.

However, I can’t find such codes in IoTivity-lite samples.
How can server know if there is “observe option” in request message?
Could anyone explain how notification works in IoTivity-lite 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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Re: [iotivity-lite] how to handle notification in iotivity-lite?

Joo-Chul Lee
 

Hi Kishen,

I'm very happy to receive your reply!
I've been waiting for you :)

BTW, thank you for explanation.
Some of them matches what I have guessed.

But, I have additional question.. please see inline

Thanks & BR :)

- Kevin

On Wed, Jul 24, 2019 at 3:41 PM Maloor, Kishen <kishen.maloor@...> wrote:

Hi Kevin,

 

Notifications are constructed and sent internally by the stack following a few triggers as explained below.

 

Notifications are automatically sent following all POST/PUT requests to any Observable resource. This is handled internally by capturing the

most recent resource state and packaging it into a notification.

==> Basically I understand this situation. but what if a server updates its Observable Resource by itself without any POST/PUT requests from outside?
Can current stack send notification automatically in this case?

 

The resource's state is whatever is usually read by the GET handler of the resource.

 

If you want notifications to be periodic, you must use  oc_resource_set_periodic_observable() on the resource specifying a frequency of that

observation. In this case, the stack internally polls the resource and sends out a notification with its most recent state every time a notification is scheduled.

The application doesn't have to do thing.

 

If you need to send notifications asynchronously, you will instead use  oc_resource_set_observable() on the resource, and later call oc_notify_observers()

(synchronizing with oc_main_poll()) from any task in your application that produces a change in the resource's state (again data structures

read by the resource's GET handler).

 

-Kishen.

 

-- 

Kishen Maloor

Intel Corporation

 

From: <iotivity-dev@...> on behalf of Joo-Chul Lee <cms.rune@...>
Date: Tuesday, July 23, 2019 at 7:28 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] [iotivity-lite] how to handle notification in iotivity-lite?

 

Hi iotivity folks,

 

I have a question about notification mechanism in IoTivity-lite.
In IoTivity classic, server can check existence of “observe option” in callback function registered to specific Resource.
and therefore the server can send following notification responses based on its notification logic.

However, I can’t find such codes in IoTivity-lite samples.
How can server know if there is “observe option” in request message?
Could anyone explain how notification works in IoTivity-lite 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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Re: [iotivity-lite] how to handle notification in iotivity-lite?

Kishen Maloor
 

Hi Kevin,

 

Notifications are constructed and sent internally by the stack following a few triggers as explained below.

 

Notifications are automatically sent following all POST/PUT requests to any Observable resource. This is handled internally by capturing the

most recent resource state and packaging it into a notification.

 

The resource's state is whatever is usually read by the GET handler of the resource.

 

If you want notifications to be periodic, you must use  oc_resource_set_periodic_observable() on the resource specifying a frequency of that

observation. In this case, the stack internally polls the resource and sends out a notification with its most recent state every time a notification is scheduled.

The application doesn't have to do thing.

 

If you need to send notifications asynchronously, you will instead use  oc_resource_set_observable() on the resource, and later call oc_notify_observers()

(synchronizing with oc_main_poll()) from any task in your application that produces a change in the resource's state (again data structures

read by the resource's GET handler).

 

-Kishen.

 

-- 

Kishen Maloor

Intel Corporation

 

From: <iotivity-dev@...> on behalf of Joo-Chul Lee <cms.rune@...>
Date: Tuesday, July 23, 2019 at 7:28 PM
To: iotivity-dev <iotivity-dev@...>
Subject: [dev] [iotivity-lite] how to handle notification in iotivity-lite?

 

Hi iotivity folks,

 

I have a question about notification mechanism in IoTivity-lite.
In IoTivity classic, server can check existence of “observe option” in callback function registered to specific Resource.
and therefore the server can send following notification responses based on its notification logic.

However, I can’t find such codes in IoTivity-lite samples.
How can server know if there is “observe option” in request message?
Could anyone explain how notification works in IoTivity-lite 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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


[iotivity-lite] how to handle notification in iotivity-lite?

Joo-Chul Lee
 

Hi iotivity folks,

I have a question about notification mechanism in IoTivity-lite.
In IoTivity classic, server can check existence of “observe option” in callback function registered to specific Resource.
and therefore the server can send following notification responses based on its notification logic.

However, I can’t find such codes in IoTivity-lite samples.
How can server know if there is “observe option” in request message?
Could anyone explain how notification works in IoTivity-lite 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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+