README files updated for testing
authorJongmin Choi <jminl.choi@samsung.com>
Mon, 28 Mar 2016 09:11:37 +0000 (18:11 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Tue, 29 Mar 2016 05:59:21 +0000 (05:59 +0000)
Patch #1: README files updated for Ownership Transfer testing
Patch #2: LD_LIBRARY_PATH setting added
Patch #3: spaces removed

Change-Id: Ibde619776e3853ecbfed0be29388785a6e5e40e4
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7389
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/provisioning/sample/README-Provisioning-Tool.txt
resource/provisioning/examples/README-Provisioning-Tool-CPP.txt [new file with mode: 0644]

index d33178b..88bdba8 100644 (file)
@@ -1,31 +1,62 @@
-LAST UPDATED 7/16/2015
+LAST UPDATED 3/28/2016
 
 To execute Provisioning Tool sample:
 
 1) Build IoTivity with security enabled:
-       $ cd <iotivity-base>
-       $ scons resource SECURED=1
 
+    $ cd <iotivity-base>
+       $ scons resource SECURED=1
+       
 2) Verify Provisioning Tool functionality using secure sample apps:
 
-    Run Resource Server Device which needs to be 'provisioned':
-       $ ./sampleserver_justworks (Just Works)
+    Run Resource Server Device which needs to be 'provisioned' in the directory:
+    $ ./sampleserver_justworks (Just Works)
        or
        $ ./sampleserver_randompin (Random Pin)
-
+       
     Run Provisioning Tool Device:
-       $ ./provisioningclient
-
-    Follow the prompts on Provisioning Tool device and provisioning should be completed
-    successfully.
+    $ ./provisioningclient
+    
+    Provisioning Tool will provide prompts for discovery, ownership transfer, and provisioning.
+
+    Enter 10 (Discover All Un/Owned Devices on Network)
+    and you should see the list of discovered owned and unowned devices.
+    
+    Then enter 20 (Register/Own All Discovered Unowned Devices) to perform ownership transfer
+    between the Server device and the Provisioning Tool device.
+
+    If the random pin server is running, you must enter the PIN code that 
+    appears on the server terminal to finish ownership transfer.
+
+    Enter 12 (Discover Only Owned Devices on Network) to confirm that
+    ownership transfer succeeded. If successful,
+    you should find the Server device on the Owned device list.
+    
+ 3) Verify Ownership Transfer using sample apps:
+
+    If you would like to check whether ownership transfer successfully 
+    created credentials, replace the server and client sample DAT files
+    with oic_svr_db_client.dat and oic_svr_db_server.dat files from the 
+    ownership transfer as follows:
+    $ cp ./oic_svr_db_client.dat <iotivity-base>/out/<...>/release/resource/csdk/stack/samples/linux/secure/oic_svr_db.client.dat
+    $ cp ./oic_svr_db_server_<...>.dat <iotivity-base>/out/<...>/release/resource/csdk/stack/samples/linux/secure/oic_svr_db.server.dat
+
+    Then move to the sample app directory
+    and execute the server and client apps:
+    $ cd <iotivity-base>/out/release/resource/csdk/stack/samples/linux/secure/
+    $ export LD_LIBRARY_PATH=<iotivity-base>/out/<...>/release/
+    $ ./ocserverbasicops
+    $ ./occlientbasicops -u 0 -t 3
+
+    If successful, the client and server should successfully send and receive payloads.
 
     All security functionality operate using CBOR data (DAT files).
     JSON files are for reference only as they are human-readable.
     JSON files are not used by security-related functions.
-
-    If you wish to test functionality with data file different from the 
-    provided default DAT file, modify the JSON files 
-    (oic_svr_db_server_justworks.JSON, oic_svr_db_server_randompin.JSON)
-    and then use the JSON-to-CBOR conversion tool 
+    
+    If you wish to test functionality with data file
+    different from the provided default DAT file, modify the JSON files
+    (oic_svr_db_server_justworks.json, oic_svr_db_server_randompin.json)
+    and then use the JSON-to-CBOR conversion tool
     (<iotivity-base>/out/<...>/release/resource/csdk/security/tool/json2cbor)
     to create a new DAT file.
diff --git a/resource/provisioning/examples/README-Provisioning-Tool-CPP.txt b/resource/provisioning/examples/README-Provisioning-Tool-CPP.txt
new file mode 100644 (file)
index 0000000..1678bdb
--- /dev/null
@@ -0,0 +1,64 @@
+LAST UPDATED 3/28/2016
+
+To execute Provisioning Tool sample:
+
+1) Build IoTivity with security enabled:
+
+    $ cd <iotivity-base>
+       $ scons resource SECURED=1
+
+2) Verify Provisioning Tool functionality using secure sample apps:
+
+    Run Resource Server Device which needs to be 'provisioned' in the directory
+    <iotivity-base>/out/<...>/resource/csdk/security/provisioning/samples:
+    $ <...>/sampleserver_justworks (Just Works)
+       or
+       $ <...>/sampleserver_randompin (Random Pin)
+
+    Run Provisioning Tool Device:
+    $ ./provisioningclient
+
+    Provisioning Tool will provide prompts for discovery, ownership transfer, and provisioning.
+
+    Enter 1 (UnOwned Device discovery)
+    and you should see the list of discovered unowned devices.
+
+    Then enter 3 (Ownership transfer) and the number of device
+    you want to perform ownership transfer between the Server device and
+    the Provisioning Tool device.
+
+    If the random pin server is running, you must enter the PIN code that
+    appears on the server terminal to finish ownership transfer.
+
+    Enter 2 (Owned Device discovery) to confirm that
+    ownership transfer succeeded. If successful,
+    you should find the Server device on the Owned device list.
+
+ 3) Verify Ownership Transfer using sample apps:
+
+    If you would like to check whether ownership transfer successfully
+    created credentials, replace the server and client sample DAT files
+    with oic_svr_db_client.dat and oic_svr_db_server.dat files from the
+    ownership transfer as follows:
+    $ cp ./oic_svr_db_client.dat <iotivity-base>/out/<...>/release/resource/csdk/stack/samples/linux/secure/oic_svr_db.client.dat
+    $ cp <iotivity-base>/out/release/resource/csdk/security/provisioning/samples/oic_svr_db_server_<...>.dat <iotivity-base>/out/<...>/release/resource/csdk/stack/samples/linux/secure/oic_svr_db.server.dat
+
+    Then move to the sample app directory
+    and execute the server and client apps:
+    $ cd <iotivity-base>/out/release/resource/csdk/stack/samples/linux/secure/
+    $ export LD_LIBRARY_PATH=<iotivity-base>/out/<...>/release/
+    $ ./ocserverbasicops
+    $ ./occlientbasicops -u 0 -t 3
+
+    If successful, the client and server should successfully send and receive payloads.
+
+    All security functionality operate using CBOR data (DAT files).
+    JSON files are for reference only as they are human-readable.
+    JSON files are not used by security-related functions.
+
+    If you wish to test functionality with data file
+    different from the provided default DAT file, modify the JSON files
+    (oic_svr_db_server_justworks.json, oic_svr_db_server_randompin.json)
+    and then use the JSON-to-CBOR conversion tool
+    (<iotivity-base>/out/<...>/release/resource/csdk/security/tool/json2cbor)
+    to create a new DAT file.