ARM/Advantech integration camp

From ESS-WIKI
Revision as of 07:47, 18 September 2017 by Eric.liang (talk | contribs)
Jump to: navigation, search

mbed-Cloud FW upgrade feature for WISE-3610

( You can get detail information refer to 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 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'''


Mbed cloud training 4.jpg

Mbed cloud training 5.jpg

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

Mbed cloud training 6.jpg

Create a Camp to do FW update by mbed-Cloud

https://lh6.googleusercontent.com/0Q7kxSqo9kwe5Nt5FoF5sdpQ1K0tCV8xFjAYPLkgNVTKmZ9kDuUBVBPKauE2o41pZ27x4kGJoZjykmjoMuRCPqtbXxytniWKAZmvCVybRH9TXbUWYCZXJ-HMj-Ai98_jVtkp22Bs


https://lh4.googleusercontent.com/J0qpVl9v09DgK5Moiw1b8gylqJnkQC5dYr-9BrDM-L3rrNooAARMfNoignQvpUwflkmD7Nwkv3WgofAVtHZMzDTQV8y7ayumIIxV6bf6KtX4kMVGZHrKW6Jq7ZQoG0-dCAhNwR6C


You can set filter rule in device director


https://lh3.googleusercontent.com/bu-tPHBjliOgDvaIpWRmfsPimPgvk6LycphTMeO64GYy0CA28XkXV6R79P0UHkq8111PoHl_djlh5m6ZVEZ2ozpAJLTgw_i3bSjqRb3waaBFcS1kJ_XIBk1k3wcqqZ9MEWE3d9d_

https://lh3.googleusercontent.com/bj97nAfgN8zv0e-BCkZQr4ZQxr1JN0m6ublA23fI9GpU8f5IaWJu5fuI0lAGK7OxZkU0sp9dk2-ADts5ymMXaTC3Wp4ebpbI70gYtV6Vzqcz6Iau8H-gNbiQTD1803qQDUbeXbHM


Start to update new FW image to devices


https://lh4.googleusercontent.com/Zkp04AzEnrUEZ79cgGahI6PTPjSQoSl6VK8epZHNdnxCorTVVUNkx0U4rwtKrgtydCdSh62GAzMTgJB7C1DMTfQgqrI6dhVIJe5rkVXQ4XQz0bEXUO-BZW5fofGMR9Upkk8wHKuV

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

$mkdir a new folder /qsdk/package/network/utils/mbed-edge
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/


To create a “Certificates key” refer to above chapt


download C code form mbed-cloud mbed_cloud_dev_credentials.c

$cp to “mbed-cloud-edge-confidential-a/client-wrapper/mbed_cloud_dev_credentials.c”
$cd to WISE-3610 BSP Top folder to build image
$make

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/example-client-config.json

Run lorapt-example

To setup WISE-1501 lora sensor hub connect to WISE-3610

Run lorapt-example

#./lorapt-example

SenHub and Resource on mbed-Cloud Portal

https://lh6.googleusercontent.com/_XznOV8oZXkcaNToLL5nyimg6c7nj47FMFpkntaxj6b7Ef0MZN59fS_Ml3crJCzqUnfVMkySV4NP4C6UhpHsrl45QyKh-E1lli4kUzJGdO936hVmaW3zLuC4SasnjpTFoKyeWEuX


https://lh5.googleusercontent.com/8Avh36ibRxn3pZ3r5fOVYEsrG8bvr6HHgRvl8BXKaP1QkKCgxLPVTfvRlu_tgyC30bvglZrMzwuh_yyc13Ax9EXRNDD6nooZeNCo55dOsP-LJo4Yf_o1YyDGK64uo780f6v0GpSv


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



Doc and Informaiton shared by ARM

PPT

Related Github repositories