Difference between revisions of "ARM/Advantech integration camp"

From ESS-WIKI
Jump to: navigation, search
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= '''mbed-Cloud FW upgrade feature for WISE-3610''' =
 
= '''mbed-Cloud FW upgrade feature for WISE-3610''' =
  
'''( refer to ADV integration camp - Update slides.pdf )'''
+
( You can get detail information refer to ADV integration camp - [[Media:ADV_integration_camp_-_Update_slides.pdf|ADV integration camp - Update slides.pdf]] )
  
  
Line 10: Line 10:
 
<pre dir="ltr">$cd WISE-3610-BSP/qsdk/package/network/utils/
 
<pre dir="ltr">$cd WISE-3610-BSP/qsdk/package/network/utils/
 
$rm -r mbed
 
$rm -r mbed
$git clone --branch openwrt_package [https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential] mbed</pre>
+
$git clone --branch openwrt_package https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential mbed</pre>
 
<ol start="2">
 
<ol start="2">
 
<li>'''Create Certificates Key'''</li>
 
<li>'''Create Certificates Key'''</li>
 
</ol>
 
</ol>
  
'''[https://lh3.googleusercontent.com/rr7-10wk1qtuWGyz8iqJh0ouUbER6acvobt1KcdoIkV45yqdmL4VwQxDkbk5Hs0AeNhtes3ysSz6SDQQ17vz11T56od48AfbwHV_pxopGE12wxS28p7e3_maSI3p4K4AwZH_SVoJ https://lh3.googleusercontent.com/rr7-10wk1qtuWGyz8iqJh0ouUbER6acvobt1KcdoIkV45yqdmL4VwQxDkbk5Hs0AeNhtes3ysSz6SDQQ17vz11T56od48AfbwHV_pxopGE12wxS28p7e3_maSI3p4K4AwZH_SVoJ]'''
+
[[File:Mbed cloud training 1.jpg|RTENOTITLE]]
  
'''[https://lh5.googleusercontent.com/Bv4Xtcn_MdVA_ywYhK_IYS3bTZJPwc3TN9cta-wTJmjJcqfo7P7mF9xaYUFeDDBCPiW2uPJBZwLiFPIrJTUStMfsPYjWAARnaNutTrxG9mYp1_rXFn5Q5NAwkY9EMorVq_U80VEx https://lh5.googleusercontent.com/Bv4Xtcn_MdVA_ywYhK_IYS3bTZJPwc3TN9cta-wTJmjJcqfo7P7mF9xaYUFeDDBCPiW2uPJBZwLiFPIrJTUStMfsPYjWAARnaNutTrxG9mYp1_rXFn5Q5NAwkY9EMorVq_U80VEx]'''
+
[[File:Mbed cloud training 2.jpg|RTENOTITLE]]
  
<br/><br/>&nbsp;&nbsp; &nbsp; 3.&nbsp;'''Download &nbsp;mbed_cloud_dev_credentials.c C code for mbed-Cloud auth'''
+
&nbsp;&nbsp; &nbsp; 3.&nbsp;'''Download &nbsp;mbed_cloud_dev_credentials.c C code for mbed-Cloud auth'''
  
  
  
'''[https://lh3.googleusercontent.com/F7R6TthbutxAbVUSEcpxEaqVJuqYyvNBeVi9-zKY4-RYtHBhFf0tY0fW-_gE2PoeIwFIMj8b4trEb2lnn_vzNHLfLMU-dv8yb7a8XbYDWkwsVsyV0hsxz3khZUZs7KQ_nX4MUEm3 https://lh3.googleusercontent.com/F7R6TthbutxAbVUSEcpxEaqVJuqYyvNBeVi9-zKY4-RYtHBhFf0tY0fW-_gE2PoeIwFIMj8b4trEb2lnn_vzNHLfLMU-dv8yb7a8XbYDWkwsVsyV0hsxz3khZUZs7KQ_nX4MUEm3]'''
+
[[File:Mbed cloud training 3.jpg|RTENOTITLE]]
  
  
Line 62: Line 62:
  
 
== '''To build WISE-3610 image and mbed-client with credential key''' ==
 
== '''To build WISE-3610 image and mbed-client with credential key''' ==
 
