Skip to content

TizenRT

Philippe Coval edited this page Sep 18, 2018 · 42 revisions

TIZENRT

INTRODUCTION:

While Tizen GNU/Linux based Operating System is powering high end devices like TV, Wearables and most devices with rich rendering, it's not designed to target low end IoT devices or baterry powered small appliances.

Tizen:RT wants to address more devices and reusing API or concepts deployed in his older brother.

If you are interested for a summary overview check this short presentation of TizenRT:

TizenRT

For deeper understanding the following link might be useful too:

IOTJS ON TIZENRT:

IoT.js is part of Tizen:RT, and the current master branch provides some facilities to use an older IoT.js version, but it can be upgraded.

TizenRT-architecture

WEBTHING-IOTJS ON TIZENRT:

To replicate WEBTHING-IOTJS ON ARTIK05Xs demo, please jump to the ARTIK chapter, this automates all tasks on the development branch.

But if you need/want to work on your master TizenRT branch, you'll have to manually do the extra following steps:

SETUP TIZEN:RT ENV

If in a hurry you can skip this step and rely on helper scripts explained later in the ARTIK chapter.

Or follow the supported documentation, to install tools and build and deploy sample image.

UPGRADE: IOTJS

Again, if in a hurry you can rely on helper scripts and skip this chapter.

Currently webthing-iotjs is not supporting the version of IoT.js shipped into Tizen:RT, so it should be upgraded, by just applying this changes set:

CONFIGURE: IMAGE TO RUN IOT.JS

Again, this chapter can be skipped if using helper config made for ARTIK05X, (but you'll have to configure WiFi anyway).

iotjs-tizen-rt

To rebuild Tizen:RT with IoT.js my upstreamed launcher app should be enabled, ROMfs enabled, WiFi configured as explained:

Or start on existing "iotjs" configuration for ARTIK05x

Finally javascripts should be placed in the contents subdir, as explained upstream:

More information about building IoT.js master branch:

Status: Merged

WEBTHING-IOTJS ON ARTIK05X:

There are some helper scripts to setup and rebuild it all with a single make command.

project="tizenrt"
url="https://github.com/tizenteam/tizenrt"
branch="sandbox/rzr/devel/webthing/master"
git clone --recursive --depth 1 -b "$branch" "$url" ; cd "$project"
make setup # Will install tools (on debian based OS) # ToDo adapt for others
make menuconfig # Configure WiFi to connect your hotspot (HowToUseIoTjs.md)
make demo # Add tty=/dev/ttyUSB1 # Add this if not detected properly

It was tested on ARTIK055s and ARTIK053s but should be also working on ARTIK053, just override machine variable in any make calls like

ie:

make menuconfig demo machine=artik053s tty=/dev/ttyUSB1

Default configuration connecting to "public" hotspot might not work, so you'll have to change settings to set your WiFi router credentials For that you need to run menuconfig again and edit credentials, (typically for WPA2: Auth=4 and Enc=5 or 4)

Then on reboot, if connecting, note IP from terminal's log:

U-Boot 2017.01-g59977f7 (Nov 23 2017 - 16:09:52 +0900)
CPU:   Exynos200 @ 320 MHz
Model: ARTIK-053 based on Exynos T20
DRAM:  946 KiB
WARNING: Caches not enabled
BL1 released at 2017-3-13 15:00
SSS released at 2017-09-12
WLAN released at 2017-09-15
Flash: 8 MiB
*** Warning - bad CRC, using default environment

In:    serial@80180000
Out:   serial@80180000
Err:   serial@80180000
Hit any key to stop autoboot:  0 
gpio: pin gpg16 (gpio 46) value is 1
## Starting application at 0x040C�020 ...
s5j_sflash_init: FLASH Quad Enabled
uart_register: Registering /dev/console
uart_register: Registering /dev/ttyS0
uart_register: Registering /dev/ttyS1
uart_register: Registering /dev/ttyS2
uart_register: Registering /dev/ttyS3
uart_register: Registering /dev/ttyS4
System Information:
        Version: 1.1
        Commit Hash: 4fa524ccfbb5d76da971e219353bf642e811535b
        Build User: philippe@wsf1127
        Build Time: 2018-08-28 15:15:03
        System Time: 01 Jan 2010, 00:00:01 [s] UTC Hardware RTC Support
TASH>>log: iotjs_startup_wifi_connect
log: Connecting to SSID "35honeypot" (4+5)
log: Wait (1/3) sec...
i2c_uioregister: Registering /dev/i2c-0
i2c_uioregister: Registering /dev/i2c-1
log: Wait (2/3) sec...
log: Wait (3/3) sec...
[WM] T7 _handle_request:1317 state(0) evt(0)
[WM] T7 _handler_on_uninitialized_state:870 state(0) evt(0)
Starting supplicant in foreground...
1262304004.153364: Successfully initialized wpa_supplicant
1262304007.236875: wl1: callling L2_packet_init: 
1262304007.236875: wl1: Own MAC address: 28:6d:FF:FF:FF:FF
[WM] T7 <-- _handle_request
[WM] T7 _handle_request:1317 state(1) evt(4)
[WM] T7 _handler_on_disconnected_state:920 state(1) evt(4)
[WM] T7 _wifimgr_connect_ap:727
[WM] T7 _wifimgr_save_connected_config:716
[WM] T7 <-- _handle_request
1262304009.302528: wl1: Associated with e4:9e:FF:FF:FF:FF
1262304009.312507: wl1: WPA: Key negotiation completed with e4:9e:FF:FF:FF:FF [PTK=CCMP GTK=CCMP]
1262304009.312507: wl1: CTRL-EVENT-CONNECTED 
[WM] T12        _wifi_utils_connect_event:817
[WM] T12 _handle_request:1317 state(3) evt(9)
[WM] T12 _handler_on_connecting_state:988 state(3) evt(9)

#|==> [WM] IP address : 192.168.1.42 ---- <==|# This is your IP please note this for later

[WM] T12        _handle_user_cb:1252
[WM] call sta connect success event
log: iotjs_startup_wifi_sta_connected status=0x0

Then device can be then added to Gateway from the Web dashboard:

  • Got to settings page of Gateway
  • Check that adapter is loaded in "adapter page"
  • It not then add "Web Thing : Native web thing support" plugin listed on "addon page"
  • Then in the thing menu press the (+) button to add thing, at bottom of page click "add by URL"
  • Enter http://$ip:$port and save and add, it should be displayed minimized on main screen or expended form:

ARTIK05x

TODO:

Check and fix I2C, ADC, SPI support:

MORE RESOURCES:

LICENSE:

INDEX

Clone this wiki locally