User Tools

Site Tools


Resource Directory

This page describes the detailed information for Resource Directory service as follows.

Use Case

  • Constrained device that needs to sleep and cannot respond to multicast discovery queries.
  • Power constrained device that cannot keep responding to the multicast queries.
  • Device not in the network and requiring other device to reply on its behalf.


  • Discovering of Resource Directory.
    • Pre-configuration: During on-boarding or via out of band
    • Query oriented: Multicast query at /oic/rd with rt set at oic.wk.rd. Result includes weightage: power, connectivity, CPU, memory and load.
  • Advertisement/Presence: Device advertise about its presence every stipulated period.
    • Publish resources to the resource directory.
    • Selected or all resources are published by the publishing device.
    • Resource type oic.wk.rd is used to publish at /oic/res along with resources information.
    • RD replies to queries on behalf of the publishing device. Publishing device does not respond to multicast queries.
  • Update resources
    • Publishing device needs to update RD about individual or original resource to allow RD to respond to queries on its behalf.
    • Publishing device can delete a single or all resources from RD. This will stop RD from responding to queries.
  • Delete resources
    • Publishing device can delete a single or all resources from RD. This will stop RD from responding to queries.


  • A RD is a separate service that
    • Manufacturer can by default as a resource directory.
    • A user option to set/unset a device as a resource directory.

Detail Design

  • Discovery: startDiscoveryServer handler needed to initialize CAStartIPDiscoveryServer() to initialize Multicast server. Multicast server is used to find a RD.
  • Publish Resource: OCCreateResource does OCCreateResourceRemote based on the details from the multicast discovery.
  • Once this is done, stopDiscoveryServer needs to be called to stop discovery server. This in turns off the multicast server.
  • The broker queries from time to time to see RD status, this is to be done without an aid of the multicast server.
  • If RD is not alive, then multicast server is started again to do the query.
  • It is expected that the discovering device and the publishing device will happen over the unicast channel.
  • Advertisement packets are not intended to be implemented as specified in the specification as it will require multicast server to be running always.
resource_directory.txt · Last modified: 2015/06/02 09:06 by Habib Virji