+
<pre>cp update_default_resources.c </WISE-3610>/qsdk/package/network/utils/mbed/mbed-cloud-client-example-restricted/
'''cp update_default_resources.c &lt;/WISE-3610&gt;/qsdk/package/network/utils/mbed/mbed-cloud-client-example-restricted/'''
+
export TOOLCHAIN_DIR=`pwd`/qsdk/staging_dir/toolchain-arm_cortex-a7_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/
 
+
make
 
+
</pre>
 
 
'''export TOOLCHAIN_DIR=`pwd`/qsdk/staging_dir/toolchain-arm_cortex-a7_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/'''
 
 
 
 
 
 
 
'''make'''
 
 
 
 
 
  
 
'''To package image'''
 
'''To package image'''
 +
<pre>cd qsdk/package/network/utils/mbed/sdk
 +
#./arm_initial_pack.sh
 +
產生 image folder 裡面有 openwrt-ipq806x-ipq40xx-ubi-root.img
  
 +
                        nand-ipq40xx-initial.img
  
 
+
產生的 nand-ipq40xx-initial.img 裡面會修改 boot partition 參數
'''cd qsdk/package/network/utils/mbed/sdk'''
+
“mkfs.ubifs --space-fixup -m 2048 -e 126976 -c 31 -o ubifs-kcm.img”</pre>
 
 
 
 
 
 
'''#./arm_initial_pack.sh'''
 
 
 
 
 
 
 
'''產生 image folder 裡面有 openwrt-ipq806x-ipq40xx-ubi-root.img'''
 
 
 
'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nand-ipq40xx-initial.img'''
 
 
 
 
 
 
 
'''產生的 nand-ipq40xx-initial.img&nbsp;裡面會修改 boot partition 參數'''
 
 
 
 
 
 
 
'''“mkfs.ubifs --space-fixup -m 2048 -e 126976 -c 31 -o ubifs-kcm.img”'''
 
 
 
 
 
  
 
'''Flash WISE-3610 boot loader by TFTP'''
 
'''Flash WISE-3610 boot loader by TFTP'''
 +
<pre>uboot> set ipaddr 192.168.1.1
 +
uboot> set serverip “Your TFTP Server”
 +
uboot> tftpboot nand-ipq40xx-initial.img
 +
uboot> boot
 +
Upload the new FW Image to mbed-cloud</pre>
  
  
  
'''uboot> set ipaddr 192.168.1.1'''
+
[[File:Mbed cloud training 4.jpg|RTENOTITLE]]
 
 
'''uboot> set serverip “Your TFTP Server”'''
 
 
 
'''uboot> tftpboot nand-ipq40xx-initial.img'''
 
 
 
'''uboot> boot'''
 
 
 
 
 
 
 
'''Upload the new FW Image to mbed-cloud'''
 
 
 
 
 
 
 
'''[https://lh5.googleusercontent.com/9jCkGgMJe-3cyvQME0Qla6Wu91asMNyuXprvytTPdToxaRfuTk7MdlqI1BJY_oQHbxFEsBFCkJj3j8LAjGnYKeI0Y1TkR8A0H28NpA830G5-Wj1Jomx25NNvcDhRovOyy7agKDKN https://lh5.googleusercontent.com/9jCkGgMJe-3cyvQME0Qla6Wu91asMNyuXprvytTPdToxaRfuTk7MdlqI1BJY_oQHbxFEsBFCkJj3j8LAjGnYKeI0Y1TkR8A0H28NpA830G5-Wj1Jomx25NNvcDhRovOyy7agKDKN]'''
 
 
 
 
 
 
 
'''[https://lh3.googleusercontent.com/t9fQfT4NHmBMg2t7a9bV8qjpWW2Yw84si1T8e4fYJNLNWe5EBosvh937D_y9DwukS3qoPBU0Ol-ygLWgN30Mi1NYSr5DOiYmwrdS0x7L0wBr3BAKN7Y_LTlWn9Z8ex7H6rHiXbJi https://lh3.googleusercontent.com/t9fQfT4NHmBMg2t7a9bV8qjpWW2Yw84si1T8e4fYJNLNWe5EBosvh937D_y9DwukS3qoPBU0Ol-ygLWgN30Mi1NYSr5DOiYmwrdS0x7L0wBr3BAKN7Y_LTlWn9Z8ex7H6rHiXbJi]'''
 
 
 
  
 +
[[File:Mbed cloud training 5.jpg|RTENOTITLE]]
  
 
== '''To crate manifest file by manifest-tools''' ==
 
