From: saerome.kim Date: Wed, 7 Mar 2018 05:48:34 +0000 (+0900) Subject: update README.md X-Git-Tag: submit/tizen/20190131.065036~102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a486eda2a442c89a10e94b20036f32ffaa13182;p=platform%2Fcore%2Fapi%2Fmulti-device-group.git update README.md Signed-off-by: saerome.kim --- diff --git a/README.md b/README.md index 2849e30..3d4ed9e 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,16 @@ # d2d-manager - To test d2d-manager and sample apps, you must build iotivity locally with following modifications: -1. build_common/SConscript - +### 1. build_common/SConscript +```sh defines.append('-DMULTIPLE_OWNER=1') - -2. packaging/iotivity.spec +``` +### 2. packaging/iotivity.spec +```sh %{!?MULTIPLE_OWNER: %define MULTIPLE_OWNER 1} - @@ -268,6 +270,14 @@ cp ./resource/csdk/security/provisioning/sample/oic_svr_db_server_preconfpin.dat %{ex_install_dir}/provision-sample/ cp ./extlibs/cjson/cJSON.h %{buildroot}%{_includedir} cp -R ./resource/csdk/connectivity/lib/libcoap-4.1.1/include/* %{buildroot}%{_includedir} - @@ -259,6 +259,14 @@ cp ./resource/csdk/security/include/*.h %{buildroot}%{_includedir} cp ./resource/csdk/connectivity/api/*.h %{buildroot}%{_includedir}/ cp ./resource/csdk/security/include/internal/*.h %{buildroot}%{_includedir}/ @@ -25,48 +23,42 @@ cp -R ./resource/csdk/connectivity/lib/libcoap-4.1.1/include/* %{buildroot}%{_in +cp out/%{TARGET_OS}/%{TARGET_ARCH}/%{build_mode}/resource/csdk/security/provisioning/sample/sampleserver_preconfpin %{ex_install_dir +cp ./resource/csdk/security/provisioning/sample/oic_svr_db_server_preconfpin.dat %{ex_install_dir}/provision-sample/ +%endif +``` After iotivity build succeeds, copy the following package to GBS-ROOT. -~/GBS-ROOT/unified-standard/local/repos/unified_standard/armv7l/RPMS/ - -iotivity-1.2.1-9.armv7l.rpm -iotivity-devel-1.2.1-9.armv7l.rpm +* iotivity-1.2.1-9.armv7l.rpm +* iotivity-devel-1.2.1-9.armv7l.rpm +**Example** +```sh +~/GBS-ROOT/unified-standard/local/repos/unified_standard/armv7l/RPMS/ +``` # build script - If you want to build and install the d2d manager easily, use the following guide. - -1. modify git path variable in {git_path}/material/script/d2d_build.sh & d2d_install.sh script - +### 1. modify git path variable in {git_path}/material/script/d2d_build.sh & d2d_install.sh script ex) git_path="/data/workspace/d2d-manager" - -2. copy install script in /usr/bin - +### 2. copy install script in /usr/bin ex) sudo cp d2d_install.sh /usr/bin - -3. execute d2d_install.sh - +### 3. execute d2d_install.sh ex) $ d2d_install.sh - # How to test d2d-subowner - -Assumption) We have 2~3 physical devices such as TM1 or U3. Our devices are in same IP subnet. - -Pre-conditions) Execute 2 sampleserver_justworks which has Preconfigured PIN security option (key. 12341234) +**Assumption)** We have 2~3 physical devices such as TM1 or U3. Our devices are in same IP subnet. +**Pre-conditions)** Execute 2 sampleserver_justworks which has Preconfigured PIN security option (key. 12341234) +**Example)** At physical device#1, run sampleserver_justworks (ex. its uuid: 5c7ad9ac-836b-4ac0-92a8-ca516f9e8dd4) At physical device#2, run sampleserver_justworks (ex. 2nd server's uuid: e4854ed5-65d1-4cc7-8766-3fb7a35e283a) -Test Method) +## Test Method) At physical device#2, we execute mdbus2 like below - -1. Enable d2d-subowner - +### 1. Enable d2d-subowner +```sh sh-3.2# mdbus2 -s -i MDBUS2> net.d2ds.enabler /net/d2ds/enabler net.d2ds.enabler.enable (0,) - +``` +```sh saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 10:23:35.029+0900 D/D2D_SUBOWNER(14781): d2ds.c: main(40) > Enter 01-01 10:23:35.030+0900 I/D2D_SUBOWNER(14781): d2ds.c: main(53) > service mainloop start @@ -77,27 +69,38 @@ saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 10:23:35.056+0900 D/D2D_SUBOWNER(14781): d2ds-service-interface.c: _d2ds_dbus_on_name_acquired(305) > Acquired the name net.d2ds 01-01 10:23:35.063+0900 D/D2D_SUBOWNER(14781): d2ds-service-interface.c: _d2ds_dbus_handle_enable(315) > Enter 01-01 10:23:35.526+0900 D/D2D_SUBOWNER(14781): d2ds-service-interface.c: _d2ds_dbus_handle_enable(331) > Quit +``` -2. Get d2d-subowner's device ID +### 2. Get d2d-subowner's device ID +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.get_ownerid ('e5d11e8c-7e04-0e9f-fe9f-4bc362f94318', 0) +``` +```sh saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 10:23:42.626+0900 D/D2D_SUBOWNER(14781): d2ds-subowner.c: d2ds_request_get_ownerid(1525) > [IPC] Get Device ID +``` -3. Find MOT enabled devices in a network +### 3. Find MOT enabled devices in a network + +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.disc_mot_enb_devs (0,) +``` +```sh saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 09:07:40.351+0900 D/D2D_SUBOWNER( 4721): d2ds-subowner.c: d2ds_request_disc_mot_enb_devs(1400) > [IPC] Discovery MOT enabled devices 01-01 09:07:40.351+0900 I/D2D_SUBOWNER( 4721): d2ds-subowner.c: _disc_mot_env_devs_func(672) > Discovering Multiple Ownership Transfer enabled Devices on Network.. 01-01 09:07:44.358+0900 I/D2D_SUBOWNER( 4721): d2ds-subowner.c: _print_no_uuid(219) > [1] 5c7ad9ac-836b-4ac0-92a8-ca516f9e8dd4 01-01 09:07:44.358+0900 I/D2D_SUBOWNER( 4721): d2ds-subowner.c: _print_no_uuid(219) > [2] e4854ed5-65d1-4cc7-8766-3fb7a35e283a 01-01 09:07:44.358+0900 D/D2D_SUBOWNER( 4721): d2ds-subowner.c: __notify_found_devs(590) > Found 2 MOT enabled devices -01-01 09:07:44.359+0900 I/D2D_SUBOWNER( 4721): d2ds-subowner.c: __notify_found_devs(633) > �doxms� +01-01 09:07:44.359+0900 I/D2D_SUBOWNER( 4721): d2ds-subowner.c: __notify_found_devs(633) > ?doxms? +``` +```sh saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb shell dbus-monitor --system "sender='net.d2ds'" method return time=1515149361.403747 sender=:1.50 -> destination=:1.49 serial=29 reply_serial=29 int32 0 @@ -154,20 +157,30 @@ signal time=1515149365.404783 sender=:1.50 -> destination=(null destination) ser ) ] ] +``` +### 4. MOT sampleserver_justworks in device#1 -4. MOT sampleserver_justworks in device#1 +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.mot 5c7ad9ac-836b-4ac0-92a8-ca516f9e8dd4 12341234 (0,) +``` + +### 5. MOT sampleserver_justworks in device#2 -5. MOT sampleserver_justworks in device#2 +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.mot e4854ed5-65d1-4cc7-8766-3fb7a35e283a 12341234 (0,) +``` -6. Find owned devices in a network +### 6. Find owned devices in a network + +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.disc_mowned_devs (0,) +``` +```sh saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 09:08:21.418+0900 D/D2D_SUBOWNER( 4721): d2ds-subowner.c: d2ds_request_disc_owned_devs(1420) > [IPC] Discovery Owned devices using MOT 01-01 09:08:21.418+0900 D/D2D_SUBOWNER( 4721): d2ds-subowner.c: _disc_owned_devs_func(721) > Discovering Multiple Owned Devices on Network. @@ -176,20 +189,30 @@ saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 09:08:30.358+0900 I/D2D_SUBOWNER( 4721): d2ds-subowner.c: _print_no_uuid(219) > [1] 5c7ad9ac-836b-4ac0-92a8-ca516f9e8dd4 01-01 09:08:30.358+0900 I/D2D_SUBOWNER( 4721): d2ds-subowner.c: _print_no_uuid(219) > [2] e4854ed5-65d1-4cc7-8766-3fb7a35e283a 01-01 09:08:30.358+0900 D/D2D_SUBOWNER( 4721): d2ds-subowner.c: __notify_found_devs(590) > Found 2 MOT enabled devices +``` +### 7. ACL Provisioning sampleserver_justworks in device#1 -7. ACL Provisioning sampleserver_justworks in device#1 +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.prov_acl e4854ed5-65d1-4cc7-8766-3fb7a35e283a 5c7ad9ac-836b-4ac0-92a8-ca516f9e8dd4 /a/led core.led oic.if.baseline 31 -(0, +(0,) +``` -7. ACL Provisioning sampleserver_justworks in device#2 +### 8. ACL Provisioning sampleserver_justworks in device#2 + +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.prov_acl 7ad10436-525b-4f4c-890b-84a0f3ad66aa e4854ed5-65d1-4cc7-8766-3fb7a35e283a /a/led core.led oic.if.baseline 31 (0,) +``` + +### 9. Make both sampleserver_justworks pairwise -8. Make both sampleserver_justworks pairwise +```sh MDBUS2> net.d2ds /net/d2ds net.d2ds.prov_cred f9dfa1a0-f989-4c31-a08c-32b0d0178058 c520f48f-ed51-4986-8c45-47bfb7e8d8bc (0,) +``` +```sh saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 10:09:12.288+0900 D/D2D_SUBOWNER(13505): d2ds-subowner.c: d2ds_request_prov_cred(1304) > [IPC] Provisioning Credential 01-01 10:09:12.288+0900 I/D2D_SUBOWNER(13505): d2ds-subowner.c: _print_uuid(187) > 7b6a3d68-d9cb-4197-bb1f-631fb908f140 @@ -197,3 +220,7 @@ saerome.kim@lx:~/github_sec/d2d-manager (tizen)$ sdb dlog -v time D2D_SUBOWNER 01-01 10:09:12.288+0900 I/D2D_SUBOWNER(13505): d2ds-subowner.c: _print_uuid(187) > 7b6a3d68-d9cb-4197-bb1f-631fb908f140 01-01 10:09:12.288+0900 I/D2D_SUBOWNER(13505): d2ds-subowner.c: _cred_provisioning_func(1099) > Provisioning Selected Pairwise Devices.. 01-01 10:09:12.829+0900 I/D2D_SUBOWNER(13505): d2ds-subowner.c: _cred_provisioning_func(1115) > > Provisioned Selected Pairwise Devices +``` + + +