1 LAST UPDATED 11/20/2016
3 To prepare the environment for building IoTivity:
5 1) Install the tools and libraries for building IoTivity by following the
6 instructions in the <iotivity-base>/Readme.scons.txt file.
8 2) In addition, install the sqlite3 developer library:
9 $ sudo apt-get install libsqlite3-dev
11 3) Finally, download the mbedtls library:
12 $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls
14 To build the IoTivity stack with the security features enabled (required for
17 1) Build IoTivity with security enabled:
21 2) Verify functionality using secure sample apps:
22 $ cd <iotivity-base>/out/<...>/release/resource/csdk/stack/samples/linux/secure
23 $ export LD_LIBRARY_PATH=<iotivity-base>/out/<...>/release
24 $ ./ocserverbasicops &
25 $ ./occlientbasicops -t 1
26 NOTE: Console messages below indicate success (may not be at bottom of
27 response printout... search up a page or so on the console):
28 "INFO: occlientbasicops: Uri -- /a/led
29 INFO: occlientbasicops: SECUREPORT udp: 51516 <-- actual port may differ
30 INFO: occlientbasicops: Secure -- YES"
31 Press <ctrl-c> to quit occlientbasicops, then run:
32 $ ./occlientbasicops -t 2
33 NOTE: receipt of of 'Get Response', 'Put Response' and 'Post Response'
34 from /a/led indicates success.
36 "33:43.222 INFO: occlientbasicops: Callback Context for PUT recvd successfully
37 33:43.222 INFO: occlientbasicops: StackResult: OC_STACK_UNAUTHORIZED_REQ
38 33:43.222 INFO: PayloadLog: NULL Payload
39 33:43.222 INFO: occlientbasicops: =============> Put Response
40 33:43.326 INFO: occlientbasicops: Callback Context for POST recvd successfully
41 33:43.326 INFO: occlientbasicops: StackResult: UNKNOWN
42 33:43.326 INFO: PayloadLog: Payload Type: Representation
43 33:43.326 INFO: PayloadLog: Resource #1
44 33:43.326 INFO: PayloadLog: Values:
45 33:43.326 INFO: PayloadLog: createduri(string):/a/led/0
46 33:43.326 INFO: occlientbasicops: =============> Post Response
47 33:43.426 INFO: occlientbasicops: Callback Context for POST recvd successfully
48 33:43.426 INFO: occlientbasicops: StackResult: UNKNOWN
49 33:43.426 INFO: PayloadLog: Payload Type: Representation
50 33:43.426 INFO: PayloadLog: Resource #1
51 33:43.426 INFO: PayloadLog: Values:
52 33:43.426 INFO: PayloadLog: createduri(string):/a/led/1
53 33:43.426 INFO: occlientbasicops: =============> Post Response
54 33:43.526 INFO: occlientbasicops: Callback Context for POST recvd successfully
55 33:43.526 INFO: occlientbasicops: StackResult: UNKNOWN
56 33:43.526 INFO: PayloadLog: Payload Type: Representation
57 33:43.526 INFO: PayloadLog: Resource #1
58 33:43.526 INFO: PayloadLog: Values:
59 33:43.526 INFO: PayloadLog: state(bool):true
60 33:43.526 INFO: PayloadLog: power(int):15
61 33:43.526 INFO: occlientbasicops: =============> Post Response"