== '''To crate manifest file by manifest-tools''' ==
Line 138: Line 101:
 
== '''Upload the manifest to mbed-Cloud''' ==
 
== '''Upload the manifest to mbed-Cloud''' ==
  
'''[https://lh5.googleusercontent.com/cpHa7vC4Yt_4KkLzpqiDmiG6A8qouDV__bPZ-2sQUulu-hcPGFE0x4NN3-nWRsZvueG3OO0CtItWqVa3lTE7WFula47peFzwKc_eMb8BcN9a63y_ZMrB-TfaV5QXV9Ww505uJqOd https://lh5.googleusercontent.com/cpHa7vC4Yt_4KkLzpqiDmiG6A8qouDV__bPZ-2sQUulu-hcPGFE0x4NN3-nWRsZvueG3OO0CtItWqVa3lTE7WFula47peFzwKc_eMb8BcN9a63y_ZMrB-TfaV5QXV9Ww505uJqOd]'''
+
[[File:Mbed cloud training 6.jpg|RTENOTITLE]]
 
 
 
 
  
 
== '''Create a Camp to do FW update by mbed-Cloud''' ==
 
== '''Create a Camp to do FW update by mbed-Cloud''' ==
  
'''[https://lh6.googleusercontent.com/0Q7kxSqo9kwe5Nt5FoF5sdpQ1K0tCV8xFjAYPLkgNVTKmZ9kDuUBVBPKauE2o41pZ27x4kGJoZjykmjoMuRCPqtbXxytniWKAZmvCVybRH9TXbUWYCZXJ-HMj-Ai98_jVtkp22Bs https://lh6.googleusercontent.com/0Q7kxSqo9kwe5Nt5FoF5sdpQ1K0tCV8xFjAYPLkgNVTKmZ9kDuUBVBPKauE2o41pZ27x4kGJoZjykmjoMuRCPqtbXxytniWKAZmvCVybRH9TXbUWYCZXJ-HMj-Ai98_jVtkp22Bs]'''
+
[[File:Mbed cloud training 7.jpg|RTENOTITLE]]<br/><br/>[[File:Mbed cloud training 8.jpg|RTENOTITLE]]
 
 
 
 
 
 
'''[https://lh4.googleusercontent.com/J0qpVl9v09DgK5Moiw1b8gylqJnkQC5dYr-9BrDM-L3rrNooAARMfNoignQvpUwflkmD7Nwkv3WgofAVtHZMzDTQV8y7ayumIIxV6bf6KtX4kMVGZHrKW6Jq7ZQoG0-dCAhNwR6C https://lh4.googleusercontent.com/J0qpVl9v09DgK5Moiw1b8gylqJnkQC5dYr-9BrDM-L3rrNooAARMfNoignQvpUwflkmD7Nwkv3WgofAVtHZMzDTQV8y7ayumIIxV6bf6KtX4kMVGZHrKW6Jq7ZQoG0-dCAhNwR6C]'''
 
 
 
 
 
  
 
'''You can set filter rule in device director'''
 
'''You can set filter rule in device director'''
  
 +
[[File:Mbed cloud training 9.jpg|RTENOTITLE]]
  
 
+
[[File:Mbed cloud training 10.jpg|RTENOTITLE]]
'''[https://lh3.googleusercontent.com/bu-tPHBjliOgDvaIpWRmfsPimPgvk6LycphTMeO64GYy0CA28XkXV6R79P0UHkq8111PoHl_djlh5m6ZVEZ2ozpAJLTgw_i3bSjqRb3waaBFcS1kJ_XIBk1k3wcqqZ9MEWE3d9d_ https://lh3.googleusercontent.com/bu-tPHBjliOgDvaIpWRmfsPimPgvk6LycphTMeO64GYy0CA28XkXV6R79P0UHkq8111PoHl_djlh5m6ZVEZ2ozpAJLTgw_i3bSjqRb3waaBFcS1kJ_XIBk1k3wcqqZ9MEWE3d9d_]'''
 
 
 
