SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Samsung Open Source Group 1 https://fosdem.org/2018/schedule/event/tizen_rt/
: RT
A lightweight RTOS platform
for low-end IoT devices
#FOSDEM, IoT Track
Brussels, Belgium <2018-02-04>
Philippe Coval
Samsung Open Source Group / SRUK
philippe.coval@osg.samsung.com
Samsung Open Source Group 2 https://fosdem.org/2018/schedule/event/tizen_rt/
Who is Philippe Coval?
● Software engineer for Samsung Research
– Open Source Group, EU team (@UK + DE + FR + CZ...)
● Interest: IoT, demos, usages, OS/hardware support, community
– Projects: IoTivity, Tizen, Yocto, Automotive, etc
● Ask me online for help:
– https://wiki.tizen.org/wiki/User:Pcoval
Samsung Open Source Group 3 https://fosdem.org/2018/schedule/event/tizen_rt/
Agenda
● Technology overview:
– Tizen, the OS of everything ?
– Software platforms
– for Low end devices
● NuttX, Tinyara, TizenRT
● & relationships
– Features & differentiation
● Crash course:
– build sources,
– log in, shell & apps
– develop apps:
● Native or Javascript?
● Demo & tips
● Resources and QA
Samsung Open Source Group 4 https://fosdem.org/2018/schedule/event/tizen_rt/
What do you know of ?
● Tizen is an Operating System based on FLOSS
– Powered by Linux Kernel
– Open to platform and application developers:
● Native (EFL) , Web (HTML5), .Net...
● Shipped into consumer electronics products
– TVs, Wearables, Home kitchen appliances...
– With connectivity features (OCF, SmartThings. S-Connect)
● Supports: Architecture: ARM/Intel 32/64 bits (+ SBC)
– 2013: Tizen-2.0: RD210: 1.2 GHz
– 2014: Tizen-2.2 Gear2: 1GHz, 512MB, +4GB
– 2016: Tizen-3 Wearable GearS3: 1GHz*2, 768MB
Samsung Open Source Group 5 https://fosdem.org/2018/schedule/event/tizen_rt/
“I'm not crazy. My reality
is just different from yours.”
~ Lewis Carroll
Samsung Open Source Group 6 https://fosdem.org/2018/schedule/event/tizen_rt/
Tizen the OS of Everything?
● What about low-end and low-cost IoT devices?
– Without display or rich UI/UX (just small LCD or buttons)
– Battery powered, low consumption matters!
– running ubiquitous micro controllers (MCU)
● Cheap: Cost (<10$) and usage (Low Consumption <mW)
● But can be very constrained in RAM+ROM
– RFC7228: Class 0 from <10KiB+100KiB
● TizenRT is targeting middle configurations (RAM+Flash):
– Cortex M3 (30KB+512KB), M4 (256KB+16MB), R4 (2MB+16MB)
Samsung Open Source Group 7 https://fosdem.org/2018/schedule/event/tizen_rt/
Different software stack for low end devices
● For developers, there is gap between:
– Linux kernel is flexible to some extend,
● Typically: RAM=8MB + ROM=2MB (down for XIP: RAM=1MB ROM=4MB)
● uClinux is lowering requirements (No MMU, Reported, STM32F4's M4: 256KB+2MB)
– Baremetal: Optimal but not flexible: costly, slow
● For dedicated Oses: Genericity vs Speciality (~ trade of).
● Consider features, requirements, learning curve (tools), licensing
– BSD: NuttX, TinyOS, MIT: FreeRTOS* Contiki,
– Apache: Mbed, Zephyr, GPL: RIOT, ChibiOS, Inferno..
– Unfree/Closed source: NucleusOS, eCosPro, ThreadX, VxWorks, QNX, uC/OS, RTX...
Samsung Open Source Group 8 https://fosdem.org/2018/schedule/event/tizen_rt/
TizenRT's origin
● TinyAra 2015 project to collect, store, and deliver IoT sensor data using
● IoTivity: IoT framework for seamless connectivity (+LWIP port for IPv6, +LWM2M)
● AraStorage: Data management (SQL, b+ tree index)
– sources released to public on tizen.org (SOSCON2016)
● Based on NuttX RealTime kernel (deterministic and priorities)
– Initial release in 2007, community led by main author Gregory Nutt
– Stable & Mature (2.5M LoC)
– BSD Licensed:
●
used in many other OS projects or products, Industry adoption
– PX4/PixHawk (Drones), Thingsee (IoT box)
● TizenRT is the whole stack: TinyAra kernel + middlewares (TDC2017)
Samsung Open Source Group 9 https://fosdem.org/2018/schedule/event/tizen_rt/
NuttX is easy for Linux devs
● UNIX/Linux inspired OS (+ shell & apps)
● Comply with standards (POSIX/ANSI):
– uses custom C library & C++ (uClibc++ or LLVM)
– uses GNU tools, GCC, gmake, Kconfig, GDB, openocd...
● Filesystem (RO,RW), VFS (/dev/, /proc), MTD
– handled by drivers (read, write, iotctl opts)
● Network: BSD sockets (uIP: TCP, UDP, IPv6, 6lowpan) NTP, FTP, HTTP etc
● Concurrency: Multi tasks & pthread support
– +mutexes, message queues, signals, TLS, SMP, IPC, FIFO shed, preempt...
● Modular and configurable and scalable (Kconfig),
– Low requirements: footprint is <16KB. Supports Many BSP (8 to 32 bits, 27 arch, 200 boards)
Samsung Open Source Group 10 https://fosdem.org/2018/schedule/event/tizen_rt/
Tizen:RT Architecture and progress overview
Current
status:
V1.1
+
~650
patches
Samsung Open Source Group 11 https://fosdem.org/2018/schedule/event/tizen_rt/
JavaScript runtime:
“IoT.js is to NodeJs what JerryScript is to v8”
(For more, Welcome to FOSDEM's IoT room at 15h05 for Ziran's Sun presentation)
Samsung Open Source Group 12 https://fosdem.org/2018/schedule/event/tizen_rt/
Tizen:RT plan for reliability
● Memory protection unit (MPU > MMU)
– User/Kernel separation
●
Per thread mem protection
● Micro kernel architecture
– Only for scheduling tasks, memory, IPC
● + user space services (Net, drivers...)
● Fault Tolerance
– Self healing
● restart services (and dependencies)
– Fallback option: Live update (DM)
Samsung Open Source Group 13 https://fosdem.org/2018/schedule/event/tizen_rt/
Tizen:RT for IoT: Connectivity & Security
● Connectivity:
– Standard protocols: LWIP (IPv6), mDSN, DHCP, BSD/Web/Sockets, MQTT (Eclipse's mosquitto)
– OCF's IoTivity: CoAP Discovery, Messaging (CA, RA, Cloud), Security (PM, DTLS, SRM)
– WiFi, WPASupplicant, APIs for onboarding (ARTIK app using QR codes)...
– Cloud: ARTIK=>SmartThings cloud, AWS... + S.Connect App
● Device Management Framework: Monitor connectivity & power, report
– OMA-based Lightweight M2M
● Over the air (FOTA...)
● Eclipse Wakaama (formerly liblwm2m)
● More security features: Crypto (AES 128/256, RSA, ECC....)
– Secure: Boot, Flash Storage, Channel (DTLS using mbedtls), Certs
Samsung Open Source Group 14 https://fosdem.org/2018/schedule/event/tizen_rt/
Hardware support
: 05x (053, 053s, 055, 055S)
● Ie: SoM ARTIK 055S + Interposer board:
– 32-bit ARM® Cortex® R4 @ 320MHz
● R for Real Time and safety critical
● S for Secure: SE+TEE, Secure Sub System (sssfw.bin)
– Crypto (Certs, Key, ECDSA, RNG, PUF),
– Boot: ROM>bl1.bin> U-Boot (bl2.bin)> TizenRT OS (signed with artik05x_codesigner)
– 1280KB RAM, 8MB Flash, WiFi (firmware wlanfw.bin)
– IO: GPIO*29 (3.3VDC), ADC*4 (1.8V 12bits@6Mhz), PWM*5
●
UART*4 (2-pin), SPI*2, I2C*2, I2S, RTC, JTAG (lock)
● Others? : QEmu, SIDK_S5JT200
– docs/HowToAddnewBoard.md
– Or port NuttX BSPs (STM32, ESP32? ...)
Samsung Open Source Group 15 https://fosdem.org/2018/schedule/event/tizen_rt/
“Simplicity
is the ultimate sophistication.”
~Leonardo da Vinci
Samsung Open Source Group 16 https://fosdem.org/2018/schedule/event/tizen_rt/
U-Boot 2017.01-g3129855-dirty (Aug 07 2017 - 17:16:21 +0900)
CPU: Exynos200 @ 320 MHz
Model: ARTIK-053 based on Exynos T20
DRAM: 722 KiB
WARNING: Caches not enabled
BL1 released at 2017-3-13 15:00
SSS released at 2016-12-30
WLAN released at ????-??-??
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 0x040C8020 ...
s5j_sflash_init: FLASH Quad Enabled
uart_register: Registering /dev/console
uart_register: Registering /dev/ttyS0
(…)
System Information:
Version: 1.0
Commit Hash: 13711f7a9a7b20632e2eb90ad38b8097eaec0aff
(...)
First boot of “TizenRT ARTIK SDK” on 055s
sudo screen /dev/ttyUSB1 115200
TASH>>Hello, World!!
TASH>> help
         TASH command list          ­­­­­­­­­­­­­­­­­­­­cat        cd         date     df               
dhcpd      exit       free     getenv           
heapinfo   hello      help     ifconfig         
ifdown     ifup       iperf    kill             
killall    logm       ls       mkdir            
mkrd       mksmartfs  mount    ntpclient        
onboard    ping       ps       pwd              
reboot     rm         rmdir    security_api     
setenv     sh         sleep    stkmon           
tls_client tls_server umount   unsetenv         
uptime     wifi             
Samsung Open Source Group 17 https://fosdem.org/2018/schedule/event/tizen_rt/
TASH>>mount
 /mnt type smartfs
 /proc type procfs
 /sss type smartfs
Explore system using TASH Shell and apps
TASH>>cat /proc/partitions
Name        Start    Size   MTD
bl1             0       4   progmem
sssro           4      12   progmem
bl2            16      48   progmem
sssfw          64       8   progmem
wlanfw         72     128   progmem
os            200     600   progmem
factory       800     384   progmem
ota          1184     384   progmem
user         1568     350   progmem
nvram        1918       2   progmem
sssrw        1920     128   progmem
TASH>>stkmon
TASH>>===============================================================
PID   STATUS     SIZE PEAK_STACK PEAK_HEAP    TIME THREAD NAME
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
    0 ACTIVE      1024     1024      81840   30755 Idle Task
    (…)
    6 ACTIVE      4076      844       3584   30755 tash
    (…)
    3 ACTIVE      2028      300      10256   30755 logm
TASH>>killall logm
TASH>>wifi 
TASH>>wifi startsta
TASH>>scan
TASH>>wifi join $SSID  $PASS
TASH>>ifconfig wl1 dhcp
TASH>>cat /proc/version
     Version: 1.0
     Commit Hash: 13711f7a...
     Build User: root@gateway
     Build Time: 2017­08­17 01:22:47
TASH>>free
        total   used    free  largestData:  779296 153632  625664   610288
TASH>>df
  Block  Number  Size   Blocks     Used Available Mounted on
   512     2800       15      2785 /mnt
     0        0        0         0 /proc
   512     1024       14      1010 /sss
TASH>>http
TASH>>gpio
TASH>>cloud
TASH>>sdk modules
TASH>>sensorbd
TASH>>websocket connect wss://echo.websocket.org/TASH>>mqtt_sub  ­d ­h 198.41.30.241 ­t $SYS/
Samsung Open Source Group 18 https://fosdem.org/2018/schedule/event/tizen_rt/
“Talk is cheap.
Show me the code.”
~ Linus Torvalds
Samsung Open Source Group 19 https://fosdem.org/2018/schedule/event/tizen_rt/
Build from source
● git clone 
https://github.com/samsung/tizenrt
● cd tizenrt &&
TIZENRT_BASEDIR="$PWD"
● Setup toolchain
– tar xvjf gcc-arm-none-eabi-
4_9-2015q3-20150921-
linux.tar.bz2 ; export PATH=$
{PWD}/...:$PATH
Configure:
– cd ${TIZENRT_BASEDIR}/os/tools
– ./configure.sh <board>/<configuration_set>
– make -C ${TIZENRT_BASEDIR}/os
menuconfig
● Build
– make -C ${TIZENRT_BASEDIR}/os
● Eventually sign image
(artik05x_codesigner -h)
● Flash using openocd
– make -C ${TIZENRT_BASEDIR}/os download
Samsung Open Source Group 20 https://fosdem.org/2018/schedule/event/tizen_rt/
Add sample native app
●
Inspire from sample app: TizenRT/apps/examples/hello
– hello_main.c:
– Makefile
● to build & register as a TASH command
– Kconfig_ENTRY & Kconfig
● to be enabled on build configuration
– make menuconfig
– Make.def
● Build app in FW image (no DL, static libs)
● C API are mostly there
– functions could missing: enable | use alternative | reimplement
● Exercise: create netcat app using <sys/socket.h> and <arpa/inet.h>
#include <tinyara/config.h>
#include <stdio.h>
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char *argv[])#else
int hello_main(int argc, char *argv[])#endif
{ printf("Hello, World!!n"); }
Samsung Open Source Group 21 https://fosdem.org/2018/schedule/event/tizen_rt/
App sample JS app
● Enable IoT.js
– in menuconfig (runtime):
● To check: edit? simple javascript line:
– console.log(JSON.stringify(process));
– TASH>> iotjs /mnt/index.js
{ "env":{ (...) },
  "platform":"tizenrt", (...) ,
  "iotjs":{ (…) }
● Exercise:
– Upload js from host to target
● using netcat, websocket, http etc
● Then load .js from ROM partition
– Enable ROMFS with menuconfig:
●
CONFIG_FS_ROMFS=y
● *_FLASH_PART_* (400, romfs, rom)
● *_AUTOMOUNT_ROMFS_*:
/dev/mtdblock11 on /rom
– Install javascript to FS dir and rebuild FW:
●
./TizenRT/tools/fs/contents/*.js
– TASH>> iotjs /rom/index.js
●
Exercise:
– Make a luncher app to run iotjs at boot
Samsung Open Source Group 22 https://fosdem.org/2018/schedule/event/tizen_rt/
“The secret to getting ahead
is getting started.”
~Mark Twain
23 https://fosdem.org/2018/schedule/event/tizen_rt/
First world problems: Air Quality

World Health Org. :

92% of population

11% cause of death

Survival plan:

Collect and present data
●
To systems or users

Change behaviors
Samsung Open Source Group
Samsung Open Source Group 24 https://fosdem.org/2018/schedule/event/tizen_rt/
Monitoring air quality? let's prototype:
● Input Sensor(s):
– Particle Pollution (PM), Dust, Gas
● AQ-*, MQ-*, MG-811, DSM501A
– MQ-2 Analog 5V sensor for CO, smoke, propane
● TizenRT supports analog inputs
– + IoT.js module to handle ADC (/dev/adc0)
– For ARTIK S55 1.8V in pin A0 (Add Voltage divider, + LED)
● Let's create a javascript class inspired from:
– generic sensor and OCF airquality model
– Configure, loop on read, emit ondata event
Samsung Open Source Group 25 https://fosdem.org/2018/schedule/event/tizen_rt/
Emit radio alerts to Smart City
● Using LpWan (LoRa, SigFox...)
– SubGHz low bandwidth radio (like 1 SMS per hour)
– Try LoRa® RN2483 modem: LoraBee
● TizenRT supports UART (RX/TX) a la UNIX
– KConfigure /dev/ttyS1's baudrate to 56200
– Use IoT.js UART module to handle port
● (First I prototyped on then ported serialport.js)
● Register device on favorite LoRaWAN network
– BTW: Greetings to Rennes.fr's IoT communities.
> mac set devaddr BADC0DE1
< ok
> mac set nwkskey B4DC0DE2...
< ok
> mac set appskey BADC0D33...
< ok
> mac join abp
< ok
< accepted
> mac tx uncnf 1 142
< ok
< mac_tx_ok
RX
TX
Samsung Open Source Group 26 https://fosdem.org/2018/schedule/event/tizen_rt/
“Any sufficiently
advanced technology
is indistinguishable
from magic.”
~ Arthur C. Clarke
Samsung Open Source Group 27 https://fosdem.org/2018/schedule/event/tizen_rt/
Live demo !
https://youtu.be/S7zpBpnpflU#tizen-rt-lpwan-20180204rzr
● https://my.wirelessthings.be/index.php/device/device_view/1229
Samsung Open Source Group 28 https://fosdem.org/2018/schedule/event/tizen_rt/
DIY: mobile air quality monitor, and beyond?
Demo code (WIP):
https://github.com/rzr/TizenRT
LoRaLoRa
LoRa
LoRa
GPS
GPS
OCFOCF
OCF
OCF
Samsung Open Source Group 29 https://fosdem.org/2018/schedule/event/tizen_rt/
Summary
● Tizen:1,2,3,4... is based on Linux kernel for high end devices
● Tizen ecosystem is now addressing more constrained IoT devices
– Tizen:RT was originally based on NuttX kernel,
● then evolved into micro kernel architecture
● Tizen:RT is open to application developers by providing
– Native, C, C++ POSIX standard libraries
– Middleware: Security, Connectivity, Device management, Database, IoTbus, Audio...
– Javascript runtime, using IoT.js + JerryScript interpreter
● Open Community (github.com/Samsung) & Tools: SDK (CLI or IDE)
Samsung Open Source Group 30 https://fosdem.org/2018/schedule/event/tizen_rt/
References
 Entry points:
– https://fosdem.org/2018/schedule/event/tizen_rt/
– https://wiki.tizen.org/Category:RT
– https://github.com/Samsung/TizenRT/
 Keep in touch online:
– https://blogs.s-osg.org/author/pcoval/
– https://wiki.tizen.org/wiki/Meeting
– https://wiki.tizen.org/wiki/Events
– https://wiki.tizen.org/wiki/FOSDEM
More:
● https://source.tizen.org/documentation/tizen-rt
● https://www.artik.io/modules/artik-05x/
● https://developer.artik.io/documentation/artik-05x/getting-started/
● http://www.nuttx.org/
● http://youtube.com/channel/UC0QciIlcUnjJkL5yJJBmluw
● https://www.slideshare.net/MyungJooHam/tdc-mjham-armkernelintizen3noani
● http://opensource.samsung.com/
Bonus tip:
for demo convenience
I am drafting helper recipes (WIP)
to rebuild all from scratch using docker:
git clone https://github.com/rzr/TizenRT
./run.sh
make help menuconfig deploy run console
31Samsung Open Source Group
Thank you
Merci, Danke Schoen, Gracias,
맙습니다 , ありがとう , 谢谢 ,‫را‬‫ر‬ ‫,شك‬ Trugarez !
https://wiki.tizen.org/wiki/User:Pcoval
BTW greetings to :
Resources: flaticons CC
32
33

Weitere ähnliche Inhalte

Was ist angesagt?

BICC protocol and application
BICC protocol and applicationBICC protocol and application
BICC protocol and application
Isybel Harto
 
Lte network chart_poster
Lte network chart_posterLte network chart_poster
Lte network chart_poster
DipeshHShah
 
6lowpan 110828234426-phpapp01
6lowpan 110828234426-phpapp016lowpan 110828234426-phpapp01
6lowpan 110828234426-phpapp01
mrmr2010i
 

Was ist angesagt? (20)

5G Core Network - ZTE 5g Cloude ServCore
5G Core Network - ZTE 5g Cloude ServCore5G Core Network - ZTE 5g Cloude ServCore
5G Core Network - ZTE 5g Cloude ServCore
 
BICC protocol and application
BICC protocol and applicationBICC protocol and application
BICC protocol and application
 
Lte network chart_poster
Lte network chart_posterLte network chart_poster
Lte network chart_poster
 
Message queuing telemetry transport (mqtt) message format
Message queuing telemetry transport (mqtt) message formatMessage queuing telemetry transport (mqtt) message format
Message queuing telemetry transport (mqtt) message format
 
Gsm architecture and interfaces Telebeans
Gsm architecture and interfaces TelebeansGsm architecture and interfaces Telebeans
Gsm architecture and interfaces Telebeans
 
IMS + VoLTE Overview
IMS + VoLTE OverviewIMS + VoLTE Overview
IMS + VoLTE Overview
 
Carrier Ethernet - What and Why
Carrier Ethernet - What and Why  Carrier Ethernet - What and Why
Carrier Ethernet - What and Why
 
6lowpan 110828234426-phpapp01
6lowpan 110828234426-phpapp016lowpan 110828234426-phpapp01
6lowpan 110828234426-phpapp01
 
LTE - Long Term Evolution
LTE - Long Term EvolutionLTE - Long Term Evolution
LTE - Long Term Evolution
 
4G to 5G Evolution
4G to 5G Evolution4G to 5G Evolution
4G to 5G Evolution
 
5G Integrated Access and Backhaul
5G Integrated Access and Backhaul5G Integrated Access and Backhaul
5G Integrated Access and Backhaul
 
Overview 3GPP NR Physical Layer
Overview 3GPP NR Physical LayerOverview 3GPP NR Physical Layer
Overview 3GPP NR Physical Layer
 
Advanced: 5G Service Based Architecture (SBA)
Advanced: 5G Service Based Architecture (SBA)Advanced: 5G Service Based Architecture (SBA)
Advanced: 5G Service Based Architecture (SBA)
 
Ossec Lightning
Ossec LightningOssec Lightning
Ossec Lightning
 
VoLTE Interfaces , Protocols & IMS Stack
VoLTE Interfaces , Protocols & IMS StackVoLTE Interfaces , Protocols & IMS Stack
VoLTE Interfaces , Protocols & IMS Stack
 
Introduction to QUIC
Introduction to QUICIntroduction to QUIC
Introduction to QUIC
 
Mobile Networks Architecture and Security (2G to 5G)
Mobile Networks Architecture and Security (2G to 5G)Mobile Networks Architecture and Security (2G to 5G)
Mobile Networks Architecture and Security (2G to 5G)
 
Class notes fhrp,hsrp,vrrp
Class notes fhrp,hsrp,vrrpClass notes fhrp,hsrp,vrrp
Class notes fhrp,hsrp,vrrp
 
2G / 3G / 4G / IMS / 5G Overview with Focus on Core Network
2G / 3G / 4G / IMS / 5G Overview with Focus on Core Network2G / 3G / 4G / IMS / 5G Overview with Focus on Core Network
2G / 3G / 4G / IMS / 5G Overview with Focus on Core Network
 
Lte signaling
Lte signalingLte signaling
Lte signaling
 

Ähnlich wie Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices

Ähnlich wie Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices (20)

tizen-rt-javascript-20181011
tizen-rt-javascript-20181011tizen-rt-javascript-20181011
tizen-rt-javascript-20181011
 
Development Boards for Tizen IoT
Development Boards for Tizen IoTDevelopment Boards for Tizen IoT
Development Boards for Tizen IoT
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOS
 
ucOS
ucOSucOS
ucOS
 
Case Study: Porting Qt for Embedded Linux on Embedded Processors
Case Study: Porting Qt for Embedded Linux on Embedded ProcessorsCase Study: Porting Qt for Embedded Linux on Embedded Processors
Case Study: Porting Qt for Embedded Linux on Embedded Processors
 
A Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm BasebandsA Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm Basebands
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
 
Linux para iniciantes
Linux para iniciantesLinux para iniciantes
Linux para iniciantes
 
LEGaTO Integration
LEGaTO IntegrationLEGaTO Integration
LEGaTO Integration
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
 
Максим Мельников - FOSDEM 2014 overview
Максим Мельников - FOSDEM 2014 overviewМаксим Мельников - FOSDEM 2014 overview
Максим Мельников - FOSDEM 2014 overview
 
FOSDEM 2014 Overview
FOSDEM 2014 OverviewFOSDEM 2014 Overview
FOSDEM 2014 Overview
 
Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102
 
Enduro/X Middleware
Enduro/X MiddlewareEnduro/X Middleware
Enduro/X Middleware
 
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
 
Introduction to Internet of Things
Introduction to Internet of ThingsIntroduction to Internet of Things
Introduction to Internet of Things
 
Secure IoT Firmware for RISC-V
Secure IoT Firmware for RISC-VSecure IoT Firmware for RISC-V
Secure IoT Firmware for RISC-V
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
 

Mehr von Samsung Open Source Group

Mehr von Samsung Open Source Group (20)

The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
 
Spawny: A New Approach to Logins
Spawny: A New Approach to LoginsSpawny: A New Approach to Logins
Spawny: A New Approach to Logins
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
 
IoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and BeyondIoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and Beyond
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
 
Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
 
Open Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate StrategyOpen Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate Strategy
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
 
IoTivity: From Devices to the Cloud
IoTivity: From Devices to the CloudIoTivity: From Devices to the Cloud
IoTivity: From Devices to the Cloud
 
SOSCON 2016 JerryScript
SOSCON 2016 JerryScriptSOSCON 2016 JerryScript
SOSCON 2016 JerryScript
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
 
Clang: More than just a C/C++ Compiler
Clang: More than just a C/C++ CompilerClang: More than just a C/C++ Compiler
Clang: More than just a C/C++ Compiler
 
Introduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential CollaborationIntroduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential Collaboration
 
JerryScript on RIOT
JerryScript on RIOTJerryScript on RIOT
JerryScript on RIOT
 

Kürzlich hochgeladen

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Kürzlich hochgeladen (20)

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 

Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices

  • 1. Samsung Open Source Group 1 https://fosdem.org/2018/schedule/event/tizen_rt/ : RT A lightweight RTOS platform for low-end IoT devices #FOSDEM, IoT Track Brussels, Belgium <2018-02-04> Philippe Coval Samsung Open Source Group / SRUK philippe.coval@osg.samsung.com
  • 2. Samsung Open Source Group 2 https://fosdem.org/2018/schedule/event/tizen_rt/ Who is Philippe Coval? ● Software engineer for Samsung Research – Open Source Group, EU team (@UK + DE + FR + CZ...) ● Interest: IoT, demos, usages, OS/hardware support, community – Projects: IoTivity, Tizen, Yocto, Automotive, etc ● Ask me online for help: – https://wiki.tizen.org/wiki/User:Pcoval
  • 3. Samsung Open Source Group 3 https://fosdem.org/2018/schedule/event/tizen_rt/ Agenda ● Technology overview: – Tizen, the OS of everything ? – Software platforms – for Low end devices ● NuttX, Tinyara, TizenRT ● & relationships – Features & differentiation ● Crash course: – build sources, – log in, shell & apps – develop apps: ● Native or Javascript? ● Demo & tips ● Resources and QA
  • 4. Samsung Open Source Group 4 https://fosdem.org/2018/schedule/event/tizen_rt/ What do you know of ? ● Tizen is an Operating System based on FLOSS – Powered by Linux Kernel – Open to platform and application developers: ● Native (EFL) , Web (HTML5), .Net... ● Shipped into consumer electronics products – TVs, Wearables, Home kitchen appliances... – With connectivity features (OCF, SmartThings. S-Connect) ● Supports: Architecture: ARM/Intel 32/64 bits (+ SBC) – 2013: Tizen-2.0: RD210: 1.2 GHz – 2014: Tizen-2.2 Gear2: 1GHz, 512MB, +4GB – 2016: Tizen-3 Wearable GearS3: 1GHz*2, 768MB
  • 5. Samsung Open Source Group 5 https://fosdem.org/2018/schedule/event/tizen_rt/ “I'm not crazy. My reality is just different from yours.” ~ Lewis Carroll
  • 6. Samsung Open Source Group 6 https://fosdem.org/2018/schedule/event/tizen_rt/ Tizen the OS of Everything? ● What about low-end and low-cost IoT devices? – Without display or rich UI/UX (just small LCD or buttons) – Battery powered, low consumption matters! – running ubiquitous micro controllers (MCU) ● Cheap: Cost (<10$) and usage (Low Consumption <mW) ● But can be very constrained in RAM+ROM – RFC7228: Class 0 from <10KiB+100KiB ● TizenRT is targeting middle configurations (RAM+Flash): – Cortex M3 (30KB+512KB), M4 (256KB+16MB), R4 (2MB+16MB)
  • 7. Samsung Open Source Group 7 https://fosdem.org/2018/schedule/event/tizen_rt/ Different software stack for low end devices ● For developers, there is gap between: – Linux kernel is flexible to some extend, ● Typically: RAM=8MB + ROM=2MB (down for XIP: RAM=1MB ROM=4MB) ● uClinux is lowering requirements (No MMU, Reported, STM32F4's M4: 256KB+2MB) – Baremetal: Optimal but not flexible: costly, slow ● For dedicated Oses: Genericity vs Speciality (~ trade of). ● Consider features, requirements, learning curve (tools), licensing – BSD: NuttX, TinyOS, MIT: FreeRTOS* Contiki, – Apache: Mbed, Zephyr, GPL: RIOT, ChibiOS, Inferno.. – Unfree/Closed source: NucleusOS, eCosPro, ThreadX, VxWorks, QNX, uC/OS, RTX...
  • 8. Samsung Open Source Group 8 https://fosdem.org/2018/schedule/event/tizen_rt/ TizenRT's origin ● TinyAra 2015 project to collect, store, and deliver IoT sensor data using ● IoTivity: IoT framework for seamless connectivity (+LWIP port for IPv6, +LWM2M) ● AraStorage: Data management (SQL, b+ tree index) – sources released to public on tizen.org (SOSCON2016) ● Based on NuttX RealTime kernel (deterministic and priorities) – Initial release in 2007, community led by main author Gregory Nutt – Stable & Mature (2.5M LoC) – BSD Licensed: ● used in many other OS projects or products, Industry adoption – PX4/PixHawk (Drones), Thingsee (IoT box) ● TizenRT is the whole stack: TinyAra kernel + middlewares (TDC2017)
  • 9. Samsung Open Source Group 9 https://fosdem.org/2018/schedule/event/tizen_rt/ NuttX is easy for Linux devs ● UNIX/Linux inspired OS (+ shell & apps) ● Comply with standards (POSIX/ANSI): – uses custom C library & C++ (uClibc++ or LLVM) – uses GNU tools, GCC, gmake, Kconfig, GDB, openocd... ● Filesystem (RO,RW), VFS (/dev/, /proc), MTD – handled by drivers (read, write, iotctl opts) ● Network: BSD sockets (uIP: TCP, UDP, IPv6, 6lowpan) NTP, FTP, HTTP etc ● Concurrency: Multi tasks & pthread support – +mutexes, message queues, signals, TLS, SMP, IPC, FIFO shed, preempt... ● Modular and configurable and scalable (Kconfig), – Low requirements: footprint is <16KB. Supports Many BSP (8 to 32 bits, 27 arch, 200 boards)
  • 10. Samsung Open Source Group 10 https://fosdem.org/2018/schedule/event/tizen_rt/ Tizen:RT Architecture and progress overview Current status: V1.1 + ~650 patches
  • 11. Samsung Open Source Group 11 https://fosdem.org/2018/schedule/event/tizen_rt/ JavaScript runtime: “IoT.js is to NodeJs what JerryScript is to v8” (For more, Welcome to FOSDEM's IoT room at 15h05 for Ziran's Sun presentation)
  • 12. Samsung Open Source Group 12 https://fosdem.org/2018/schedule/event/tizen_rt/ Tizen:RT plan for reliability ● Memory protection unit (MPU > MMU) – User/Kernel separation ● Per thread mem protection ● Micro kernel architecture – Only for scheduling tasks, memory, IPC ● + user space services (Net, drivers...) ● Fault Tolerance – Self healing ● restart services (and dependencies) – Fallback option: Live update (DM)
  • 13. Samsung Open Source Group 13 https://fosdem.org/2018/schedule/event/tizen_rt/ Tizen:RT for IoT: Connectivity & Security ● Connectivity: – Standard protocols: LWIP (IPv6), mDSN, DHCP, BSD/Web/Sockets, MQTT (Eclipse's mosquitto) – OCF's IoTivity: CoAP Discovery, Messaging (CA, RA, Cloud), Security (PM, DTLS, SRM) – WiFi, WPASupplicant, APIs for onboarding (ARTIK app using QR codes)... – Cloud: ARTIK=>SmartThings cloud, AWS... + S.Connect App ● Device Management Framework: Monitor connectivity & power, report – OMA-based Lightweight M2M ● Over the air (FOTA...) ● Eclipse Wakaama (formerly liblwm2m) ● More security features: Crypto (AES 128/256, RSA, ECC....) – Secure: Boot, Flash Storage, Channel (DTLS using mbedtls), Certs
  • 14. Samsung Open Source Group 14 https://fosdem.org/2018/schedule/event/tizen_rt/ Hardware support : 05x (053, 053s, 055, 055S) ● Ie: SoM ARTIK 055S + Interposer board: – 32-bit ARM® Cortex® R4 @ 320MHz ● R for Real Time and safety critical ● S for Secure: SE+TEE, Secure Sub System (sssfw.bin) – Crypto (Certs, Key, ECDSA, RNG, PUF), – Boot: ROM>bl1.bin> U-Boot (bl2.bin)> TizenRT OS (signed with artik05x_codesigner) – 1280KB RAM, 8MB Flash, WiFi (firmware wlanfw.bin) – IO: GPIO*29 (3.3VDC), ADC*4 (1.8V 12bits@6Mhz), PWM*5 ● UART*4 (2-pin), SPI*2, I2C*2, I2S, RTC, JTAG (lock) ● Others? : QEmu, SIDK_S5JT200 – docs/HowToAddnewBoard.md – Or port NuttX BSPs (STM32, ESP32? ...)
  • 15. Samsung Open Source Group 15 https://fosdem.org/2018/schedule/event/tizen_rt/ “Simplicity is the ultimate sophistication.” ~Leonardo da Vinci
  • 16. Samsung Open Source Group 16 https://fosdem.org/2018/schedule/event/tizen_rt/ U-Boot 2017.01-g3129855-dirty (Aug 07 2017 - 17:16:21 +0900) CPU: Exynos200 @ 320 MHz Model: ARTIK-053 based on Exynos T20 DRAM: 722 KiB WARNING: Caches not enabled BL1 released at 2017-3-13 15:00 SSS released at 2016-12-30 WLAN released at ????-??-?? 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 0x040C8020 ... s5j_sflash_init: FLASH Quad Enabled uart_register: Registering /dev/console uart_register: Registering /dev/ttyS0 (…) System Information: Version: 1.0 Commit Hash: 13711f7a9a7b20632e2eb90ad38b8097eaec0aff (...) First boot of “TizenRT ARTIK SDK” on 055s sudo screen /dev/ttyUSB1 115200 TASH>>Hello, World!! TASH>> help          TASH command list          ­­­­­­­­­­­­­­­­­­­­cat        cd         date     df                dhcpd      exit       free     getenv            heapinfo   hello      help     ifconfig          ifdown     ifup       iperf    kill              killall    logm       ls       mkdir             mkrd       mksmartfs  mount    ntpclient         onboard    ping       ps       pwd               reboot     rm         rmdir    security_api      setenv     sh         sleep    stkmon            tls_client tls_server umount   unsetenv          uptime     wifi             
  • 17. Samsung Open Source Group 17 https://fosdem.org/2018/schedule/event/tizen_rt/ TASH>>mount  /mnt type smartfs  /proc type procfs  /sss type smartfs Explore system using TASH Shell and apps TASH>>cat /proc/partitions Name        Start    Size   MTD bl1             0       4   progmem sssro           4      12   progmem bl2            16      48   progmem sssfw          64       8   progmem wlanfw         72     128   progmem os            200     600   progmem factory       800     384   progmem ota          1184     384   progmem user         1568     350   progmem nvram        1918       2   progmem sssrw        1920     128   progmem TASH>>stkmon TASH>>=============================================================== PID   STATUS     SIZE PEAK_STACK PEAK_HEAP    TIME THREAD NAME ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­     0 ACTIVE      1024     1024      81840   30755 Idle Task     (…)     6 ACTIVE      4076      844       3584   30755 tash     (…)     3 ACTIVE      2028      300      10256   30755 logm TASH>>killall logm TASH>>wifi  TASH>>wifi startsta TASH>>scan TASH>>wifi join $SSID  $PASS TASH>>ifconfig wl1 dhcp TASH>>cat /proc/version      Version: 1.0      Commit Hash: 13711f7a...      Build User: root@gateway      Build Time: 2017­08­17 01:22:47 TASH>>free         total   used    free  largestData:  779296 153632  625664   610288 TASH>>df   Block  Number  Size   Blocks     Used Available Mounted on    512     2800       15      2785 /mnt      0        0        0         0 /proc    512     1024       14      1010 /sss TASH>>http TASH>>gpio TASH>>cloud TASH>>sdk modules TASH>>sensorbd TASH>>websocket connect wss://echo.websocket.org/TASH>>mqtt_sub  ­d ­h 198.41.30.241 ­t $SYS/
  • 18. Samsung Open Source Group 18 https://fosdem.org/2018/schedule/event/tizen_rt/ “Talk is cheap. Show me the code.” ~ Linus Torvalds
  • 19. Samsung Open Source Group 19 https://fosdem.org/2018/schedule/event/tizen_rt/ Build from source ● git clone https://github.com/samsung/tizenrt ● cd tizenrt && TIZENRT_BASEDIR="$PWD" ● Setup toolchain – tar xvjf gcc-arm-none-eabi- 4_9-2015q3-20150921- linux.tar.bz2 ; export PATH=$ {PWD}/...:$PATH Configure: – cd ${TIZENRT_BASEDIR}/os/tools – ./configure.sh <board>/<configuration_set> – make -C ${TIZENRT_BASEDIR}/os menuconfig ● Build – make -C ${TIZENRT_BASEDIR}/os ● Eventually sign image (artik05x_codesigner -h) ● Flash using openocd – make -C ${TIZENRT_BASEDIR}/os download
  • 20. Samsung Open Source Group 20 https://fosdem.org/2018/schedule/event/tizen_rt/ Add sample native app ● Inspire from sample app: TizenRT/apps/examples/hello – hello_main.c: – Makefile ● to build & register as a TASH command – Kconfig_ENTRY & Kconfig ● to be enabled on build configuration – make menuconfig – Make.def ● Build app in FW image (no DL, static libs) ● C API are mostly there – functions could missing: enable | use alternative | reimplement ● Exercise: create netcat app using <sys/socket.h> and <arpa/inet.h> #include <tinyara/config.h> #include <stdio.h> #ifdef CONFIG_BUILD_KERNEL int main(int argc, FAR char *argv[])#else int hello_main(int argc, char *argv[])#endif { printf("Hello, World!!n"); }
  • 21. Samsung Open Source Group 21 https://fosdem.org/2018/schedule/event/tizen_rt/ App sample JS app ● Enable IoT.js – in menuconfig (runtime): ● To check: edit? simple javascript line: – console.log(JSON.stringify(process)); – TASH>> iotjs /mnt/index.js { "env":{ (...) },   "platform":"tizenrt", (...) ,   "iotjs":{ (…) } ● Exercise: – Upload js from host to target ● using netcat, websocket, http etc ● Then load .js from ROM partition – Enable ROMFS with menuconfig: ● CONFIG_FS_ROMFS=y ● *_FLASH_PART_* (400, romfs, rom) ● *_AUTOMOUNT_ROMFS_*: /dev/mtdblock11 on /rom – Install javascript to FS dir and rebuild FW: ● ./TizenRT/tools/fs/contents/*.js – TASH>> iotjs /rom/index.js ● Exercise: – Make a luncher app to run iotjs at boot
  • 22. Samsung Open Source Group 22 https://fosdem.org/2018/schedule/event/tizen_rt/ “The secret to getting ahead is getting started.” ~Mark Twain
  • 23. 23 https://fosdem.org/2018/schedule/event/tizen_rt/ First world problems: Air Quality  World Health Org. :  92% of population  11% cause of death  Survival plan:  Collect and present data ● To systems or users  Change behaviors Samsung Open Source Group
  • 24. Samsung Open Source Group 24 https://fosdem.org/2018/schedule/event/tizen_rt/ Monitoring air quality? let's prototype: ● Input Sensor(s): – Particle Pollution (PM), Dust, Gas ● AQ-*, MQ-*, MG-811, DSM501A – MQ-2 Analog 5V sensor for CO, smoke, propane ● TizenRT supports analog inputs – + IoT.js module to handle ADC (/dev/adc0) – For ARTIK S55 1.8V in pin A0 (Add Voltage divider, + LED) ● Let's create a javascript class inspired from: – generic sensor and OCF airquality model – Configure, loop on read, emit ondata event
  • 25. Samsung Open Source Group 25 https://fosdem.org/2018/schedule/event/tizen_rt/ Emit radio alerts to Smart City ● Using LpWan (LoRa, SigFox...) – SubGHz low bandwidth radio (like 1 SMS per hour) – Try LoRa® RN2483 modem: LoraBee ● TizenRT supports UART (RX/TX) a la UNIX – KConfigure /dev/ttyS1's baudrate to 56200 – Use IoT.js UART module to handle port ● (First I prototyped on then ported serialport.js) ● Register device on favorite LoRaWAN network – BTW: Greetings to Rennes.fr's IoT communities. > mac set devaddr BADC0DE1 < ok > mac set nwkskey B4DC0DE2... < ok > mac set appskey BADC0D33... < ok > mac join abp < ok < accepted > mac tx uncnf 1 142 < ok < mac_tx_ok RX TX
  • 26. Samsung Open Source Group 26 https://fosdem.org/2018/schedule/event/tizen_rt/ “Any sufficiently advanced technology is indistinguishable from magic.” ~ Arthur C. Clarke
  • 27. Samsung Open Source Group 27 https://fosdem.org/2018/schedule/event/tizen_rt/ Live demo ! https://youtu.be/S7zpBpnpflU#tizen-rt-lpwan-20180204rzr ● https://my.wirelessthings.be/index.php/device/device_view/1229
  • 28. Samsung Open Source Group 28 https://fosdem.org/2018/schedule/event/tizen_rt/ DIY: mobile air quality monitor, and beyond? Demo code (WIP): https://github.com/rzr/TizenRT LoRaLoRa LoRa LoRa GPS GPS OCFOCF OCF OCF
  • 29. Samsung Open Source Group 29 https://fosdem.org/2018/schedule/event/tizen_rt/ Summary ● Tizen:1,2,3,4... is based on Linux kernel for high end devices ● Tizen ecosystem is now addressing more constrained IoT devices – Tizen:RT was originally based on NuttX kernel, ● then evolved into micro kernel architecture ● Tizen:RT is open to application developers by providing – Native, C, C++ POSIX standard libraries – Middleware: Security, Connectivity, Device management, Database, IoTbus, Audio... – Javascript runtime, using IoT.js + JerryScript interpreter ● Open Community (github.com/Samsung) & Tools: SDK (CLI or IDE)
  • 30. Samsung Open Source Group 30 https://fosdem.org/2018/schedule/event/tizen_rt/ References  Entry points: – https://fosdem.org/2018/schedule/event/tizen_rt/ – https://wiki.tizen.org/Category:RT – https://github.com/Samsung/TizenRT/  Keep in touch online: – https://blogs.s-osg.org/author/pcoval/ – https://wiki.tizen.org/wiki/Meeting – https://wiki.tizen.org/wiki/Events – https://wiki.tizen.org/wiki/FOSDEM More: ● https://source.tizen.org/documentation/tizen-rt ● https://www.artik.io/modules/artik-05x/ ● https://developer.artik.io/documentation/artik-05x/getting-started/ ● http://www.nuttx.org/ ● http://youtube.com/channel/UC0QciIlcUnjJkL5yJJBmluw ● https://www.slideshare.net/MyungJooHam/tdc-mjham-armkernelintizen3noani ● http://opensource.samsung.com/ Bonus tip: for demo convenience I am drafting helper recipes (WIP) to rebuild all from scratch using docker: git clone https://github.com/rzr/TizenRT ./run.sh make help menuconfig deploy run console
  • 31. 31Samsung Open Source Group Thank you Merci, Danke Schoen, Gracias, 맙습니다 , ありがとう , 谢谢 ,‫را‬‫ر‬ ‫,شك‬ Trugarez ! https://wiki.tizen.org/wiki/User:Pcoval BTW greetings to : Resources: flaticons CC
  • 32. 32
  • 33. 33