TCP/IP Meets Physical Reality
An anonymous reader writes "When Google is clouding
the borderline between web and the desktop, a much, much smaller
project is blurring the border between the Internet and the
physical reality: the newly released Contiki
operating system version 2.2.1. Contiki runs on networked wireless
sensors that are used for anything from road
tunnel monitoring for fire rescue operations to collecting vital
statistics from ice hockey players. These sensors
typically have as little as a few kilobytes of memory and a few
milliwatts of power budget — a thousandth of the resources of a
typical PC computer — yet Contiki provides them with full TCP/IP
connectivity. Meanwhile, San Francisco is monitoring parking spaces with wireless technology."
Looking at the wikipedia page :
http://en.wikipedia.org/wiki/Contiki
Confirms why I thought of the C64 when I read Contiki.
Here is a list of supported systems from wikipedia :
* Computers:
o Apple II family[1]
o Atari 8-bit[1]
o Atari ST
o Atari Portfolio
o Casio Pocketview
o Commodore PET[1]
o Commodore VIC 20[1]
o Commodore 64[1]
o Commodore 128[1]
o GP32
o Oric
o PC-6001
o Sharp Wizard
o x86-based Unix-like systems, on top of GTK+ as well as directly using the X Window System[2]
* Video game consoles:
o PC Engine
o Sega Dreamcast
o Sony PlayStation
* Handheld game consoles:
o Nintendo Game Boy
o Nintendo Game Boy Advance
Impressive features as well :
A full installation of Contiki includes the following features:
* Multitasking kernel
* Optional per-application pre-emptive multithreading
* Protothreads
* TCP/IP networking
* Windowing system and GUI
* Networked remote display using Virtual Network Computing
* A web browser (claimed to be the world's smallest)
* Personal web server
* Simple telnet client
* Screensaver
"IP Addressing of Every Little Thing"
and yes, it's boring.
How we know is more important than what we know.
See 6LoWPAN. Or here.
LwIP is an IP stack (not a variation of TCP/IP) written by the author of Contiki, however it is not used by Contiki. The uIP stack, written by the same author, is used by Contiki.
I am TheRaven on Soylent News
I am not as well-versed in this as you seem to be, but from looking at the code, there seems to be both IPv4 and IPv6 in there. IPv6 is enabled by a C preprocessor switch (UIP_CONF_IPV6):
http://contiki.cvs.sourceforge.net/contiki/contiki-2.x/core/net/uip.c?view=markup
What you're talking about is called Mobile IP, which is standardized by RFC 3344. Doesn't seem to be used very widely, probably because the density of 802.11 access points isn't high enough for it to be useful in most areas.
briefly, the reason you don't see MobileIP deployed is because MobileIPv4 requires a Foreign Agent in the foreign network, ie in the network where your Mobile Node is right now. as there's no clear incentive to the foreign networks administrator to provide such a thing for you, it seems unlikely that this will become commonplace. MobileIPv6 however does not require a Foreign Agent, as long as your Mobile Node and the Correspondent Node (ie the server you want to talk to) both speak IPv6, the only other thing which is needed is a Home Agent in your own network, which you can set up at your own leisure.
The Contiki OS alone is about 2.5 kB, and some people have gotten TCP/IP on it running with 250 bytes of RAM
250 bytes of RAM is enough for uIP if you can have the code in ROM. It limits you to around one or two connections, but I'd imagine a device with only 250B of RAM doesn't have enough resources to handle more than this anyway. All of the RAM used by uIP is statically allocated, so compiling it with support for just 1 connection will get it down to a footprint of around this size. I'm not sure if the 250B figure was for just the IP stack or for the OS, IP stack and application. If it's for everything, then that's indeed quite a feat. If not, then it's relatively easy. You can trim the RAM usage for uIP down really low. One of the biggest RAM users is fragment reassembly. If you use UDP only and restrict yourself to packets smaller than the MTU (it's pretty hard to have bigger ones with only 250B of RAM anyway...) then you can make it very small. Using the zero-copy API, almost all of the RAM you need is the send buffer.
I am TheRaven on Soylent News