10 ms·
RIOT: Operating System for the Internet of Things
- fermigier 8y agoTalk about RIOT given at last year's OSIS in Paris: https://fr.slideshare.net/PoleSystematicParisRegion/osis18iot-la-securite-des-objets-connectes-a-bas-cout-avec-los-et-riot https://fr.slideshare.net/PoleSystematicParisRegion/osis18io...
- yeahitslikethat 8y agoDoes this work on the esp8266? Says it does on the homepage but it's not listed on the supported hardware page on the github. What exactly does RIOT do for you that isn't on the chip?
- bayesian_horse 8y agoI managed to find esp32 in the documentation by using github's search function.
- petre 8y agoGeneric 8266 dev board, there are also two specific ones, Olimex and Sparkfun Thing. http://doc.riot-os.org/group__boards__esp8266.html http://doc.riot-os.org/group__boards__esp8266.html
- cf498 8y agoI would direct you towards their git instead of their website https://github.com/RIOT-OS/RIOT https://github.com/RIOT-OS/RIOT There simply look for merged pullrequests of the features you are looking for. That will give a better overview of the degree of support then the documentation.
- cf498 8y agohttps://github.com/RIOT-OS/RIOT/pull/10792 https://github.com/RIOT-OS/RIOT/pull/10792
- pjmlp 8y agoI am missing the comparisasion with NuttX, RTOS, Zephir, ARM mbed, microEJ, Tizen IoT, .... Everyone wants a piece of the pie.
- kaspar030 8y agoTechnical differences aside: RIOT is the only mentioned OS with a copyleft license (well, LGPLv2.1), trying to create a FOSS alternative in the embedded/IoT space. With permissive licenses for embedded software, open source usually ends at the factory.
- pjmlp 8y agoYep, the anti-GPL crowd will miss the glory days of Linux, specially if Fuchsia really turns into Android Next.
- acassis 8y agoI'm a big NuttX lover, this is exactly what I was looking for microcontrollers. After spending many years using uClinux , FreeRTOS and others. NuttX is a kind of Linux-like RTOS. It is very easy to use, as you can see on my video tutorials: www.youtube.com/c/NuttXChannel Unfortunately using a GPL/LGPL is not an option for embedded system because companies want to keep part of their devices closed.
- fjfaase 8y agoOn there site, they do not compare it with FreeRTOS, a commonly used alternative. I wonder why.
- vardump 8y agoYeah, I was wondering same. It also talks about 8-bit support, but only lists AVR... I mean, AVR is compiler target optimized arch, more like a 16/32 bit system with register width chopped to 8 bits, not limited like other 8-bit MCUs. 8051 support wouldn't hurt. Plus side there's support for 16-bit MSP430, important due to its low power consumption. Anyways, it's good to see more OS competition in IoT space. Signed: embedded & driver developer.
- pantalaimon 8y agoFreeRTOS doesn't come with a hardware abstraction, it doesn't include any drivers.
- SlowRobotAhead 8y agoNor should it. As someone in the CE field doing this work everyday, I’m getting kind of sick of abstraction layers. Every device mfg takes a crack at it, every RTOS does, ARM itself does, and many IDEs are as well. I kind of just want my RTOS to do threading, preemption, and resource locking. Middlewares line Amazon’s MQTT are good but I’d really prefer to handle the peripherals myself or use the device mfg’s libs. I am not a believer in write once use everywhere embedded code, it just doesn’t work, because the peripherals are just so different.
- pantalaimon 8y ago> I am not a believer in write once use everywhere embedded code, it just doesn’t work, because the peripherals are just so different. Are they though? You got SPI, I2C, UART Timers and DMA and while their flavor may differ depending on the vendor, they should do about the same no matter what platform you are on. Sometimes you might have to do some exotic stuff when a chip uses non-standard interfaces, but most of the time the behavior should be fairly generic.
- yitchelle 8y ago"RIOT powers the Internet of Things like Linux powers the Internet." Why does it need to evangelist with statements like this? Isn't RIOT a non-profit endeavour?
- wkz 8y agoThe OS comparison table leaves me somewhat puzzled. Contiki's "C Support" is listed as "partial" without any explanation. What does this even mean? It seems to me that this should be between you and your compiler. Linux is supposedly "partially modular", whereas RIOT is fully modular. That's a bold statement. I get that they are trying to differentiate their product. But without motivations, statements like these sound a bit hollow to me.
- fermigier 8y agoObviously one needs to provide bold statements to get people's attention these days. I guess the details and precise statements are in the research papers, such as: http://riot-os.org/docs/riot-ieeeiotjournal-2018.pdf http://riot-os.org/docs/riot-ieeeiotjournal-2018.pdf
- anonymousDan 8y agoLinux is a monolithic kernel for the most part, would seem to make sense to me without digging into the details.
- wkz 8y agoI disagree. Sure, it is a monolith as apposed to a micro-kernel, i.e. everything in the kernel shares the same address space. But it is highly modular in that most drivers and filesystems can be dynamically loaded/unloaded.
- PinguTS 8y agoAnd in IoT some would not need a modular kernel at all. A monolith kernel would fit the purpose. Because an IoT device normally has a fixed purpose depending on the additional hardware. There is no plug'n'play requirement. The only problem with the Linux kernel these days is its sizes. Because with Cortex M3/M4 processors we still have sizes constraints.
- TickleSteve 8y agoDynamic loading and unloading of drivers in a single-purpose embedded system is not a good point. In this level of devices, everything should be statically allocated for the worst-case situations. This is for reliability, simplicity, determinism, etc. The space taken by the code involved in handling dynamic loading could be better used by giving you a cheaper, simpler, more reliable device. What seems 'nice' on a desktop system is (in a lot of cases) inappropriate for a resource-constrained embedded system.
- arendtio 8y ago- Riot.js - Riot Messenger - Riot Games - RIOT OS It's getting kinda crowded in this namespace :-/
- sufiyan 8y agoYou might say it is becoming riotous
- noobiemcfoob 8y agoRIoT - local group advocating for smart cities I see projects weekly with RIOT for the name. I suppose it's just too tempting for IoT projects
- sufiyan 8y agoHaving used both contiki and riot, I found contiki (NG) very good with supporting more devices and peripherals and much easier to integrate and work with. Riot is difficult in that half the times their tutorials themselves didn't work and there was no support online (this was about a year back and maybe it is better now). I really prefer contiki ng
- cf498 8y agoWe are currently using RIOT in a 3 year research project(2 years in atm) and they do have some issues, however not on the scale you describe. Especially with the online support, if you ask the community, you will generally get an answer relatively quick. With the examples, your experience will vary greatly depending on what board you use, as not all support every test. It is however clear, that they started as a research project and had, and still have, some maturing to do before they can be considered for a production environment. In my opinion, they are however on the right track for that. The list of buried corpses tends to get shorter and over the last year, a lot of interesting features were added. They are also currently working on fixing their documentation and getting automated HIL tests running for their supported boards, which should fix alot of problems people getting started with RIOT currently have. We are likely not going to use RIOT in the next project, however we will continue to use it for teaching.
- melenaos 8y agoWhat is the benefit of using riot os on Arduino instead pure Arduino? I mean what is the reason to add an extra layer since I have to write the same code with and without riot.
- snarfy 8y agoThey still work as libraries. 'Pure arduino' with it's setup(), loop(), pinMode(), etc is hiding a lot of firmware from you. If your device has wifi, it becomes more difficult to use it without an OS since you must manage the wifi yourself inside your loop(). Failure to respond to radio events within certain time frames is an error, so you would have to be careful to not spend too much time in your loop before dealing with the radio. With an OS, the radio has it's own thread and you don't have to deal with it. To you it works like a library.
- deleted 8y ago[deleted]
- kaspar030 8y agoOriginal author of RIOT here. Using RIOT you'll get at least multi-threading, power management, a choice of network stacks, a bunch of community-supported libraries and drivers with an extensive test suite, ... Also, you'd have a clear upgrade path, as applications written for RIOT's API will compile (almost) unchanged for all of RIOT's target hardware. Arduino becomes to slow? Change some pin defines, re-compile for a fast Cortex-M. Intrigued by RISC-V's openness? Recompile for the Hivife1 to find out it's real-world performance with your application.
- melenaos 8y agoExcellent! But how about existing Arduino libraries such as firebase for Arduino? I can use them as they are or I have to port them to the Riot API?
- magicalhippo 8y agoMost examples I looked at were just a few lines. None of them showed multi-tasking, nor using sensors or similar SPI/I2C communication or similar. Looking at the source code it seemed very Arduino-like in the sense that there's few knobs to turn, which is nice for simple stuff but means you'll have to go straight to registers for anything beyond. Overall a bit hard to get a feel for what it could do.
- x3ro 8y agoGood point. Most of the examples are simply wrappers around core features of RIOT, such as gnrc (its network stack). For a larger snippet, this is a UDP server, for example: https://github.com/RIOT-OS/RIOT/blob/master/examples/posix_sockets/udp.c https://github.com/RIOT-OS/RIOT/blob/master/examples/posix_s... There's also the pkg directory (https://github.com/RIOT-OS/RIOT/tree/master/pkg https://github.com/RIOT-OS/RIOT/tree/master/pkg) which incorporates a bunch of third-party libraries and projects without a significant amount of code changes (see the patches/ directory in each pkg). Maybe this gives a good impression of what it takes to port things to RIOT.
- x3ro 8y agoOne of the (admittedly less active these days) contributors here. Happy to answer questions to the best of my ability :) As far as I'm aware, the focus of RIOT is to make embedded development as similar as possible to the way you'd write an application on Linux, including most of the relevant POSIX APIs. This is what, as far as I know, sets it apart from other systems such as Contiki or FreeRTOS, which have non-POSIX APIs for interaction with the OS. Someone on this thread asked why RIOT vs FreeRTOS is not something being compared. FreeRTOS doesn't really come with all the drivers, network stack etc that you need in order to write an embedded IoT application. That is not to say that it's not possible to do so, but it requires more work of picking the right drivers and libraries, whereas RIOT tries to work out of the box for supported devices. Finally, RIOT was born as a university project, and many of the people working on it are either university students or former students. In that sense, there are many, often conflicting interests and no single governing body. Depending on your point of view, this might either be good or bad.
- TickleSteve 8y agoPOSIX APIs are typically not appropriate for embedded systems. For example filesystems. Filesystems are not generally applicable for single-purpose embedded systems. You're never going to need textual filenames, opening and closing file handles, etc. All that is just a waste, typically you just want to store your data to a log. This is much more appropriately stored in a simple circular buffer on FLASH without the overhead and non-determinacy of a filesytem. Also, processes. These should be static. You typically never ever exit a task/thread on an embedded system. Resets are a way of life. You have to acknowledge them in your design and error handling takes advantage of this. I would not take POSIX compliance for a system like this as a plus point.
- ramzyo 8y agoReplied to your comment below as well, but will reiterate my primary point here, You seem to be conflating embedded systems with safety-critical systems. There are plenty of embedded systems that are neither safety critical nor single-purpose. Also, plenty of non safety-critical embedded systems use microcontrollers that don't have the resources (RAM) to run Linux effectively (even MMU-less Linux) but could benefit from dynamic kernel capabilities like dynamic loading and unloading of drivers for hot-plugging events to support external hardware/accessories.
- roland35 8y agoAnother thing to note is that since Amazon has acquired the FreeRTOS project, FreeRTOS now includes built in support for a lot of IoT related things. AWS is certainly tied in the best but you can still use the networking and MQTT library however you want
- topbanana 8y agoNo IPv4 support? https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_ne...
- eecc 8y agoWell? Why would you want it, it's legacy. IPv4 is over, let it rest.
- topbanana 8y agoBecause most home networks are IPv4 via NAT
- jschwartzi 8y agoNot to mention most business networks, the vast majority of industrial control networks. So basically damn near anywhere you would want to deploy a networked embedded system. Many systems have IPv6 support but you will still need to talk to IPv4 devices, and you need an IPv4 stack to do that.
- eecc 8y agoAh ok, so we'll never get over IPv4 if we still take potshots at anything that doesn't support it. Oh by the way, I'm sure we all agree that using IPv4 for IoT, especially new deployments, is a particularly bad idea.
- eecc 8y agoMost home networks are also a single collision domain where an IPv6 network can establish itself autonomously, without the kludges of a v4. People, just let it rest.
- howard941 8y agoShow stopper :( . I can't justify an OS more complex than a simple message queue-based scheduler if the target isn't internetted. And I get arguments about the scheduler ("You should use a commutator/superloop"). Don't wish to be a downer though, seems like a great academic project. EDIT Elaborated beyond two words and the slimey
- wieghant 8y agoRecently needed multi-threading with Arduino. Going to give this a shot. I'm sure people more well-versed with non-POSIX may have gripes, but I'm just doing this for hobby purposes. I'm familiar with Linux, I need multi-threading and maybe a network stack. Given that, this seems like the thing for me.
- durub 8y agoI also recommend taking a look at Zephyr RTOS [1]. I've been using it in production for almost a year, and no major complaints so far. There seems to have support for POSIX threads and BSD sockets, but I don't use them, so I can't tell you if they are production-ready or not. [1]: https://www.zephyrproject.org/ https://www.zephyrproject.org/
- mtgx 8y ago> Standard programming in C or C++ As if IoT manufacturers weren't already ignoring the security of their IoT devices and properly updating them. I think if IoT devices are to adopt a good open source RTOS it should at least be one written in a memory safe language.
- monocasa 8y agoWhat language do you suggest? The GCed languages aren't real time (yes there are hard real time GCs, but they come at the cost of overall perf and close to an order of magnitude more memory usage which is a non starter for many embedded boards). Rust support for AVR isn't mainlined and is frequently broken. It's Xtensa (ie. esp8266) support is basically non-existent. Did I miss another option?
- jungler 8y agoI scrolled through https://github.com/dbohdan/embedded-scripting-languages https://github.com/dbohdan/embedded-scripting-languages And there are some options. You could achieve barebones VM protections with Pawn(the language enforces very little otherwise, though). You could use something ref-counted like a TCL implementation, which would allow you to design around linear allocation times. The vast majority are using some kind of tracing collector of course, but I wouldn't say this is a total loss for achieving a combination of real time and memory protection.
- monocasa 8y agoThere 'embedded' means 'a library included as a subsystem in a larger application', not 'embedded systems'. PAWN for instance is explicitly 32bit and interpreted, so would run dog slow on something like an Arduino. Something refcounted like TCL implies tons of heap allocations, which implies fragmentation at the very small RAM sizes of a lot of these chips.
- travisgriggs 8y agoWe played with RIOT for a couple of months. For our current product, (and I would think a lot of IoT apps), power is king. We run on batteries, and getting back to idle/low power states as often as possible is crucial. I've found that a lot of the embedded RTOS often have tickless modes as an "add on." We had problems getting RIOT to a happy point with that for our chip (samd21). Like some of the other commenters, I've grown a real distaste for embedded RTOS frameworks that try to provide all kinds of layers. In order to be generic/cross platform, they always come up short in capability. The functionality that I'm looking for, is simply getting the basic threading/sync primitives to work well and right. Past that, I'm fine doing the chip IO parts myself. At the time, there was a debate on whether priority inversion was a problem RIOT should worry about or not. After FreeRTOS, and then RIOT, I found TNEO (https://dmitryfrank.com/articles/how_i_ended_up_writing_my_own_kernel https://dmitryfrank.com/articles/how_i_ended_up_writing_my_o...). It's been a dream and rock solid for us. It does not come with a large make/build system. It's just C code. You tweak a couple of things, include one or two bits, and I was off to the races. Coupling it with Unity for testing and then writing ~200 unit tests that stressed all of its functionality was straightforward, helped me understand it even better, and gave me a high degree of confidence in its abilities. It's been super solid for us since. It does the one thing I need it to: MicroKernel for dealing with processes and related synchronization primitives.
- nbzklr 8y agoThere are a lot of realtime operatings systems out there right now, competing for a spot on the IoT hypetrain: - the mentioned RIOT OS (https://riot-os.org/ https://riot-os.org/) - FreeRTOS (https://www.freertos.org/ https://www.freertos.org/) and Amazon's version of it (https://aws.amazon.com/freertos/ https://aws.amazon.com/freertos/) - Zephyr OS (https://www.zephyrproject.org/ https://www.zephyrproject.org/) - MyNewt (https://mynewt.apache.org/ https://mynewt.apache.org/) - Mbed OS (https://os.mbed.com/ https://os.mbed.com/) and more... Makes it really hard to choose one!
- andrewstuart 8y agoAnother embedded OS is iTRON https://en.wikipedia.org/wiki/ITRON_project https://en.wikipedia.org/wiki/ITRON_project