'''[https://lh3.googleusercontent.com/bj97nAfgN8zv0e-BCkZQr4ZQxr1JN0m6ublA23fI9GpU8f5IaWJu5fuI0lAGK7OxZkU0sp9dk2-ADts5ymMXaTC3Wp4ebpbI70gYtV6Vzqcz6Iau8H-gNbiQTD1803qQDUbeXbHM https://lh3.googleusercontent.com/bj97nAfgN8zv0e-BCkZQr4ZQxr1JN0m6ublA23fI9GpU8f5IaWJu5fuI0lAGK7OxZkU0sp9dk2-ADts5ymMXaTC3Wp4ebpbI70gYtV6Vzqcz6Iau8H-gNbiQTD1803qQDUbeXbHM]'''
 
 
 
 
 
  
 
'''Start to update new FW image to devices'''
 
'''Start to update new FW image to devices'''
  
 
+
[[File:Mbed cloud training 11.jpg|RTENOTITLE]]
 
 
'''[https://lh4.googleusercontent.com/Zkp04AzEnrUEZ79cgGahI6PTPjSQoSl6VK8epZHNdnxCorTVVUNkx0U4rwtKrgtydCdSh62GAzMTgJB7C1DMTfQgqrI6dhVIJe5rkVXQ4XQz0bEXUO-BZW5fofGMR9Upkk8wHKuV https://lh4.googleusercontent.com/Zkp04AzEnrUEZ79cgGahI6PTPjSQoSl6VK8epZHNdnxCorTVVUNkx0U4rwtKrgtydCdSh62GAzMTgJB7C1DMTfQgqrI6dhVIJe5rkVXQ4XQz0bEXUO-BZW5fofGMR9Upkk8wHKuV]'''
 
 
 
<br/>
 
  
 
= '''mbed-edge-core''' =
 
= '''mbed-edge-core''' =
Line 179: Line 126:
  
 
'''[https://github.com/ARMmbed/mbed-cloud-edge-confidential-a https://github.com/ARMmbed/mbed-cloud-edge-confidential-a]'''
 
'''[https://github.com/ARMmbed/mbed-cloud-edge-confidential-a https://github.com/ARMmbed/mbed-cloud-edge-confidential-a]'''
 +
 +
  
  
  
 
== '''To build mbed-edge & pt-example & lorapt-example code''' ==
 
== '''To build mbed-edge & pt-example & lorapt-example code''' ==
<pre>$mkdir a new folder /qsdk/package/network/utils/mbed-edge
+
 
 +
'''Method 1: Get from github and download this [[Media:mbed-edge-patch-arm-workshop-20170912.gz|patch]] to patch your source code'''
 +
<pre>##Create a new folder  
 +
$mkdir WISE-3610/qsdk/package/network/utils/mbed-edge
 +
##change to this folder
 +
git clone https://github.com/ARMmbed/mbed-cloud-edge-confidential-a
 +
##To patch this source code for WISE-3610
 
cp Makefile to “mbed-edge” folder
 
cp Makefile to “mbed-edge” folder
 
cp toolchain.cmake to
 
cp toolchain.cmake to
Line 191: Line 146:
  
  
'''To create a “Certificates key” refer to above chapt'''
+
'''Method 2: Dowload the package that hands-on at ARM mbed workshop 20170912'''
 +
 
 +
Download: [[Media:mbed-edge-arm-workshop-20170912.gz|mbed-edge-arm-workshop-20170912.gz]]
 +
 
 +
cd ~/WISE-3610/qsdk/package/network/utils/<br/>tar xvzf mbed-edge-arm-workshop-20170912.gz
 +
 
 +
<span style="font-size:larger;">'''To create a “Certificates key” refer to above [[Media:Advantech_integration_camp#To_build_FW.C2.A0image_modify_by_ARM.C2.A0|section]]'''</span>
  
  
  
'''download C code form mbed-cloud mbed_cloud_dev_credentials.c'''
+
<span style="font-size:larger;">'''To Download C code form mbed-cloud mbed_cloud_dev_credentials.c&nbsp; &nbsp;=> <span style="color:#FF0000;">This file with mbed-cloud's credntials key</span>'''</span>
 
<pre>$cp to “mbed-cloud-edge-confidential-a/client-wrapper/mbed_cloud_dev_credentials.c”
 
<pre>$cp to “mbed-cloud-edge-confidential-a/client-wrapper/mbed_cloud_dev_credentials.c”
$cd to WISE-3610 BSP Top folder to build image
+
</pre>
$make</pre>
+
 
 +
'''To build mbed-edge only'''
 +
