Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Single threaded MQTT 'C' client
Single threaded MQTT 'C' client [message #930090] Tue, 02 October 2012 02:30 Go to next message
Manish Jain is currently offline Manish JainFriend
Messages: 3
Registered: October 2012
Junior Member
Hi All,

I have just downloaded the MQTT 'C' client. Somewhere in the documentation, I read that this client can
run in single thread also, and the behaviour of publish and subscribe will be synchronous in nature.

When I quickly peeked into the source code, there is no way by which we can run in Bare metal board(non OS based).

Please let me know if it is there and I missed it. I am planning to use very time processor to develop the mqtt client.
And having OS on this would be a costly affair.

Regards,

Manish
Re: Single threaded MQTT 'C' client [message #930521 is a reply to message #930090] Tue, 02 October 2012 11:49 Go to previous messageGo to next message
Scott de Deugd is currently offline Scott de DeugdFriend
Messages: 3
Registered: November 2011
Junior Member
here is reply from Andy Piper sent via Paho mailing list

What kind of board are you using, exactly?

There's a small MQTT client for the Arduino, another for Netduino, and one for mbed. None of these are currently part of Paho, and all of them have limitations around e.g. not supporting QoS levels greater than 0 (often due to the storage and local persistence limitations)

You mention running on bare-metal without an OS. The clients we currently have in the Paho project do expect at least a small OS (although that could be an embedded Linux or Java-type of thing as a minimum).

Andy
Re: Single threaded MQTT 'C' client [message #930558 is a reply to message #930521] Tue, 02 October 2012 12:34 Go to previous messageGo to next message
Manish Jain is currently offline Manish JainFriend
Messages: 3
Registered: October 2012
Junior Member
Andy,

Actually, we are using 8051 based processor with UART to send/receive message over TCP using GPRS module. So we don't need to have OS to have TCP stack. Secondly I believe multi-threading in the current implementation of Paho client is for subscription(though I need to reconfirm).

We are developing a GPRS based telematic solution, which is mostly into publishing only. Our data size is 4*4 Bytes, so for persistent data we can use the connected 1MB EEPROM. Which will be more than sufficient.


Thanks,
Manish
icon6.gif  Re: Single threaded MQTT 'C' client [message #930662 is a reply to message #930558] Tue, 02 October 2012 14:19 Go to previous messageGo to next message
Andy Piper is currently offline Andy PiperFriend
Messages: 15
Registered: November 2011
Location: Kingston upon Thames, UK
Junior Member

(you will find that Ian Craggs the C client author may respond more quickly on the mailing list... we are working on how to integrate communications though!)

OK, so MQTT as implemented by Paho does depend on a TCP stack, and an OS. There is a variant called MQTT-s (MQTT for sensors) which does not need TCP, but Paho doesn't implement that. You could also look at the Arduino MQTT client which is independent of Paho for some ideas that may help.

One technique that is sometimes used in the lightweight model that you are describing is to have a local "concentrator" node running e.g. embedded Linux which can understand your networking protocol (UART, serial, zigbee or other mesh networks are examples) and then aggregate the data packets from sensors. This would then send MQTT messages upstream to a broker and other applications.



Cloud Foundry Developer Advocate @ Pivotal | Eclipse Paho project co-lead | mqtt.org | andypiper.co.uk

[Updated on: Tue, 02 October 2012 14:22]

Report message to a moderator

Re: Single threaded MQTT 'C' client [message #931231 is a reply to message #930662] Wed, 03 October 2012 02:49 Go to previous messageGo to next message
Manish Jain is currently offline Manish JainFriend
Messages: 3
Registered: October 2012
Junior Member
Andy,

We are having GPRS enabled sensors, which are capable of transmit/receive data over TCP. With these sensors, we need to connect a small micro(8051), which will have MQTT implementation and in turn command sensor to send the desired packet over TCP.
MQTT-s wont be suitable for our application as we want the sensor should talk to the serve(broker) directly. In short, we need to have MQTT client.

Cheers,
Manish
Re: Single threaded MQTT 'C' client [message #1008759 is a reply to message #931231] Wed, 13 February 2013 19:52 Go to previous messageGo to next message
Ale Tog is currently offline Ale TogFriend
Messages: 1
Registered: February 2013
Junior Member

Have you found any suitable client for your needs?
I´ve also found it hard to get a bare-metal compatible client or even a freeRTOS compatible client.
However I´ve found, and will soon start testing, this client:
git://github.com/m2mIO/client-libraries.git
Regards,
Ale
Re: Single threaded MQTT 'C' client [message #1219829 is a reply to message #1008759] Fri, 06 December 2013 07:43 Go to previous message
Normunds Lacis is currently offline Normunds LacisFriend
Messages: 1
Registered: December 2013
Junior Member
Hi, in case it is still actual, I found how to make simple MQTT client by using GPRS module with AT commands.
Will do it in a similar way.

www.mfnode.com/software/wMQTTClient.pdf
Previous Topic:Sent time
Next Topic:Python client - subclassing
Goto Forum:
  


Current Time: Sat Nov 29 01:33:30 GMT 2014

Powered by FUDForum. Page generated in 0.01774 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software