Questions tagged [pahocpp]

19 questions
12
votes
2 answers

MQTT C++ client

I'd like to implement an MQTT client functionality in C++ (it needs to be thread-safe, and be able to subscribe to topics and also publish, but no broker functionality is needed). I was considering Paho MQTT by Eclipse. Here is their download…
Daniel
  • 2,318
  • 2
  • 22
  • 53
3
votes
1 answer

Paho C++ MQTT Client unable to connect to Mosquitto on Ubuntu Docker Image (Python Client Works)

I am facing this issue for a couple of days and I am unable to reproduce it outside the Ubuntu Docker container. Please refer to this simplified diagram of my architecture: As you can see, I have everything running inside the Docker container. This…
asergio
  • 81
  • 7
3
votes
1 answer

Using https://github.com/eclipse/paho.mqtt.cpp with a cmake build

I'm a bit new to CMake. So this might be a noob question.. I'm trying to build cpp project with CMake. I would like my program to publish to a mqtt broker. I'm running on Linux. So I installed https://github.com/eclipse/paho.mqtt.cpp and the…
darthShana
  • 367
  • 1
  • 4
  • 16
2
votes
0 answers

Paho MQTT C++ client server address issues when connecting to the broker

I am developing a C++ MQTT client to connect to the AWS IoT Core and I am using Paho MQTT CPP for that. My code is simply based on the ssl_publish which uses the async_client class and SSL for communicating with the broker. I have discovered that…
Ramin Toussi
  • 97
  • 1
  • 11
2
votes
1 answer

Pass data from one class to another without passing object

I am using paho-mqtt c++ library. I'm using the asynchronous communication model. I have created Callaback class and implemented necessary methods. I have also created a mqtt_client class which holds transmit and recieve queues along with several…
Dark Sorrow
  • 1,681
  • 14
  • 37
1
vote
1 answer

Using Paho MQTT C++ to connect to AdafruitIO

I'm trying to create a TLS connection to AdafruitIO using paho C++. I can connect and interact with it using 1883 non TLS, but when trying to get TLS going on 8883, it fails to connect. I was able to do this in C++ using the mosquitto C++ library,…
Peter Buelow
  • 448
  • 3
  • 10
1
vote
0 answers

MQTT Paho C/C++ Client for Windows using Eclipse + MinGW

I am trying to use MQTT Poho C/C++ Client on Windows using Eclipse CDT and MinGW. On Windows 10 I have installed Eclipse Neon and MinGW latest version with POSIX Thread Support. Issue with MQTT Paho C++: I have download the MQTT Paho Client C++…
User7723337
  • 11,857
  • 27
  • 101
  • 182
1
vote
1 answer

Using Paho MQTT in OMNeT++ Simulation

I am integrating the Paho MQTT C++ library into an OMNeT++ implementation. I copied over the source directories and use the custom make files of the projects for building the C and the C++ libraries inside OMNeT++. I am using some test code which…
mapf
  • 496
  • 1
  • 5
  • 21
1
vote
0 answers

Compiling C++ Paho MQTT code gives error "Could not find Paho MQTT C library"

I'm using Ubuntu 16.04, I cloned the c library at ~/Paho_MQTT/paho_c and ran following commands in paho.mqtt.c folder, sudo apt-get install build-essential gcc make cmake cmake-gui cmake-curses-gui sudo apt-get install fakeroot fakeroot devscripts…
Salman
  • 81
  • 9
0
votes
2 answers

Cross compiling code using Paho MQTT C & C++ libraries causing issues when publishing with a nonzero QoS

I have tried cross-compiling some small C++ code for a Raspberry Pi Model 3b using my Windows machine via Ubuntu-20.04 on WSL2. It uses the Paho MQTT C and C++ libraries to subscribe to and sometimes publish some messages. I'm pretty sure that most…
neil
  • 13
  • 3
0
votes
1 answer

Using CA certificate in mqtt paho

I'm writing application that collect some hardware inputs and send it to MQTT broker. Currently, broker use credentials only, no SSL, and all works fine. (Program is written in C++, Linux. I use Paho MQTT library- by including source code, not…
zimopisec
  • 1
  • 3
0
votes
1 answer

Can subscriptions clash in MQTT (Paho)?

I have a question about subscriptions in Paho and how applications can manage disparate topics (allowing for wildcards). We're interested because we're providing a layer to manage all this stuff to both simplify life for the developers and so we can…
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
0
votes
1 answer

Paho C++ async client callbacks vs action_listener vs connected_handler

I'm trying to understand the usage and behaviour of the various callback mechanisms in the Paho MQTT C++ library when using the async_client, specifically: mqtt::callback mqtt::iaction listener mqtt::connection_handler What I'm trying to achieve:…
Steve Magness
  • 863
  • 14
  • 25
0
votes
1 answer

is paho.mqtt.cpp just a wrapper of paho.mqtt.c,what is different between the two?

paho.mqtt.cpp refer to c version, from aspective of MQTT protocol, the two implements have almost same feature.so why use cpp version to wrapper c version? what is the advantage of cpp version than c version in feature、performance..etc? could…
0
votes
1 answer

Paho C++ Lib integration: Unresolved external errors

I am trying to use the Paho C++ library within my own C++ project (Visual Studio 2017). I have built and installed the Paho C lib and Paho C++ lib as it was explained here . So far so good. Afterwards, I created a new (blank) C++ project in Visual…
user7335295
  • 401
  • 2
  • 7
  • 31
1
2