[zeromq-dev] 0MQ on embedded devices - Quadrocopter project

Martin Sustrik sustrik at 250bpm.com
Thu Nov 24 09:54:43 CET 2011


Hi Rudie,

> I'm new to 0MQ but have been devouring the documentation for the past two
> days. I can easily relate to it in my day job (and will use it in an
> Enterprise setting), but I have something more interesting in mind for it
> right now.
>
> It seems to be the perfect missing link in the embedded world to bring
> devices and cloud services together - but that means it needs a port to
> microprocessor platforms like PIC, AVR and ARM. I'm talking about running
> 0MQ on a device with no operating system and an embedded TCP/IP stack (or
> no TCP/IP at all).

Nope. Nobody tried running 0MQ on a raw metal AFAIK and I guess it'll be 
pretty hard, given that 0MQ uses quite a lot of POSIX functionality (at 
least TCP/IP and pthreads)

What you can try to do though on such devices to implement the wire 
protocol on the device. It's not complex. See here:

http://www.zeromq.org/bindings:bash

> Has this kind of thing been tried? The source seems portable enough to
> attempt this.

The source is rather portable, but again, you need at least BSD sockets 
and pthreads (or similar) to make it work.

> As a proof of concept I'd like to port it to a LPC2387 processor running
> .Net Micro Framework. The core 0MQ lib would be native C, layered with
> NETMF in C# over the API. This will basically give the ability to run
> native C real-time routines and elegantly interact with the C# "business
> logic" layer above it using messages instead of threads or callbacks.
>
> Initially I don't need TCP and will only use Inproc. It would be
> interesting to see if it would be possible to implement a Serial transport
> for device to device comms too.

Great! Let us knows how it goes.

> The architecture has me all excited because it solves a great many
> problems in the embedded world and I think 0MQ should be a foundational
> component in the "The Internet Of Things" movement.

Yes. I have the same idea. Controlling swarms of devices without running 
into unmanageable complexity is one of the crucial problems with IoT and 
the concept of standardised "messaging patterns" as used in 0MQ seems to 
be a neat way to address that problem.

> I'd like to build a real device in the form of a Quadrocopter. See
> http://www.tinyclr.com/forum/2/4454/ . It is early days, but if you look
> at the architecture I am proposing there, you'll immediately see why 0MQ
> is the right choice... It just needs to run on a tiny little chip, in a
> deterministic way, and a crash in the software would mean a crash in the
> hardware (by falling out of the sky :) )

:)

Martin



More information about the zeromq-dev mailing list