User Tools

Site Tools


ipca

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ipca [2017/03/08 18:39]
Soemin Tjong [Device Discovery]
ipca [2017/03/08 18:45] (current)
Soemin Tjong
Line 107: Line 107:
  
  
-When server responds to the request, the set complete callback is called with status.+When server responds to the request, the set complete callback is called with status.
  
     void SetPropertiesCompleteCallback(IPCAStatus result, ​     void SetPropertiesCompleteCallback(IPCAStatus result, ​
Line 123: Line 123:
     }      } 
  
-It is possible that server is offline or fails to respond. ​ For this case, IPCA has built in timer to complete the callback with ''​IPCA_REQUEST_TIMEOUT''​.  ​If there'​s an outstanding Observe request on a resource on this offline device, IPCA indicates ''​IPCA_DEVICE_APPEAR_OFFLINE''​ as the device fails to respond to periodic //ping// to its \oic\d resource.+It is possible that server is offline or fails to respond. ​ For this case, IPCA has built in timer to complete the callback with ''​IPCA_REQUEST_TIMEOUT''​.  ​ 
 +For outstanding Observe request on a resource on this offline device, IPCA indicates ''​IPCA_DEVICE_APPEAR_OFFLINE''​ as the device fails to respond to periodic //ping// to its \oic\d resource.
  
 ===== APIs for Security ===== ===== APIs for Security =====
Line 129: Line 130:
 An IoTivity application can be security onboarded and then, by the device owner, given access control to a device (this is the scenario for using IoTivity Onboarding Tool, OBT) or the application itself can directly access the target device by demonstrating that it knows the shared password with the device (this is the scenario ​ for devices supporting Multiple Ownership Transfer, MOT). An IoTivity application can be security onboarded and then, by the device owner, given access control to a device (this is the scenario for using IoTivity Onboarding Tool, OBT) or the application itself can directly access the target device by demonstrating that it knows the shared password with the device (this is the scenario ​ for devices supporting Multiple Ownership Transfer, MOT).
  
-The code below shows an application with ability to handle both scenarios. ​ It does that by providing 2 callbacks in the ''​IPCASetPasswordCallbacks()''​ API for displaying password (in OBT case) and providing password (in MOT case).+The code below shows an application with ability to handle both scenarios. ​ It does that by providing 2 callbacks in the ''​IPCASetPasswordCallbacks()''​ API for displaying password (in OBT case) and for providing password (in MOT case).
  
     // This application supports Onboarding authentication based on either:     // This application supports Onboarding authentication based on either:
Line 149: Line 150:
     }     }
  
-When an onboarding tool provisions the application,​ the DisplayPasswordCallback ​ is called. ​ The owner is required to key in the password displayed by the application into the OBT app.+When an onboarding tool provisions the application,​ the ''​DisplayPasswordCallback'' ​is called. ​ The device ​owner is required to key in the password displayed by the application into the OBT app.
  
-For direct access to a device ​supporting ​MOT, the application calls ''​IPCARequestAccess()''​ when it gets IPCA_ACCESS_DENIED for operation it requests. ​  For example, if the ''​IPCASetProperties()''​ in earlier example were to return ''​IPCA_ACCESS_DENIED''​ as shown below, the application ​would call ''​IPCARequestAccess()''​ which would start the handshake with the MOT device resulting in the ''​ProvidePasswordCallback()''​ called to the application (as the MOT device requests for shared password that the application or the user of the application must have knowledge of).+For direct access to a device ​that supports ​MOT, the application calls ''​IPCARequestAccess()''​ when it gets ''​IPCA_ACCESS_DENIED'' ​for operation it requests. ​  For example, if the ''​IPCASetProperties()''​ in earlier example were to return ''​IPCA_ACCESS_DENIED''​ as shown below, the application ​could call ''​IPCARequestAccess()''​ which would start the handshake with the MOT device resulting in the ''​ProvidePasswordCallback()'' ​being called to the application (as the MOT device requests for shared password that the application or the user of the application must have knowledge of).
  
     void SetPropertiesCompleteCallback (     void SetPropertiesCompleteCallback (
ipca.txt · Last modified: 2017/03/08 18:45 by Soemin Tjong