<pre>$cd WISE-3610/
 +
 
 +
$export TOOLCHAIN_DIR=`pwd`/qsdk/staging_dir/toolchain-arm_cortex-a7_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/
 +
 
 +
$cd ./qsdk
 +
 
 +
$make package/mbed-edge/clean package/mbed-edge/prepare package/mbed-edge/compile V=s -j 8</pre>
 +
 
 +
'''Copy programs to WISE-3610 Target'''
 +
<pre>## edge-core at
 +
./staging_dir/target-arm_cortex-a7_uClibc-0.9.33.2_eabi/root-ipq806x/usr/sbin/edge-core
 +
## lorapt-example
 +
./build_dir/target-arm_cortex-a7_uClibc-0.9.33.2_eabi/mbed-edge/mbed-cloud-edge-confidential-a/build/mcc-linux-x86/existing/bin/lorapt-example</pre>
  
 
== '''Update image to WISE-3610 Target board''' ==
 
== '''Update image to WISE-3610 Target board''' ==
Line 217: Line 192:
 
<span style="color:#FF0000;">'''requirment example-client-config.json file in the same directory'''</span>
 
<span style="color:#FF0000;">'''requirment example-client-config.json file in the same directory'''</span>
  
'''./pt-example/example-client-config.json'''
+
'''./pt-example 22223 example-client-config.json'''
  
 
== '''Run lorapt-example''' ==
 
== '''Run lorapt-example''' ==
  
#
+
#'''To setup WISE-1501 LoRa sensor&nbsp;connect to WISE-3610'''
 
+
#'''Run lorapt-example'''
'''To setup WISE-1501 lora sensor hub connect to WISE-3610'''
+
<pre dir="ltr">#./lorapt-example 22223 example-client-config.json</pre>
 
 
#
 
 
 
'''Run lorapt-example'''
 
<pre dir="ltr">#./lorapt-example</pre>
 
  
 
== '''SenHub and Resource on mbed-Cloud Portal''' ==
 
== '''SenHub and Resource on mbed-Cloud Portal''' ==
  
'''[https://lh6.googleusercontent.com/_XznOV8oZXkcaNToLL5nyimg6c7nj47FMFpkntaxj6b7Ef0MZN59fS_Ml3crJCzqUnfVMkySV4NP4C6UhpHsrl45QyKh-E1lli4kUzJGdO936hVmaW3zLuC4SasnjpTFoKyeWEuX https://lh6.googleusercontent.com/_XznOV8oZXkcaNToLL5nyimg6c7nj47FMFpkntaxj6b7Ef0MZN59fS_Ml3crJCzqUnfVMkySV4NP4C6UhpHsrl45QyKh-E1lli4kUzJGdO936hVmaW3zLuC4SasnjpTFoKyeWEuX]'''
+
[[File:Mbed cloud training 12.jpg|RTENOTITLE]]
  
  
  
'''[https://lh5.googleusercontent.com/8Avh36ibRxn3pZ3r5fOVYEsrG8bvr6HHgRvl8BXKaP1QkKCgxLPVTfvRlu_tgyC30bvglZrMzwuh_yyc13Ax9EXRNDD6nooZeNCo55dOsP-LJo4Yf_o1YyDGK64uo780f6v0GpSv https://lh5.googleusercontent.com/8Avh36ibRxn3pZ3r5fOVYEsrG8bvr6HHgRvl8BXKaP1QkKCgxLPVTfvRlu_tgyC30bvglZrMzwuh_yyc13Ax9EXRNDD6nooZeNCo55dOsP-LJo4Yf_o1YyDGK64uo780f6v0GpSv]'''
+
[[File:Mbed cloud training 13.jpg|RTENOTITLE]]
  
 
<br/>'''You can select Resource tab to show sensor resource:'''
 
<br/>'''You can select Resource tab to show sensor resource:'''
Line 243: Line 213:
 
<pre>/3303/0/5700  -> click
 
<pre>/3303/0/5700  -> click
  
'''+ 27.6'''</pre>
+
+ 27.6</pre>
  
  
  
 
'''You also can select the device ( WISE-3610 ) to show how many sensor hub translator protocol by this GW'''
 
'''You also can select the device ( WISE-3610 ) to show how many sensor hub translator protocol by this GW'''
 +
 +
== ARM-mbed-Cloud Demo ==
 +
 +
