Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » mqtt on raspberry pi
mqtt on raspberry pi [message #1760472] Thu, 27 April 2017 14:58 Go to next message
Jason Kao is currently offline Jason KaoFriend
Messages: 2
Registered: April 2017
Junior Member
Hi everyone, I'm new to 4diac and I want to use mqtt protocol on raspberry pi.
I follow the steps on the website but get confused with some points.

First, after I git-cloned the org.eclipse.paho.mqtt.c, it is said that I have to open the <paho src code>. However, under the src directory, there are no Makefile. The Makefile only exists in the paho.mqtt.c directory. Does this mean that I have to execute "make" in the paho.mqtt.c directory?

Second, it is said that I have to set FORTE_COM_PHAOMQTT folder in CMake. However, I am not sure which directory I should select. Currently, I select the path of paho.mqtt.c directory (i.e. /.../.../.../paho.mqtt.c), but when compiling, there are something wrong. It shows that libpaho-mqtt3a.so file is not recognized.

index.php/fa/29163/0/
index.php/fa/29164/0/

Any help appreciated. Thank you!
  • Attachment: mqtt-1.png
    (Size: 45.47KB, Downloaded 194 times)
  • Attachment: mqtt-2.png
    (Size: 20.01KB, Downloaded 201 times)

[Updated on: Fri, 28 April 2017 03:33]

Report message to a moderator

Re: mqtt on raspberry pi [message #1760531 is a reply to message #1760472] Fri, 28 April 2017 06:36 Go to previous messageGo to next message
Milan Vathoopan is currently offline Milan VathoopanFriend
Messages: 11
Registered: August 2016
Junior Member
Hi,

I guess you will need to cross compile mqtt for Rasbpi. So the steps will be,

1) Cross compile mqtt for Rasbpi, which will generate Rasbpi specific libpaho-mqtt3a.so and other required libraries in build/output directory (For cross compiling, you can use the same procedure as you compile forte using cmake and Rsbpi tool chain)

2) Define FORTE_COM_PAHOMQTT_DIR, the directory where you built Rasbpi specific mqtt

3) Cross compile forte as mentioned in the official documentation

Hope this helps
Milan
Re: mqtt on raspberry pi [message #1760569 is a reply to message #1760531] Fri, 28 April 2017 12:32 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 27
Registered: March 2016
Junior Member
Hi all,

Milan is right, you first have to compile MQTT on the Raspberry Pi, as forte is only using MQTT as a third-party library. If you follow the manual on how to compile MQTT, the libraries will be placed into a standard folder inside the MQTT source tree, which CMake will then use to link against the MQTT library.

Regards,
Martin
Re: mqtt on raspberry pi [message #1760585 is a reply to message #1760569] Fri, 28 April 2017 15:35 Go to previous messageGo to next message
Jason Kao is currently offline Jason KaoFriend
Messages: 2
Registered: April 2017
Junior Member
Thank you two very much for your detailed explanation. I successfully compiled the MQTT on the raspberry pi and built forte with MQTT library.

Re: mqtt on raspberry pi [message #1760644 is a reply to message #1760585] Sat, 29 April 2017 15:17 Go to previous message
Herwig Eichler is currently offline Herwig EichlerFriend
Messages: 18
Registered: February 2016
Junior Member
Hi,
glad you already solved the issue, with the support of the others.
I did a little writeup for all the needed steps for getting MQTT up and running on the Pi with FORTE.
Maybe someone else will stumble across this thread and finds it useful.
kind regards
Herwig

[Updated on: Sat, 29 April 2017 15:21]

Report message to a moderator

Previous Topic:Problems deploying applications
Next Topic:Two dimensional arrays for Function Block data or internal vars
Goto Forum:
  


Current Time: Wed Feb 21 04:08:44 GMT 2018

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

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