3 To execute Provisioning Tool sample:
5 1) Build IoTivity with security enabled:
8 $ scons resource SECURED=1
10 2) Verify Provisioning Tool functionality using secure sample apps:
12 Run Resource Server Device which needs to be 'provisioned' in the directory
13 <iotivity-base>/out/<...>/resource/csdk/security/provisioning/samples:
14 $ <...>/sampleserver_justworks (Just Works)
16 $ <...>/sampleserver_randompin (Random Pin)
18 Run Provisioning Tool Device:
19 $ ./provisioningclient
21 Provisioning Tool will provide prompts for discovery, ownership transfer, and provisioning.
23 Enter 1 (UnOwned Device discovery)
24 and you should see the list of discovered unowned devices.
26 Then enter 3 (Ownership transfer) and the number of device
27 you want to perform ownership transfer between the Server device and
28 the Provisioning Tool device.
30 If the random pin server is running, you must enter the PIN code that
31 appears on the server terminal to finish ownership transfer.
33 Enter 2 (Owned Device discovery) to confirm that
34 ownership transfer succeeded. If successful,
35 you should find the Server device on the Owned device list.
37 3) Verify Ownership Transfer using sample apps:
39 If you would like to check whether ownership transfer successfully
40 created credentials, replace the server and client sample DAT files
41 with oic_svr_db_client.dat and oic_svr_db_server.dat files from the
42 ownership transfer as follows:
43 $ cp ./oic_svr_db_client.dat <iotivity-base>/out/<...>/release/resource/csdk/stack/samples/linux/secure/oic_svr_db.client.dat
44 $ 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
46 Then move to the sample app directory
47 and execute the server and client apps:
48 $ cd <iotivity-base>/out/release/resource/csdk/stack/samples/linux/secure/
49 $ export LD_LIBRARY_PATH=<iotivity-base>/out/<...>/release/
51 $ ./occlientbasicops -u 0 -t 3
53 If successful, the client and server should successfully send and receive payloads.
55 All security functionality operate using CBOR data (DAT files).
56 JSON files are for reference only as they are human-readable.
57 JSON files are not used by security-related functions.
59 If you wish to test functionality with data file
60 different from the provided default DAT file, modify the JSON files
61 (oic_svr_db_server_justworks.json, oic_svr_db_server_randompin.json)
62 and then use the JSON-to-CBOR conversion tool
63 (<iotivity-base>/out/<...>/release/resource/csdk/security/tool/json2cbor)
64 to create a new DAT file.