RIOT: The friendly operating system for the IoT! – Oliver Hahm



yes a little good morning as you have noticed in country to the broken I'm not manual but I'm working with right for the last five years so I think I can say just some things about it and I try to keep myself well short but before I dig into the technical details of riot I'll first give a brief look at what we see for therefore the Internet of Things so we think of the Internet of Things as a collision of three big domains so wireless connectivity the internet and all these nice cheap little energy efficient devices and when they came together bang we have two Internet of Things and what what this enabled us is a whole new world of interconnected devices which enabled us for a whole new world of application directory so there there's going to be a lot of new stuff on the application layer and there's going to be a new world of ways how we interact with a with the Internet so it's not going to be you sitting in front of your computer and and and typing on your on your keyboard only and reading from screen but like there will be devices connected everywhere to the Internet and you will have complete new ways of interacting with them and they will be smart and waited I don't know they do things for you because you know that you want to do them and so if you look at what's what's currently already there and on the internet we have all the computers and laptops and tablets smartphones things like Raspberry Pi and but what they have in common they're both plenty of memory so we have gigabytes of RAM on these machines and if you now connect all these these use mod things to the to the Internet you can see that they are at least two magnitudes less less memory and I mean that's that's probably not kind of going to change I mean these devices will become much smaller and much cheaper and much more energy-efficient but most likely they won't have more more memory more CPU power more more cpu features in the end in the future though we have to live somehow with these constraints and the good thing about but idea from the from the hardware side it's it's already there is I mean new devices popping up every day and that's yeah we a lot of amazing cheap hardware already available it's very energy efficient and with a lot of different radio technologies based on a lot of different microcontrollers 8-bit 16-bit 32-bit platforms I mean nowadays it's mostly um our microcontrollers with its 32-bit architecture but there's still a lot of Atmel chips 8-bit architecture out there a couple of years ago long before epic amethyst is smartwatch TI launch is nice easy 430 Chronos watch which has a microcontroller on board with the system and chips that communicate in the sub gigahertz band I mean most of you probably know other in your board which are which make up Navi are quite quite popular for for hobbyists and makers and yes one example for for arm board choose neither the same art 21 from from at Mills which we also going to use for our tutorial tomorrow tomorrow and yes so we are still not there with a division of smart dust that was first mentioned I think 15 years ago but but we're getting close to it and I think it's just a question of some years where we'll have really super small devices that can be deployed everywhere and run for years with this battery power or some other constrained resource to energy resources and the problem is from the software we're still still not quite there and if you think like ten years ago what you could do with your was your cell phone it was not not too much so there were some applications but most of them were not very usable and that was not only because the hardware was not the hacker in the cell phones was not power awful enough but mostly because it was it was pretty pain in the ass to to develop an application for for a cellphone so every application developer had mostly start from scratch and things just changed when iOS and Android came into the game and provided unified API and SDK and we think that something like a de facto standard API is also necessary to to really enable my software development nice IOT application development here and so I'm not saying that we need something like and I don't know App Store or one vendor provides all solution definitely not just just the contrary but I think we need some kind of a de facto standard for phone operating system and API so let's get really easy for for all developers to to implement IOT devices and the problem is if you if you look again at the at the IOT so for further for the all these internet host we are AF nice operating systems like Linux BSD Mac OS Windows Android I mean even the Raspberry Pi can just easily run Linux but all these operating systems just won't work on these small devices so the obvious solution for us is to run a riot on these devices and so let's let's look again at what what's needed for for an operating system and ER and the IOT l– so what do we want for our operating system so as we've seen there's a lot of different devices with which different microcontrollers wide range of different hardware resources different memory constraints and so on different radio technology so and the operating system for the iot definitely needs to support a lot a wide range of hardware architectures and as we also seen the writing system needs to support these low memory devices and that means that sub writing system itself needs to consume little memory but also provide very efficient memory efficient data structures and memory efficient methods to the to the application layer and because we want or connect all these devices to the internet so there is a strong focus to implement interoperable protocols and and standards and we want application developers to develop the application once and then just part to to all the different devices I mean of course there will be still memory constraints and hardware constraints so you won't just be able to to run any application on any device but I mean that's something that you cannot abstract from from software perspective but as long as this is feasible from the from the hardware side it should be to be easy to it should be no additional effort to program your application once and flesh it to different devices if it's not we know or SEM are 21 or whatever and yes as I said we want to make every developer out there and able to to develop an IT application even if we don't know much about all the IDF protocols or if he doesn't know anything about microcontroller programming so he just needs to if he knows how to program a regular PC just you just he just that should just be a callable of starting an IT application right away so just by using standard programming languages and final programming techniques as you as you know it from from linux programming that also means that we need standard api's like like POSIX I mean public sockets are very nice way to implement network protocols so why not just use them again on for IOT devices and I mean of course debugging in this in this field is very very important so there are a lot of good debugging tools already out there so it just should be just usable from from the operating system perspective and yeah I mean for every soft comprehensive documentation is crucial so we are not that and a lot of people worrying about the security and privacy in the and the IOT and I think that's it's very important it's very important to worry about it and we think that the best way to care about these concerns is to make everything as open as possible use open standards and use open source software and be independent from from any cloud service or independent from any hardware architecture or other technology independent from from a specific vendor so make everything open-source so and you can app just the rest of the open world source were looking at the code and identifying potential security issues and then let's look at how we try to tackle these challenges this right so obviously our right is open source project and it's licensed under GPL which makes it possible for for companies to build their application or maybe even close those drivers and on top of riot but right at the operating system with all these features will stay open source and it's completely written in and EC plus some minor part in there and the really hard for dependent code that's written in assembler but operating system to the kernel itself it's fully written in NGC and it's also possible to to plug in your C++ libraries or applications on top of this we try to to support as many useful POSIX features as possible like all these stuff that's mostly used in applications like peas threads and sockets to make an ability layer on top of it and and within nice features also serves the right native part which make it possible to to run your right application right on your on your Linux PC so that you can start right away evaluating and running some experiments or on your PC without the need for real IOT hardware which is very helpful for debugging and testing your applications in your network code and of course you can use all the well-known open source tools for for analyzing and debugging like Wireshark and walk around gdb GCC like all these big open source we did but everybody that ever developed anything probably knows and looking a bit more under the technical specifications of the riot corner its microkernel which makes it pretty robust against the failing drivers and so on and what makes it also fairly small to the kernel itself just consumes currently 1/2 K of RAM on a 32-bit platform that depends a little bit on the tool chain and then on just specific architecture but in general is a criminal type it's it's very minimalistic I can like you kind of it is and it's runs on a ticular scheduler that means that there are no periodic events happening so that there's nothing that unnecessarily breaks up the device every so often but if there's nothing to do the device will just sleep until the next interrupts occur makes it pretty energy efficient all the functions in the kernel are based on fixed sized data structures and and have a deterministic runtime to achieve retain capabilities which is also very important for a couple of IOT applications there we try to him to make the interrupt handling as efficient as possible so whenever we part in a platform we really focus on implementing the interrupt handling it's as efficient as possible to to have almost zero latency interrupt handling the whole design of the operating system is very modular so is it if you need if you build your own application on right you can just pick like the different modules and make it very particular adapted to the very particular needs of your application so that you don't need to to link in some somewhat richer to not used to make it as small as possible and it's built on a regular PMO district multi-threading architecture with a very powerful and nice to program IPC so yes as I'm working with right for the last five years and I find it really very very nice to write applications for it let's focus on two important things for in for an operating system for the IOT which is connectivity and the portability so for the for the connectivity we think that there's not one solution that will fit all scenarios in all use cases so it's very important to make your your network stack configurable and even provide different different network stack different network stack because one just won't fit for all your needs so we implemented a network stack with all the protocols coming from from iit f6 slope and co-op ripple and so on which are basically mostly on adaptation of typical ipv6 network stack adapted to these constraint devices additional we provide a network stack reported CCN light which is implemented information-centric networking paradigm we don't focus on on host in the network but on the other content which is and has some in network caching capabilities which makes it very interesting for for certain type of applications and it's also possible to to use the open WN network stack as part of a variety so the whole six station 802 254 e deterministic mac layer and and that another thing we try to do as much as possible not not reinventing the wheel but make use of code that's already existing like like this open W Zen or different co-op implementations or crypto libraries that you can just like you know maybe from from VST in the port system you can just pull quote from from already upstream repositories and built in on top of riots without change anything in the in the library itself apart from maybe some some pages to the meg photo to adapt it but that's all done by the by the right build system already yeah so there's a bunch of network protocols already implemented and there's a lot of work ongoing this put with low energy and lightweight m2n and stuff like this and routing protocols and I will probably either brief over this so that's just the design of our of our network native network stack in right where we kept this as modular as possible again so that you can easily exchange the protocols at all the different layers and the idea is to have a unified API between all the layers so it's really easy to replace any protocol at any layer and you can just take your your protocols together as you like or as you need and yeah the other important thing for for an IT of writing system is the portability so so you seen there's a huge bunch of hardware already out there and a new heart was coming in every day so it needs to be really easy to port it to into a new platform and that's why we implemented a pretty well-defined hardware abstraction layer and I mean currently there's mostly arm cortex-m platforms and from from zero ranging to two and four mostly which is all these these nice energy-efficient devices that are not capable of running Linux but but still powerful enough to do pretty amazing stuff with it and the good thing about arm cortex-m is like once you have ported to to this architecture is dependent on the under when words sometimes only a matter of hours to two part right who and you device so that's what it really just explained so there's a huge part in right which is here on the left at the Queen part which is completely hardware independent so you don't need to in order to to party to a new platform you just need to care about the lower the hyper the red part to have abstraction layer and there again there are some parts that you don't need to touch if you just go from from one part xm3 to another there even patted you don't need to touch if you go from M 0 2 & 3 but there obviously some parts that are just bought specific but that's mostly just configuration just say if you're I don't know a DC is connected to pin 1 or or 7 or whatever so that's the 3 minimize to 0 to the to the max – to minimize this putting effort and yeah so what what can I use riot for has the 13 used cases and one will be demonstrated tomorrow by bass in the integer trials so there are some nice students from 8 aw and Hamburg with it some a cool project which is riot and to help you watering plants in your in your office because I mean probably most notice this problem that you will either forget to water your plants or once you do it you will do it three three times in a row and so lands in the office often doesn't look happy and a PB Go button Lucas will present a application based on and write how to how to improve the situation by connecting your plants to the Internet ok so I mean that is just one one use case where you could think of nice new ideas how to connect everyday devices everyday things to the to the Internet of course there are a lot of commercial and industrial use cases so there there are companies out there building software on top of riot as we already had it's also possible to to run right on JIT left which is really really helpful to run your experiment into to debug and evaluate your you are on a network protocol is ready routing protocols and so on and it's Risa / – pretty easy to run experimental is ideal abyss right so it's just a bunch of command lines but a bunch of commands or clicks on a webpage and you can just run hundreds of notices with right answer Network protocols as I also mentioned before there's the probability to run a right network just on your on your Linux perceive is a sum virtualized versions of right applications you can actually have a kind of right cluster on your on your laptop so and apart from you can also connect use these virtual devices with real devices and apart from from from experimental research and commercial use you can write it's also very interesting for a lot of hobbyists and make us to build quick small small things on right and of course it's interesting for for research and teaching and yeah so just do to wrap up what I just told you that main idea for for right was ready to make an application environment for developers to make software development for for the ITU as easy and as fast as possible so that if you have a nice idea of an IOT application you can develop it really really quick this with the help of riot is design it in a way that it's using standard protocols and standard API it's not just possible so that you can reuse a lot of code and that you can just run it on your on your on your PC for for debugging with all the set of tools and yeah I have it as modular as possible that you can really fit it to your particular needs and just just a quick look under on the history of riot which evolved 2008 as a project for wireless and the networks and then two years later we started to work on the IDF protocols and in 2013 we published it on github and started spreading the word just as I do today yeah that's just showing from open hop statistics that yes that the spreading the workhouse pralines word helps and the communities is throwing a lot so currently there are 250 Fork so approximately on github and 268 260 people on the mailing than the developer mailing list which is really active they are located all around the world and right it's also mentoring google Summer of Code project this year there's also an IRC channel and in the Twitter channel so if you're interested in knowing more about riot just subscribe to the meninist or follow us on Twitter or just come to our tutorial to more and there's also a lot of other events around right I mean like just as we do today here and some exhibitions or there be weekly video conferencing meetings so there's a lot of ways to get in contact with us and if you interested to build your own write application you're invited and we would be glad to welcome you tomorrow at our tutorial there I don't have two web pages at area so you can can go to this URL to to see how to prepare yourself for the further workshop and yeah we'll be glad to see you there tomorrow any questions okay I'm developing Mac protocols in fact and with Kentucky I was using Kuja and I was wondering what was the state of progress in fact of doing the same thing than having an instruction and later like in Kuja and being able to see also the timeline of your protocol because we have IOT lab but it's very difficult to to develop such protocols without such an environment like puja actually you can also use write and puja because I mean which is all you only partly Kentucky and dependent so and we support several architectures that also also supported by by Kuja like there's the sky mode for example you could actually just just flash your program your right application to Kuja as well so it's actually possible to run it on huija or you can use the other possibilities that I as I told about is if you are not arm really interested in the in the hardware dependent part of the code just in the instruction level emulation you can use this is native part you can just virtually create your network but it's probably difficult for for Mac protocols but there's someone who also implemented make protocols for for riot and he started with Kentucky and he is using Kuja for this purpose

2 Comments

  1. Lookware Iluminação Inteligente said:

    Where do I find a starting tutorial?

    July 19, 2019
    Reply
  2. sin shad said:

    Can anyone suggest any small projects on TI ez430 Chronos watch with RIOT?

    July 19, 2019
    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *