linux+zephyr: iot made easy · iot explodes everywhere “sensors and actuators embedded in...
TRANSCRIPT
![Page 1: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/1.jpg)
Linux+Zephyr:IoTmadeeasy
![Page 2: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/2.jpg)
IoTExplodesEverywhere
❑ “Sensorsandactuatorsembeddedinphysicalobjectsandlinkedthroughwiredandwirelessnetworks,oftenusingthesameInternetProtocol(IP)thatconnectstheInternet”-DefinitionbyMcKinsey.
❑ Soundsjustlikeembeddedstuffwe’vebeendoingfordecades!Sowhatchanged?
❑ Nowthere’sabigmarketandtheworldisjust‘ready’.
❑ Unfortunatelythere’snostandard(andprobablywillnotbeoneformanydecades),fragmentationisrunningamok.
![Page 3: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/3.jpg)
LinuxIoT
❑ AroundformanyyearsandbeendoingIoTthingswithitbeforeithadacoolname.
❑ AllprotocolshavetheirreferenceimplementationonLinux(AllJoyn,MQTT,Weave,XMPP,etc)
❑ UnfortunatelyLinuxhasgottenquitelarge
❑ Minimumkernelforembeddedtarget>4MBcompressed
❑ RequiresafewhundredsofGBofflashforageneralpurposeinstall.
❑ Notsuitableforverysmalldevices
![Page 4: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/4.jpg)
Priceiseverything
❑ IfwecouldrunLinuxoneverythingyouwouldn’tbeinthispresentation!
❑ Linuxissecure(hasyearsofscrutinyandprofessionalsecuritypeoplegoaftereverycommitwithafinetoothcomb).
❑ Linuxhasthefullnetworkingstackrequired.
❑ LinuxhastheI/Ocapabilities(everysensor/actuatordriver)
❑ Unfortunatelyyoucan’trunLinuxon$0.5part.
![Page 5: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/5.jpg)
Priceiseverything(cont)
❑ RunIoTona$0.5part(ideally,wecoulddowith$1)
❑ Thisisthesweet-spotformanyapplications
❑ Puta$50deviceoffpremisesandgetlostorstollen,youmightgetabitupset->endupnotbuyingit.
❑ Puta$1deviceoffpremisesandgetlostorstollen->meh.
❑ TurnsoutthatweneedanOSforourcheapdevicesthatisleanerthanLinux.
❑ Manyoptions!
![Page 6: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/6.jpg)
RTOSselection
❑ Abigselectionofchoices,thebigcontenders
❑ FreeRTOS
❑ mbedOS
❑ NuttX
❑ magenta(LK)
❑ None
❑ Zephyr
![Page 7: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/7.jpg)
FreeRTOS
❑ DualLicense-GPLv2withlinkingexceptionorcommercial
❑ SparseAPI-themostRTOSofoldofthemost
❑ Nocommunitydevelopmentforthecore(separate)
❑ Preemptivethreadmodel,optionalMPUprotection
❑ Networkingisanadd-on-nohighlevelframeworks
❑ Suitedforpeoplemovingonfrombaremetal
![Page 8: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/8.jpg)
mbedOS
❑ Apache2,6LoWPanunderpermissivebinarylicense(etc).
❑ Newmbed5RTOS(CMSIS-RTOS-RTX)
❑ Communityinvolvementminimal(ARMfocused).
❑ MINAReventbasedAPI
❑ Completestandardsupport(twodifferentIPstacks)
❑ TiedtothembedOScloudAPI
❑ Mosteasytogetstarted,butnotveryopensourceIMO.
![Page 9: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/9.jpg)
NuttX
❑ BSD3clause
❑ MostLinuxAPIofthemall.
❑ Hasalargecommunitybut80%isMr.Nutthimself
❑ QuitePOSIXcompatible-easiertoportLinuxstuff
❑ IPstackbutnotmuchelseIoTrelated
❑ Largerthantheotheroptions,mostLinuxlike.
![Page 10: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/10.jpg)
magenta(partoffuchsia)
❑ MITlicense
❑ Littlekernel-UsedonAndroidbootloaders.
❑ Justintroduced,communityisdubious
❑ Limitedprioritynumber,standardprimitives.
❑ Networkingstack-couldn’tfigurethisout:)
❑ Googleproject-significantinfantmortality
![Page 11: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/11.jpg)
None(isalwaysanoption)
❑ N/A
❑ N/A
❑ N/A
❑ N/A
❑ N/A
❑ Onlyforthehardcore
![Page 12: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/12.jpg)
Zephyr
❑ Apache2(networkstackApache2)
❑ AdequateRTOSAPI(andnano/microoption)
❑ UnderLinuxFoundation-trueopensource
❑ Networkingstack-IPstack+IoToptions(CoAP)+BLE
❑ Linuxkconfigbuildsystem,feelsrightathome.
❑ Ourselection.
![Page 13: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/13.jpg)
IoTonZephyr.
❑ CoAP,BLE,contiki+tinydtls
❑ Canbeverysmall(smallestnanokernelexampleat8K)
❑ PortingofIoTlibrariespossible
❑ Youcanaccomplishquitealot.
❑ WhataboutLinux?Wheredoesitfitin?
![Page 14: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/14.jpg)
IoTonZephyr(problems)
❑ Security-yourIoTdevicehaskeysandpasswords,howdoyouhandleitbeingstolenbyamaliciousparty?
❑ Convenience-Howeasycanyouupdatethesoftwareonthedevices?Youmighthavedozenonyourpremises.
❑ FutureProofing-Notenoughroominnon-volatilestorageforeveryIoTprotocol.Whathappensifthecompanygoesoutofbusiness?Youhavetochangeallthelightbulbs/securitysystem/etcinsuchacase?
❑ Warringtribes-iPhonevsAndroid-itshouldworkwithmyotherdevicestoo.
![Page 15: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/15.jpg)
Solution:LinuxGateway
❑ LinuxgatewayandslaveZephyrIoTdevices.
❑ LinuxcanrunallIoTprotocols(andwithenoughRAMatthesametime)
❑ Futureproof-Linuxiseasilyupdated,sincepointtodoso.
❑ SoftwareontheIoTdevices?ShoulditbeanIoTstack?Dowestillneedtoupdates/wontheIoTdevices?
![Page 16: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/16.jpg)
Intermission:CheapIoT(1)
❑ CheapMCUwithonchipperipherals
❑ ARMMcore/PIC/ARM/x86/AVR
❑ GPIOs
❑ PWM
❑ Serial
❑ I2C
❑ SPI
❑ Networking(IEEE802.15orZigBeeorWiFi)…
![Page 17: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/17.jpg)
Intermission:CheapIoT(2)
❑ Analogglue
❑ SensorsonI2C/SPIbus
❑ Verypricesensitive
❑ Speedsareusuallylow
❑ Powerbudgetissmall
❑ Lessismore
![Page 18: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/18.jpg)
WhatiftherewasnoIoT(1)
❑ LinuxhasfullI/OcapabilitiesforIoT
❑ Problemisthatthesensorsareremote
❑ WhatifwegotridoftheheavyweightIoTprotocols?
❑ Zephyrdevicesaresimplyperipherals
❑ S/WloadonZephyrdevicesisthesameforthesameSoCnomatterwhatdifferentkindofsensor/IoTdeviceitis
❑ LinuxkernelinterfacesmeanalltheIoTapplicationareinsulatedfromtheunderlyingdevicedetails.
![Page 19: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/19.jpg)
WhatiftherewasnoIoT(2)
❑ Significantlessattacksurfacewithsecurityproblems:
❑ Thedevicesonlycontainenoughkeystoconnectwiththegatewayandhavenovaluableinformation
❑ Thereismuchlesssoftwareonthedevice
❑ Bothendscanbesecuredeitherwithpre-programmedkeysorusingasmart-phoneapplicationoninstalltime.
❑ Thedevicesarebasicallydisposable.
![Page 20: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/20.jpg)
Implementation(bare)
❑ DirectlyaccesstheSoCresources
❑ Registers
❑ Busses
❑ +Nosoftwarebesidesnetworkingandconfiguration
❑ -Performancemightbeimpacted
❑ -Morepowerrequired(tradeoff)
![Page 21: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/21.jpg)
Implementation(classdrivers)
❑ Thinclasslayer
❑ GPIOclassforinstance
❑ Classesforeverykindofperipheral
❑ -MoreS/Wcomparedtobarebones
❑ +Betterperformance
❑ +Lesspowerrequired
![Page 22: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/22.jpg)
Status
❑ Unfortunatelynodemoyet!
❑ TestbedisabeagleboneandanIntelGalileo
❑ KerneldriverprovidesremoteGPIOsnow,I2C,SPItocome
❑ Kerneldriversusesauser-spacehelpertobridgetothedeviceoverBLE.
❑ Pre-configuredkeyswithDTLS
❑ WIP,hopetohaveademoatELC.
![Page 23: Linux+Zephyr: IoT made easy · IoT Explodes Everywhere “Sensors and actuators embedded in physical objects and linked through wired and wireless networks, often using the same Internet](https://reader031.vdocuments.net/reader031/viewer/2022022522/5b30b61a7f8b9ad76e8e5db0/html5/thumbnails/23.jpg)
Thankyou!
Questions?