[[Media:Mbed-cloud-demo-WISE-3610-20171011.tar.gz|Mbed-cloud-demo-WISE-3610-20171011.tar.gz - Download]]
 +
 +
File Description: mbed-edge & lorap-example source code, binary, workaround and install scripts
 +
 +
*/backup/source/mbed-edge-20171011-demo.tar.gz: source code
 +
*/etc/init.d/&nbsp;: auto run script
 +
*/usr/sbin/&nbsp;: edge-core & lorapt-example & workaround programs
 +
*libs&nbsp;: dependience libs for lorapt-example
 +
 +
=== '''<span style="color:#FF0000;">The SOP of&nbsp;setup&nbsp;a new WISE-3610 with mbed-cloud + lorapt-example demo</span>'''&nbsp; ===
 +
 +
#copy [[Media:Mbed-cloud-demo-WISE-3610-20171011.tar.gz|Mbed-cloud-demo-WISE-3610-20171011.tar.gz]]&nbsp;file to WISE-3610 target platform
 +
##tar xzf mbed-cloud-demo-WISE-3610-20171011.tar.gz
 +
##cd&nbsp;mbed-cloud-demo-WISE-3610&nbsp;
 +
##./instll_to_wise3610
 +
##rm -r /usr/sbin/pal
 +
##reboot&nbsp; &nbsp; : Complete & reboot system
 +
 +
=== Known-issue - 2017-10-11 ===
 +
 +
Issue
 +
 +
#edge-core ( mbed-client with protocol translate ) will disconnect and failed to re-connect to mbed-Cloud when the lifetime is expired.
 +
#Known issue: Notifications from protocol translated resource value changes are currently forwarded only as Mbed Cloud Edge value changes and not as connected device value changes.
 +
 +
Workaround
 +
 +
&nbsp; &nbsp;To restart mbed-edge every 20 minitues&nbsp; (&nbsp;usr/sbin/mbed-demo )
  
 
= <br/><br/>Doc and Informaiton shared by ARM =
 
= <br/><br/>Doc and Informaiton shared by ARM =
  
== PPT ==
+
== mbed Cloud Doc ==
 +
 
 +
