MQTT client/broker on small embedded systems (MQX?)

1,256 views
Skip to first unread message

john

unread,
Nov 21, 2013, 4:34:44 PM11/21/13
to mq...@googlegroups.com
I'm considering using MQTT in an upcoming project, but the target hardware is pretty small, 512K flash, 64K SRAM.  That rules out Linux, so I'd be porting to MQX, which has an almost-sockets Ethernet library and a not-nearly pthreads task/mutex library (IMHO).   I can see some benefits if I can get just a client working, but the big payoff is if I could get a broker working too.   

I'm looking for a basic "you're crazy" / "yeah, sure" / "maybe" response, and pointers to the best "C" sources for something so small.  

John

Raphael Cohn

unread,
Nov 22, 2013, 2:50:36 AM11/22/13
to mq...@googlegroups.com
John,

I've seen MQ clients run in such constraints very successfully, with TLS working effectively as a bonus. For a broker, it may be possible to use some of the protocol, although some features requiring unbounded state (will messages, QoS 2, retained messages) might be a bit tough to do. It really depends how much of the device's resources you need 'for other things'. For CANBUS integrations, I think you'd be screwed (from memory, the smallest I ever saw that could do useful things was about 44K, leaving you far too little). The sort of tricks I'd be thinking about are using the flash storage to include as much meta-data and state of topics, message transmission, etc, as possible, whether in file names, memory offsets, pointer bits, file attributes or simply headers which one can mmap (or the equivalent) or swap in. Maybe even to the point of storing messages as MQTT packets with a 'x remaining to read / write' header.

If it's useful I do know a freelance guy who's done this sort of thing before. Happy to put you in touch.


Raphael Cohn
Chief Architect, stormmq
Co-Chair, OASIS MQTT Standard
Secretary, OASIS AMQP Standard
raphae...@stormmq.com

UK Office:
Hamblethorpe Farm, Crag Lane, Bradley BD20 9DB, North Yorkshire, United Kingdom
Telephone: +44 845 3712 567

Registered office:
16 Anchor Street, Chelmsford, Essex, CM2 0JY, United Kingdom
StormMQ Limited is Registered in England and Wales under Company Number 07175657
StormMQ.com


--
--
To learn more about MQTT please visit http://mqtt.org
 
To post to this group, send email to mq...@googlegroups.com
To unsubscribe from this group, send email to
mqtt+uns...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/mqtt
 
---
You received this message because you are subscribed to the Google Groups "MQ Telemetry Transport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dave Locke

unread,
Nov 22, 2013, 4:22:17 AM11/22/13
to mq...@googlegroups.com
A client will easily run there - there are a number of examples of clients running on embedded systems such as the arm mbed environment.  There are some thoughts around modifying the paho mqtt c client to make it make it easier to target to embedded systems, today it relies on posix interfaces.  

With respect to server / broker support, with 64k ram that should be sufficient to run a small broker.  If memory serves me right RSMB runs in a couple of K and RSMB is a full feature MQTT server. That said not aware of a non posix based server.


All the best
Dave

--

--
To learn more about MQTT please visit

http://mqtt.org



To post to this group, send email to mq...@googlegroups.com
To unsubscribe from this group, send email to
mqtt+uns...@googlegroups.com

For more options, visit this group at

http://groups.google.com/group/mqtt

---
You received this message because you are subscribed to the Google Groups "MQ Telemetry Transport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Caio

unread,
Nov 21, 2013, 9:18:07 PM11/21/13
to mq...@googlegroups.com
Good question

2013/11/21 john <r10kinds...@gmail.com>:
> --
> --
> To learn more about MQTT please visit http://mqtt.org
>
> To post to this group, send email to mq...@googlegroups.com
> To unsubscribe from this group, send email to
> mqtt+uns...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/mqtt
>
> ---
> You received this message because you are subscribed to the Google Groups
> "MQ Telemetry Transport" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mqtt+uns...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
----------------------------------------------
Caio Pereira
Reply all
Reply to author
Forward
0 new messages