IoT.js Next generation web for connected things Samsung Electronics Software Center Piotr Marcinkiewicz 2017
Agenda Introduction Architecture Node.js vs. IoT.js APIs You are invited Community Q&A 01 02 03 04 05 06 07
Introduction IoT.js Node.js and IoT.js provide same experience JavaScript RAM and FLASH RAM 200kB MCU 200MHz requirement is ~200kB MCU (Micro controller unit) No MMU nor GPOS MCU is cheap and ultra low power
Introduction IoT.js IoT.js can be compiled for Linux PC It works also for ARM Linux devices like Raspberry Pi 2/3 The major target is MCU STM32F4 is supported with Nuttx OS Artik053 is supported with TizenRT OS
Introduction Artik 053 32-bit ARM Cortex R4 @ 320MHz for applications 29 GPIO, 2 SPI, 4 UART, 4 ADC, JTAG, 2 I2C 5-12 VDC input 1280 kb RAM, 8MB flash TizenRT RTOS https://github.com/samsung/tizenrt
Architecture IoT.js JavaScript service JerryScript API JavaScript service can access hardware and network using API It doesn't have graphical user interface JavaScript is executed in JerryScript virtual machine at device JS API is implemented using OS API (SYSFS, Peripheral API)
Architecture JavaScript service IoT.js JerryScript libtuv Operating System System API
Node.js vs. IoT.js JS IoT.js Node.js OS Both Node.js and IoT.js provide runtime environment for JavaScript GPOS general purpose operating system, RTOS real time operating system, V8 JavaScript engine from Chromium
Node.js vs. IoT.js Node.js IoT.js API Addons API Basic API Peripheral API Architecture JS engine, system I/O ECMA7 V8 libuv ECMA5.1 Jerry Script libtuv Platform GPOS RTOS Hardware CPU MCU
Node.js vs. IoT.js Node.js IoT.js Easy to extend More features Better CPU utilization Easy to port More OSes Both CPU and MCU support
JerryScript JerryScript RAM 64kB ROM 200kB JerryScript is lightweight JavaScript engine It is intended for very constrained devices. It supports snapshots.
JerryScript JerryScript ECMA 5.1 C99 JerryScript supports full ECMA 5.1 and some ECMA 6 (Typed Array, promise) https://github.com/jerrys cript-project/jerryscript
APIs Module JS C API Modules are implemented using C and JavaScript C language provides direct binding from OS API to JavaScript JavaScript defines objects and validates API calls from application
APIs src file.c file.c Runtime C implementation js file.js file.js modules file.c file.c platform os_xxx file.c file.c Runtime JS and modules JS Generic module C implementation os_xxx Platform specific module C implementation implementation compiled into snapshot
APIs Basic API Node.js style Core Extended API IoT.js style Hardware System Internet Communication
APIs Basic API Node.js style Core Module Console Events Timer Buffer System FS Stream Process Internet DNS HTTP Net HTTPS *
APIs Extended API IoT.js style Hardware GPIO ADC PWM Communication UDP SPI I 2 C UART BLE
APIs GPIO
You are invited https://github.com/ Samsung/iotjs Copyright c 2017 SAMSUNG ELECTRONICS. ALL RIGHTS RESERVED
Compilation and CI Install Build Check Precommit tools root folder.travis.yml
Dependencies git submodule jerry http-parser libtuv jerryscript-project/jerryscript Samsung/http-parser Samsung/libtuv precommit tizenrt nuttx Samsung/TizenRT Nuttx (Bitbucket)
Build process precommit.py build.py http-parser configure environment libtuv jerryscript test deploy IoT.js
Tools - install and check install: apt-get-install-* arm (RaspberryPi) nuttx tizenrt tizen travis check: license signed test tidy
Tools - precommit tests precommit.py --test flag passes 3 flags to build.py arch os board host-linux (tests are executed) default (x86*) default (linux) default (undefi ned) rpi2 arm default rpi2 artik10 arm tizen artik10 artik053 arm tizenrt artik05x nuttx arm nuttx stm32f4dis
Folders IoT.js folders: docs JS API description, build guides src source code of all major components tools build and configuration Python scripts test JavaScript tests samples JavaScript sample services (e.g. blink a LED)
Folders IoT.js folders: deps dependencies compiled with IoT.js cmake cmake configuration for IoT.js and submodules config configuration for Tizen, TizenRT, Nuttx include library header
Community 48 contributors 889 commits 266 forks 1420 stars IRC: freenode.net #iotjs Group: iotjs-dev@groups.io
Q&A https://github.com/ Samsung/iotjs Copyright c 2017 SAMSUNG ELECTRONICS. ALL RIGHTS RESERVED
THANK YOU https://github.com/ Samsung/iotjs Copyright c 2017 SAMSUNG ELECTRONICS. ALL RIGHTS RESERVED