Topics

Hello, I am Seo Dong-sung, a master researcher at Hanyang University.


서동성 sds1zzang@...
 

Hello, I am Seo Dong-sung, a master researcher at Hanyang University.

 

We contacted you to ask technical questions about IoTivity.

 

Currently, IoTvity version is downloaded from git and is running on Raspberry Pi.

 

I want to add or change the Resource URL in the OCF Server part, but it doesn't work so I send an email. The questions are:

 

1. I want to replace the /oic/res Resource with the resource I specified, /mir/test, but I would like to ask what to do.

I found that /iotivity/examples/OCFSecure changes /oic/res to ocf_svr_db_server_RFNOP.json or ocf_svr_db_server_RFOTM.json, then compiles (sudo scons examples/OCFSecure –j 2 TARGET_TRANSPORT=IP) and the .dat file is changed. It doesn't change, but it doesn't seem to change the URL properly. I would like to know a solution to this. There should be other compilation methods, but I'd like to ask if the .json file is changed to .dat or is it forced to change using the cbor library.

 

2. When I run the current OCF Server sample source, I want to change the payload value and url in /switch to /test, but I know that this part is in switch_introspection.json. However, I changed the /test and additionally changed the resource, but it does not change when I run it.

 

Thank you for your reply.


JayOh
 

Hi there,

1. Resource with URI "/oic/res" is used for resource discovery, and all the other resources (including custom resources) are children of that "/oic/res" resource.
      ex)  /oic/resource        <--- you should send "Get" request to this resource to get the list of custom resources below
              --> /custom/resource1
              --> /custom/resource2
              ....

This means that not only resource-server but also resource-client knows this resource, "/oic/res", and uses it for resource discovery. 
The reason why you were not able to discover the resource "/mir/test" that you want it to be is because you removed the resource "/oic/res".
Don't remove the "/oic/res" resource by changing its name, do register your resource "/mir/test" by using the iotivity-api 
then try again. :) 
 

2. I'd like to suggest you share your codes for better understanding & commenting. :)




2020년 7월 9일 (목) 오전 12:25, 서동성 <sds1zzang@...>님이 작성:

Hello, I am Seo Dong-sung, a master researcher at Hanyang University.

 

We contacted you to ask technical questions about IoTivity.

 

Currently, IoTvity version is downloaded from git and is running on Raspberry Pi.

 

I want to add or change the Resource URL in the OCF Server part, but it doesn't work so I send an email. The questions are:

 

1. I want to replace the /oic/res Resource with the resource I specified, /mir/test, but I would like to ask what to do.

I found that /iotivity/examples/OCFSecure changes /oic/res to ocf_svr_db_server_RFNOP.json or ocf_svr_db_server_RFOTM.json, then compiles (sudo scons examples/OCFSecure –j 2 TARGET_TRANSPORT=IP) and the .dat file is changed. It doesn't change, but it doesn't seem to change the URL properly. I would like to know a solution to this. There should be other compilation methods, but I'd like to ask if the .json file is changed to .dat or is it forced to change using the cbor library.

 

2. When I run the current OCF Server sample source, I want to change the payload value and url in /switch to /test, but I know that this part is in switch_introspection.json. However, I changed the /test and additionally changed the resource, but it does not change when I run it.

 

Thank you for your reply.