Hacker News new | past | comments | ask | show | jobs | submit login
Contiki – OS for networked, memory-constrained systems (wikipedia.org)
155 points by JNRowe on Jan 31, 2023 | hide | past | favorite | 28 comments



In my networking class in college, our final project was to create a location sensing mesh network of devices running Contiki. The devices would receive a ping from a beaconing device and we had to locate it. We only had to worry about two axes, but the walls still made things difficult. It was a pretty fun project! It made me really interested in networking stuff.

I wish I still had the course material and code but unfortunately I lost the laptop it was on.


Heh, I was also introduced to Contiki via a college networking course.


The magic source of Contiki is IMHO the use of protothreads as a lightweight concurrency system. Protothreads can also be used to implement synchronous programming models - like this one: https://github.com/frameworklabs/proto_activities


Does not seem to be ported to ESP8266 based hardware.

This one has become almost a de-facto standard in IoT/Home Automation, along with its successor the ESP32.

It seems the the network layer has been mostly built around IEEE 802.15.4 (6LoWPAN) and not 802.11 (WiFi) which made sense a the time.

Low power/low cost Wifi is now a reality and ESP based hardware is both easy to use and to integrate.

Contiki could have played a role in this (still emerging) home automation ecosystem...


The wiki page says it all, but I'll highlight - Contiki has been written by Adam Dunkels, the one who invented Protothreads (coroutines using Duff's Device), uIP, lwIP and a TCP stack that fits into a single tweet - http://dunkels.com/adam/twip.html


> Protothreads (coroutines using Duff's Device)

You sure? iirc they were just "stackless" threads with true cooperative switching (so like a true context switch by changing PC but not having to switch SP and keep multiple stacks).

If you would be right I could stop being salty about something I have ever been salty since 15 years or so: I "invented" (no not really, people did this before, but in the context of the raising meshed tiny sensor network hype at that time) in my thesis, then a researcher with connections to SICS took that with him and to this group, and half a year later Contiki appeared with the same approach (just more polished and a much better PR to contend with the much uglier TinyOS).


For my master thesis, 15 years ago, I was working with motes (the component of wireless sensor network) to create a new authentication algorithm and we use Contiki and TinyOS (https://github.com/tinyos/tinyos-main). I am glad to hear that Contiki it's still alive, it was more complex than TinyOS, but also more features rich.


Totally OT, but I assume that the name is based on Kon Tiki, a raft that famously crossed the Atlantic with a crew of six.

Which is quite a extreme example of a network in a constrained system, with the security of an IoT device. ;)

https://en.wikipedia.org/wiki/Kon-Tiki_expedition


To go further off topic, it was the Pacific not the Atlantic. Also, landfall was in French Polynesia, so not really crossed either.


At some point I heard Atari 800 (released in 1979) was the oldest machine ever to connect to the Internet, thanks to Contiki. But a quick google now suggests older DEC machines from mid 70s. Still impressive though.


What about the Apple II and Commodore PET, both older than the Atari 800?


This is probably where I heard it (I was a member): https://cc65.github.io/mailarchive/2003-03/2815.html

So it was before the other ports and in all likelihood it was never an official record anyway.


Contiki has always amazed me. One of my future projects has porting it to some random old system I like and expanding the functionality on it. Maybe even I retire. sigh


This claims Atari Jaguar support, but I've never seen it. Does anyone have any links to video or imagery of it in action on that platform?



Thank you!


Would love to be able to run this on "junk" hardware, say, a super old, 32-bit obsolete Netgear router, etc.

Not necessarily for networking purposes, but just to be able to leverage the hw for fun.

Though a Contikibased router OS/OpenWRT clone would be awesome!


It has been shown to run on a 8-bit 6502 processor: Atari 800 XL.


I had a teacher during my undergrad who promised us he'd pretty much only use Contiki for a very hands-on IoT course. I was really excited so I fiddled around with it during holiday break in anticipation, going a bit beyond the initial tutorials.

During the entirety of the class however, we ended up just installing the thing and never doing a single example. Only one class had us programming and that was for a surprise Arduino assignment.

To this day though, I wonder how things could've been had he followed on with Contiki. It's nice to see it here on the front page after all that time.


The Contiki-NG project doesn't seem to show much other than the ARM based boards; nothing about the Z80 support can be found, at least in the docs I looked at. Did I miss it?


>"Contiki provides multitasking and a built-in Internet Protocol Suite (TCP/IP stack), yet needs only about 10 kilobytes of random-access memory (RAM) and 30 kilobytes of read-only memory (ROM). [1] A full system, including a graphical user interface, needs about 30 kilobytes of RAM.[5]"

Nice!


I could have sworn I originally heard of this OS in the context of it running on the C64. Searching for it confirms this with information from the C64 wiki, but it only links to the main site which seems to to have removed any reference to it.

Is there a way to find the C64 version?


C64 is clearly part of the tree, not an extra version? https://github.com/contiki-os/contiki/tree/master/platform/c...


It looks like the non-ng version has the C64 version.

https://github.com/contiki-os/contiki/tree/master/platform/c...


Its main competitor these days seems to be RIOT: https://www.riot-os.org/


What are the products which we can buy in market with this OS?


https://www.tado.com/ (at least was in the past)


telosb was what I was using during my thesis. About 10 years ago.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: