User Tools

Site Tools


webos

webOS OSE build instructions

This section explains the steps to build the IoTivity project for webOS OSE (Open Source Edition). webOS OSE 1.0 has been released to the public on 18 March, 2018. It offers a strong development environment that enables easy collaboration with other platform developers, as well as distinctive built-in user features. For more information on webOS OSE can be found here:

Please note that webOS OSE includes IoTivity and iotivity-node (current version 1.2.1). Below instruction can be used to apply the other available versions (1.3.1 and master) of IoTivity to your webOS OSE device.

Prerequisites for building IoTivity for webOS

  • Ubuntu 14.04 (64 bit) or higher
  • webOS OSE build system 1.0 or later. For installation instructions, please refer to http://webosose.org/discover/setting/building-webos-ose/
  • Target device: Raspberry Pi 3
    • To test sample app and service on Raspberry Pi 3, we recommend that you prepare the following set of hardware and peripherals.
      • microSD card (8 GB or larger) and microSD card reader device
      • HDMI-compliant monitor and cable
      • Input devices such as a keyboard and a mouse
      • Ethernet cable and internet connection

Build Instructions

Step 1: Build and Flash the webOS OSE

Set up a webOS OSE build as explained at:

Next, flash the build image to your Raspberry Pi 3 by the webOS flash instruction:

After going through webOS OSE build and flash instruction, you are ready to start building IoTivity and iotivity-node.

${ROOT_PATH_OF_YOUR_WEBOS_BUILD} refers to "${YOUR_HOME}/build-webos".

Step 2: Add IoTivity recipe in the webOS build layer

webOS OSE uses OpenEmbedded build system to support a wide range of platform architectures easily. Here is a list of available IoTivity recipes for webOS OSE (click the link to download):

Copy the downloaded file to your webOS build root directory.

$ cp iotivity_<version>_for_webos.tar.gz ${ROOT_PATH_OF_YOUR_WEBOS_BUILD}
$ tar xvfz iotivity_<version>_for_webos.tar.gz

Step 3: Build IoTivity for webOS

Trigger the build by executing below commands.

$ cd ${ROOT_PATH_OF_YOUR_WEBOS_BUILD}
$ source oe-init-build-env
$ bitbake iotivity
$ bitbake iotivity-node

Upon successful execution of above commands, resource library and sample applications archived as ipk extension will be generated at the path below.

IoTivity resource library:
<ROOT_PATH_OF_YOUR_WEBOS_BUILD>/BUILD/work/raspberrypi3/iotivity/<version>-<PN>/deploy-ipks/raspberrypi3/iotivity-resource_
<version>-<PN>_raspberrypi3.ipk

iotivity-node add-ons:
<ROOT_PATH_OF_YOUR_WEBOS_BUILD>/BUILD/work/raspberrypi3/iotivity-node/<version>-<PN>/deploy-ipks/raspberrypi3/iotivity-node_
<version>-<PN>_raspberrypi3.ipk

webOS sample native application:
<ROOT_PATH_OF_YOUR_WEBOS_BUILD>/BUILD/work/raspberrypi3/iotivity/<version>-<PN>/deploy-ipks/raspberrypi3/iotivity-resource-samples_
<version>-<PN>_raspberrypi3.ipk

webOS sample web application:
<ROOT_PATH_OF_YOUR_WEBOS_BUILD>/BUILD/work/raspberrypi3/iotivity/<version>-<PN>/deploy-ipks/raspberrypi3/iotivity-node-app_
<version>-<PN>_raspberrypi3.ipk 

Step 4: Install IoTivity to webOS device

Copy the generated ipk packages to Raspberry Pi 3 device where webOS OSE is flashed.

$ scp iotivity-resource_<version>-<PN>_raspberrypi3.ipk iotivity-node_<version>-<PN>_raspberrypi3.ipk iotivity-resource-samples_<version>-<PN>_raspberrypi3.ipk iotivity-node-app_<version>-<PN>_raspberrypi3.ipk root@<IP_OF_YOUR_RASPBERRYPI_DEVICE>:/home 

Install the ipk packages.

$ ssh root@<IP_OF_YOUR_RASPBERRYPI_DEVICE>
# cd /home
# opkg install iotivity-resource_<version>-<PN>_raspberrypi3.ipk
# opkg install iotivity-node_<version>-<PN>_raspberrypi3.ipk
# opkg install iotivity-resource-samples_<version>-<PN>_raspberrypi3.ipk
# opkg install iotivity-node-app_<version>-<PN>_raspberrypi3.ipk 

ipk will be installed under:

  • IoTivity resource library: /usr/lib
  • iotivity-node add-ons: /usr/lib/node_modules/iotivity-node
  • webOS sample native application: /opt/iotivity/examples/resource/c/SimpleClientServer
  • webOS sample web application: /usr/palm/applications/com.example.app.iotivity

webOS Sample Apps

Execute sample native app

Execute the sample app by below commands.

# cd /opt/iotivity/examples/resource/c/SimpleClientServer
# ./ocserver -o0 [For Server sample]
# ./occlient -t2 [For Client sample] 

Execute sample web app

Execute the sample app by below command.

luna-send -n 1 -f luna://com.webos.applicationManager/launch '{"id":"com.example.app.iotivity"}' 

If the command returns true, then sample app is launched.

Customize Build Option

The following argument options can be passed to the yocto recipe to build IoTivity for webOS:

TARGET_TRANSPORT Supported transport types:
ALL (default)
IP
RELEASE Supported release modes:
1 (release mode) (default)
0 (debug mode)
SECURED Supported security modes: DTLS (Datagram Transport Layer Security)
1 (DTLS enabled) (default)
0 (DTLS disabled)

You can modify the build option of IoTivity for webOS at below recipe.

<ROOT_PATH_OF_YOUR_WEBOS_BUILD>/meta-webosose/meta-webos/recipes-core/iotivity/iotivity_<version>.bb 

Below is a part of iotivty_1.3.1.bb. You can add/remove/modify the build option by manipulating “EXTRA_OESCONS” variable.

............
............
............
python () {
    IOTIVITY_TARGET_ARCH = d.getVar("TARGET_ARCH", True)
    d.setVar("IOTIVITY_TARGET_ARCH", IOTIVITY_TARGET_ARCH)
    EXTRA_OESCONS = d.getVar("EXTRA_OESCONS", True)
    EXTRA_OESCONS += " TARGET_OS=webos TARGET_TRANSPORT=IP RELEASE=1"
    EXTRA_OESCONS += " SECURED=0"
    d.setVar("EXTRA_OESCONS", EXTRA_OESCONS)
}
............
............
............ 

MISC

webos.txt · Last modified: 2018/04/02 08:01 by Seokhee Lee