Merge "Merge remote-tracking branch 'origin/master' into notification-service" into...
[platform/upstream/iotivity.git] / resource / csdk / stack / samples / tizen / README.txt
1 Prerequisites
2 =============
3
4 1) Clone tinycbor library using following command from the path "iotivity/extlibs/tinycbor":
5    git clone https://github.com/01org/tinycbor.git extlibs/tinycbor/tinycbor
6 2) To build with SECURITY=1, download sqlite3 zip file and extract it. Copy the files 
7    sqlite3.c and sqlite3.h file to iotivity/extlibs/sqlite3/ folder.
8    Download using http://www.sqlite.org/2015/sqlite-amalgamation-3081101.zip
9
10 Build Procedure
11 ===============
12
13 1) If you are building first time, then delete GBS-ROOT-RI folder from home directory.
14    Note: Default build server URL for Tizen is set in gbs configuration file @ iotivity/tools/tizen/.gbs.conf.
15          If needed, same can be modified as per appropriate target.
16 2) Go to "iotivity/" folder.
17 3) Execute following command(s) to start build based on transport selection required :
18     -> Building for all transports :
19     $ scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_OS=tizen TARGET_TRANSPORT=ALL
20
21     -> Building for a specific transport :
22     $ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP
23
24     -> Building for multiple transports :
25     $ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP,BT,BLE
26
27 4) By default, above command will build csdk samples also.
28
29 Note :- Upon successful execution of above command(s) RI library and sample applications will be
30         generated at path "~/GBS-ROOT-RI/local/repos/<target>/armv7l/RPMS".
31
32 Procedure to Execute Sample App:
33 ================================
34     1) Copy the generated rpms(com-oic-ri-0.1-1.armv7l.rpm, com-oic-ri-sample-0.1-1.armv7l.rpm) to Tizen Device
35        (say /opt/usr/media/xxx/)
36     2) sdb shell
37     3) su
38     4) cd /opt/usr/media/xxx/
39     5) change-booting-mode.sh --update
40
41     6) Install the rpms using the following commands:
42                 a) rpm -Uvh com-oic-ri-0.1-1.armv7l.rpm --force --nodeps
43                 b) rpm -Uvh com-oic-ri-sample-0.1-1.armv7l.rpm --force --nodeps
44         7) For IP transport, apply net-config smack rules using below command:
45                 a) chsmack -a "net-config" /usr/apps/com.oic.ri.sample/bin/*
46                 b) chsmack -e "net-config" /usr/apps/com.oic.ri.sample/bin/*
47     7) RPM will be installed in "/usr/apps/"
48        Execute the sample app by below commands
49         i) cd /usr/apps/com.oic.ri.sample/bin
50                         a) ./ocserver -o0 [For Server sample]
51                         b) ./occlient -t2 [For client sample]
52                         c) ./ocrouting [For Gateway sample]