Hi,


Looks like this thread is related to /oic/ad resource. Note that this resource 
is removed from spec and will be redefined.



Regards

Dwarka

----------------------------------------------------------------------------------

Software R&D Center | Convergence Team | IoT Lab

Open Connectivity Foundation ? OSWG ? Spec Coordination TG Chair

Iotivity Steering Group ? Advisory Committee



From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of ???
Sent: Friday, September 02, 2016 5:19 PM
To: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Question about presence.



Hi.



that presence occlient has is resource presence.

when new resource is created or changed,

that function is started.



BR,

Jihwan

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

Sender : ??? <ttaem1 at gmail.com <mailto:ttaem1 at gmail.com> >

Date : 2016-09-02 17:06 (GMT+9)

Title : Re: [dev] Question about presence.



I have one more question. 



1. ./presenceclient -t 4

2. ./ocserver -o 1



When I do this, presence callback is called whenever resource is created.



I already know presence function is related to device.



This behavior seems to be strange.



I think presence callback must be called when new device appear. 



How do you think about this?



Thank you very much.



2016-09-02 16:02 GMT+09:00 ??? <jihwan.seo at samsung.com <mailto:jihwan.seo at 
samsung.com> >:

Hi ??



right. multicast presence has some issue in occlient app. (t 16)

it was worked as unicast presence with IPv4 multicast address.



if you want to run the option in occlient.

please find below changeset.

https://gerrit.iotivity.org/gerrit/#/c/11329/



and if you want to know what resource was changed,

to make easy of get new resource, it is better to call findresouce again. i 
think



Thank you for your confirm.



BR,

Jihwan.



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

Sender : ??? <ttaem1 at gmail.com <mailto:ttaem1 at gmail.com> >

Date : 2016-09-02 14:51 (GMT+9)

Title : Re: [dev] Question about presence.



Thank you for your reply 



I am sorry, I used -t 16 option



After executing ./occlient -t 16, I executed ./ocserver -o 1



but, Nothing happend.



so, I found another example "./presenceclient -t 4"



1. ./presenceclient -t 4

2. ./ocserver -o 1



The result was fine.



cklee at 
cklee-desktop:~/work/iotivity/out/linux/x86_64/release/resource/examples$ 
./presenceclient -t 4
Created Platform...
Subscribed to multicast presence.
Received presence notification from : 192.168.10.125
In presenceHandler: Nonce# 2931645225
Received presence notification from : 192.168.10.125
In presenceHandler: Nonce# 942494190
Received presence notification from : 192.168.10.125
In presenceHandler: Nonce# 534584721
Received presence notification from : 192.168.10.125
In presenceHandler: Nonce# 1517390830
Received presence notification from : 192.168.10.125
In presenceHandler: Nonce# 4085107204
Received presence notification from : 192.168.10.125
In presenceHandler: Nonce# 1993083079
Received presence notification from : 192.168.10.125
In presenceHandler: Nonce# 2271273050
Received presence notification from : 192.168.10.125
In presenceHandler: Presence Stopped



But, How can i know about server's resources.??



presence function can't find about device's resources as you said ? 



If so, I will play with observe function.



Thank you~



Best Regards,



cklee





2016-09-02 14:28 GMT+09:00 ??? <jihwan.seo at samsung.com <mailto:jihwan.seo at 
samsung.com> >:

Hi.



it seems work as well.

you know "13" is just for the unicast presence.

it means you can get presence callback for the address you selected through URI.



when you try to execute ocserver/occlient

you can find executing to subscribe presence with URI which has IPv6 address 
like below log.




Executing InitPresence
02:40.814 INFO: OIC_RI_STACK: Entering OCDoResource
...
02:40.814 INFO: OIC_RI_CLIENTCB: Added Callback for uri : 
coap://[fe80::ea11:32ff:fe36:bbca%25eth0]:54691/oic/ad 



and then there are some responses which has oic/ad URI and IPv6 address. 


02:42.814 ERROR: OIC_RI_STACK: check for unicast presence
02:42.814 INFO: OIC_RI_CLIENTCB: Looking for uri 
coap://[fe80::ea11:32ff:fe36:bbca%25eth0]:54691/oic/ad
02:42.814 INFO: OIC_RI_CLIENTCB:  Found /oic/res
02:42.814 INFO: OIC_RI_CLIENTCB:  Found 
coap://[fe80::ea11:32ff:fe36:bbca%25eth0]:54691/oic/ad
...
02:42.814 INFO: occlient: Callback Context for Presence recvd successfully
02:42.814 INFO: occlient: StackResult: OC_STACK_OK
02:42.814 INFO: occlient: Callback Context for Presence notification recvd 
successfully 0
02:42.814 INFO: PayloadLog: Payload Type: Presence
02:42.814 INFO: PayloadLog:  Sequence Number:172134293
02:42.814 INFO: PayloadLog:  Max Age:60
02:42.814 INFO: PayloadLog:  Trigger:change
02:42.814 INFO: PayloadLog:  Resource Type:oic.wk.ad <http://oic.wk.ad> 
02:42.814 INFO: occlient: =============> Presence Response




presence is handling only oic/ad resource.

if you want to handle general resource like oic/led, oic/fan.

please use observe function.



BR,

Jihwan



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

Sender : ??? <ttaem1 at gmail.com <mailto:ttaem1 at gmail.com> >

Date : 2016-09-01 20:01 (GMT+9)

Title : [dev] Question about presence.



Hi, All 



I am testing with occlient & ocserver.



First, I ran ocserver,



and I ran occlient with option -t 13, 



I thought that occlient would receive presence about ocserver (core.fan, 
core.led)



but, Nothing happened.



I want to get information new device resources while client is running.



Thank you.



Best Regards,

cklee





_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org <mailto:iotivity-dev at lists.iotivity.org> 
https://lists.iotivity.org/mailman/listinfo/iotivity-dev










_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org <mailto:iotivity-dev at lists.iotivity.org> 
https://lists.iotivity.org/mailman/listinfo/iotivity-dev












_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org <mailto:iotivity-dev at lists.iotivity.org> 
https://lists.iotivity.org/mailman/listinfo/iotivity-dev











  
<http://v70ext.samsung.net/mail/ext/v1/external/status/update?userid=jihwan.seo&do=bWFpbElEPTIwMTYwOTAyMDgxOTIyZXBjbXMxcDVlYmNlNDA3ZTljY2IwZjA2ZDc2NTMxMWVmZDg3MzIyMiZyZWNpcGllbnRBZGRyZXNzPWlvdGl2aXR5LWRldkBsaXN0cy5pb3Rpdml0eS5vcmc_>
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160902/07c26607/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13402 bytes
Desc: not available
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160902/07c26607/attachment.gif>

Reply via email to