[https://cloud.mbed.com/docs/v1.2/collecting/collecting-resources.html#creating-custom-object-resources https://cloud.mbed.com/docs/v1.2/collecting/collecting-resources.html#creating-custom-object-resources]
 +
 
 +
== IPSO Object ID ==
  
*[[Media:ADV_Integration_Camp_-_Mbed_Cloud_Services.pdf|ADV Integration Camp - Mbed Cloud Services.pdf]]  
+
&nbsp;[https://github.com/IPSO-Alliance/pub/tree/master/reg https://github.com/IPSO-Alliance/pub/tree/master/reg]
*[[Media:ADV_integration_camp_-_Provisioning.pdf|ADV integration camp - Provisioning.pdf]]  
+
 
*[[Media:ADV_integration_camp_-_Update_slides.pdf|ADV integration camp - Update slides.pdf]]  
+
&nbsp;[http://www.openmobilealliance.org/wp/OMNA/LwM2M/LwM2MRegistry.html http://www.openmobilealliance.org/wp/OMNA/LwM2M/LwM2MRegistry.html]
*[[Media:ADV_integration_introduction.pdf|ADV integration introduction.pdf]]  
+
 
 +
== Workshop PPT ==
 +
 
 +
*[[Media:ADV_Integration_Camp_-_Mbed_Cloud_Services.pdf|ADV Integration Camp - Mbed Cloud Services.pdf]]
 +
*[[Media:ADV_integration_camp_-_Provisioning.pdf|ADV integration camp - Provisioning.pdf]]
 +
*[[Media:ADV_integration_camp_-_Update_slides.pdf|ADV integration camp - Update slides.pdf]]
 +
*[[Media:ADV_integration_introduction.pdf|ADV integration introduction.pdf]]
 
*[[Media:Mbed_Cloud_Edge-A-material.pdf|Mbed Cloud Edge-A-material.pdf]]
 
*[[Media:Mbed_Cloud_Edge-A-material.pdf|Mbed Cloud Edge-A-material.pdf]]
  
== Related Github repositories ==
+
== Related Github repositories ==
  
 
*[https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential]
 
*[https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential]
Line 266: Line 277:
 
*[https://github.com/ARMmbed/manifest-tool-restricted https://github.com/ARMmbed/manifest-tool-restricted]
 
*[https://github.com/ARMmbed/manifest-tool-restricted https://github.com/ARMmbed/manifest-tool-restricted]
 
*[https://github.com/ARMmbed/mbed-cloud-sdk-workshop https://github.com/ARMmbed/mbed-cloud-sdk-workshop]
 
*[https://github.com/ARMmbed/mbed-cloud-sdk-workshop https://github.com/ARMmbed/mbed-cloud-sdk-workshop]
 
<br/>
 

Latest revision as of 03:33, 13 December 2017

mbed-Cloud FW upgrade feature for WISE-3610

( You can get detail information refer to ADV integration camp - ADV integration camp - Update slides.pdf )


To build FW image modify by ARM 

  1. update the lates mbed client source code
$cd WISE-3610-BSP/qsdk/package/network/utils/
$rm -r mbed
$git clone --branch openwrt_package https://github.com/ARMmbed/mbed-cloud-client-example-wise-3610-confidential mbed
  1. Create Certificates Key

RTENOTITLE

RTENOTITLE

     3. Download  mbed_cloud_dev_credentials.c C code for mbed-Cloud auth


RTENOTITLE


  4. Copy this file to

   WISE-3610-BSP/qsdk/package/network/utils/mbed/mbed-cloud-client-example-restricted


   5. Generate device key ( private , public key ) manifest-tool

  (  refer to https://github.com/ARMmbed/manifest-tool-restricted )

 5.1 Setup and install manifest 

  To install python2 or Python 3

  To install the manifest requirement ( Ubuntu 14.04 )

$sudo apt-get install build-essential libssl-dev libffi-dev python-dev

   To install the manifest by github

$sudo pip install git+https://github.com/ARMmbed/manifest-tool-restricted

   To Install the manifest by local file

$ git clone ''''''https://github.com/ARMmbed/manifest-tool-restricted
$ pip install .'''

 5.2. Generate key by manifest

$manifest-tool init --vendor-domain "advantech.com" --model-name "wise-3610"

  .update-certificates/    => private, & public key

.manifest_tool.json

update_default_resources.c

To build WISE-3610 image and mbed-client with credential key

cp update_default_resources.c </WISE-3610>/qsdk/package/network/utils/mbed/mbed-cloud-client-example-restricted/
export TOOLCHAIN_DIR=`pwd`/qsdk/staging_dir/toolchain-arm_cortex-a7_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/
make

To package image

cd qsdk/package/network/utils/mbed/sdk
#./arm_initial_pack.sh
產生 image folder 裡面有 openwrt-ipq806x-ipq40xx-ubi-root.img

                         nand-ipq40xx-initial.img

產生的 nand-ipq40xx-initial.img 裡面會修改 boot partition 參數
“mkfs.ubifs --space-fixup -m 2048 -e 126976 -c 31 -o ubifs-kcm.img”

Flash WISE-3610 boot loader by TFTP

uboot> set ipaddr 192.168.1.1
uboot> set serverip “Your TFTP Server”
uboot> tftpboot nand-ipq40xx-initial.img
uboot> boot
Upload the new FW Image to mbed-cloud


RTENOTITLE

RTENOTITLE

To crate manifest file by manifest-tools

把剛剛上傳完產生出來的網址 放到下列產生 manifest 更新說明下載位置

manifest-tool create -p openwrt-ipq806x-ipq40xx-ubi-root.img-u http://firmware-catalog-media-ca57.s3.dualstack.us-east-1.amazonaws.com/openwrt-ipq806x-ipq40xx-ubi-root_CovQl9f.img -o mbed-workshop

How to check image by manifest

$manifest-tool parse -j -i mbed-workshop

Upload the manifest to mbed-Cloud

RTENOTITLE

Create a Camp to do FW update by mbed-Cloud

RTENOTITLE

RTENOTITLE

You can set filter rule in device director

RTENOTITLE

RTENOTITLE

Start to update new FW image to devices

RTENOTITLE

mbed-edge-core

( refer to mbed Cloud Edge architecture )


ARM’s github source code

https://github.com/ARMmbed/mbed-cloud-edge-confidential-a



To build mbed-edge & pt-example & lorapt-example code

Method 1: Get from github and download this patch to patch your source code

##Create a new folder 
$mkdir WISE-3610/qsdk/package/network/utils/mbed-edge
##change to this folder
git clone https://github.com/ARMmbed/mbed-cloud-edge-confidential-a
##To patch this source code for WISE-3610
cp Makefile to “mbed-edge” folder
cp toolchain.cmake to
cp CMakeLists.txt to mbed-edge/mbed-cloud-edge-confidential-a/
cp lorapt-example to mbed-edge/mbed-cloud-edge-confidential-a/


Method 2: Dowload the package that hands-on at ARM mbed workshop 20170912

Download: mbed-edge-arm-workshop-20170912.gz

cd ~/WISE-3610/qsdk/package/network/utils/
tar xvzf mbed-edge-arm-workshop-20170912.gz

To create a “Certificates key” refer to above section


To Download C code form mbed-cloud mbed_cloud_dev_credentials.c   => This file with mbed-cloud's credntials key

$cp to “mbed-cloud-edge-confidential-a/client-wrapper/mbed_cloud_dev_credentials.c”

To build mbed-edge only

$cd WISE-3610/

$export TOOLCHAIN_DIR=`pwd`/qsdk/staging_dir/toolchain-arm_cortex-a7_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/

$cd ./qsdk

$make package/mbed-edge/clean package/mbed-edge/prepare package/mbed-edge/compile V=s -j 8

Copy programs to WISE-3610 Target

## edge-core at
./staging_dir/target-arm_cortex-a7_uClibc-0.9.33.2_eabi/root-ipq806x/usr/sbin/edge-core
## lorapt-example
./build_dir/target-arm_cortex-a7_uClibc-0.9.33.2_eabi/mbed-edge/mbed-cloud-edge-confidential-a/build/mcc-linux-x86/existing/bin/lorapt-example

Update image to WISE-3610 Target board

WISE-3610 update image file name: nand-ipq40xx-single.img

You can update fw by WebUI


Run mbed-edge-core

#mkdir /usr/sbin/pal

#/usr/sbin/edge-core 22223 8000


Run pt-example

requirment example-client-config.json file in the same directory

./pt-example 22223 example-client-config.json

Run lorapt-example

  1. To setup WISE-1501 LoRa sensor connect to WISE-3610
  2. Run lorapt-example
#./lorapt-example 22223 example-client-config.json

SenHub and Resource on mbed-Cloud Portal

RTENOTITLE


RTENOTITLE


You can select Resource tab to show sensor resource:

for example:  Temperature

/3303/0/5700   -> click

+ 27.6


You also can select the device ( WISE-3610 ) to show how many sensor hub translator protocol by this GW

ARM-mbed-Cloud Demo

Mbed-cloud-demo-WISE-3610-20171011.tar.gz - Download

File Description: mbed-edge & lorap-example source code, binary, workaround and install scripts

  • /backup/source/mbed-edge-20171011-demo.tar.gz: source code
  • /etc/init.d/ : auto run script
  • /usr/sbin/ : edge-core & lorapt-example & workaround programs
  • libs : dependience libs for lorapt-example

The SOP of setup a new WISE-3610 with mbed-cloud + lorapt-example demo 

  1. copy Mbed-cloud-demo-WISE-3610-20171011.tar.gz file to WISE-3610 target platform
    1. tar xzf mbed-cloud-demo-WISE-3610-20171011.tar.gz
    2. cd mbed-cloud-demo-WISE-3610 
    3. ./instll_to_wise3610
    4. rm -r /usr/sbin/pal
    5. reboot    : Complete & reboot system

Known-issue - 2017-10-11

Issue

  1. edge-core ( mbed-client with protocol translate ) will disconnect and failed to re-connect to mbed-Cloud when the lifetime is expired.
  2. Known issue: Notifications from protocol translated resource value changes are currently forwarded only as Mbed Cloud Edge value changes and not as connected device value changes.

Workaround

   To restart mbed-edge every 20 minitues  ( usr/sbin/mbed-demo )



Doc and Informaiton shared by ARM

mbed Cloud Doc

https://cloud.mbed.com/docs/v1.2/collecting/collecting-resources.html#creating-custom-object-resources

IPSO Object ID

 https://github.com/IPSO-Alliance/pub/tree/master/reg

 http://www.openmobilealliance.org/wp/OMNA/LwM2M/LwM2MRegistry.html

Workshop PPT

Related Github repositories