oneM2M Logo transparent 196x130

Standards for M2M and the Internet of Things

Discovery

The discovery functionality in oneM2M is implemented using a RETRIEVE operation along with one or multiple filter criteria parameters. In order to enable the retrieve operation for resource discovery, parameter fu (short for filterUsage) is included in the RETRIEVE request as a query string. The parameter drt (short for discovery result type) is set to 2 to indicate that URIs returned in the discovery response are to be in the oneM2M defined unstructured format. In this particular use case, a discovery to find the container resources for the Light ADN-AEs is performed. This is done by specifying a filter criteria parameter rty (short for resource type) and configuring it with a value of 3 (short for container resource type).

Discovery of single light registered with MN-CSE

HTTP Request
    GET /~/mn-cse/home_gateway?fu=1&rty=3&drt=2 HTTP/1.1
    Host: in.provider.com:8080
    X-M2M-Origin: /in-cse/CSmartphone_AE
    X-M2M-RI: mncse-99882
    Accept: application/xml
HTTP Response with XML payload
    HTTP/1.1 200 OK
    X-M2M-RSC: 2000
    X-M2M-RI: mncse-99882
    Content-Type: application/xml
    
    <m2m:uril xmlns:m2m="http://www.onem2m.org/xml/protocols">/mn-cse/cnt-582759912 /mn-cse/cnt-582769893</m2m:uril>
HTTP Request
    GET /~/mn-cse/home_gateway?fu=1&rty=3&drt=2 HTTP/1.1
    Host: in.provider.com:8080
    X-M2M-Origin: /in-cse/CSmartphone_AE
    X-M2M-RI: mncse-99882
    Accept: application/json
HTTP Response with JSON payload
    HTTP/1.1 200 OK
    X-M2M-RSC: 2000
    X-M2M-RI: mncse-99882
    Content-Type: application/json
    
    { "m2m:uril": 
        ["/mn-cse/cnt-582759912", "/mn-cse/cnt-582769893"]
    }

 

Discovery of groups located in MN-CSE

HTTP Request
    GET /~/mn-cse/home_gateway?fu=1&rty=9&drt=2 HTTP/1.1
    Host: in.provider.com:8080
    X-M2M-Origin: /in-cse/CSmartphone_AE
    X-M2M-RI: mncse-15001
    Accept: application/xml
HTTP Response with XML payload
    HTTP/1.1 200 OK
    X-M2M-RSC: 2000
    X-M2M-RI: mncse-15001
    Content-Type: application/xml
    
    <m2m:uril xmlns:m2m="http://www.onem2m.org/xml/protocols">/mn-cse/grp-977978327</m2m:uril>
HTTP Request
    GET /~/mn-cse/home_gateway?fu=1&rty=9&drt=2 HTTP/1.1
    Host: in.provider.com:8080
    X-M2M-Origin: /in-cse/CSmartphone_AE
    X-M2M-RI: mncse-15001
    Accept: application/json
HTTP Response with JSON payload
    HTTP/1.1 200 OK
    X-M2M-RSC: 2000
    X-M2M-RI: mncse-15001
    Content-Type: application/json
    
    { "m2m:uril": 
        ["/mn-cse/grp-977978327"]
    }

Using the discovered group resource, the smartphone application can send retrieve and update requests to a group of resources hosted on the MN-CSE.

Subscribe to oneM2M News Please enter your name and email address, then click on submit.
Alternatively, you can send an email from your preferred email application with a blank subject to
[email protected] with subscribe oneM2M_News in the message body.

Subscribe to oneM2M News

Your Name(*)
Please let us know your name.

Your Email(*)
Please let us know your email address.