Questions tagged [libmosquitto]

MQTT client library maintained by Eclipse IoT project. It is written in C language.

Read Eclipse Mosquitto project overview. This MQTT client library is developed as part of Eclipse IoT mosquitto project. The client header file mainly used is mosquitto.h(1)

  1. This library also has bindings in languages like C++(mosquittopp) and Python. Those bindings are also covered under this tag.
  2. This library is different from the client library provided by Eclipse Paho project and so queries related to Paho client and it's bindings( e.g. mqttpp ) should not use this tag.
77 questions
2
votes
1 answer

Swift MQTT libmosquitto cleanSession set to false yet unable to set up a persistent subscription

client = MosquittoClient(clientId: "client1") client?.delegate = self client?.port = 1883 client?.host = "someIPAddress" client!.cleanSession = false client?.connect() libmosquitto is a objective c library that is bridged over into a swift project.…
2
votes
3 answers

mosquitto denied access by tcpd

I used mosquitto as MQTT broker, and it seems if connection number is more than 1000, the below log printed. Anybody know something about this? 1470896904: Client connection from 111.7.170.177 denied access by tcpd.
Chris Feng
  • 189
  • 5
  • 19
2
votes
1 answer

mosquitto and SSL/TLS in C

I am trying to connect to an MQTT broker in SSL/TLS using libmosquitto (in C). I am sure it is working on the server side as I successfully connected to the borker using mosquitto_sub (or mosquitto_pub) in the command line and with the same…
Antoine
  • 63
  • 2
  • 6
2
votes
1 answer

Json string usage in mosquitto_publish

Using C client library (libmosquitto) How to publish this json string to MQTT mosquitto broker "book":[ {"Name":"xyz", "price":"5.00"}, {"Name":"abc", "price":"10.00"}, {"Name":"hello world", "price":"15.00"} ]} using this function. …
marvic
  • 31
  • 2
  • 8
2
votes
1 answer

upgrading libmosquitto from 1.1.3 to 1.4.8 in iOS

I am working on a project where I am using libmosquitto 1.1.3. It is working fine with WITH_TLS flags for ssl. Now I have to upgrade the library to latest version which is 1.4.8. I was unable to download new library but it does not have WITH_TLS…
Sundeep Saluja
  • 1,089
  • 2
  • 14
  • 36
1
vote
1 answer

Mosquitto MQTT Client return error 10 in loop_start function call after connect call

I'm writing an MQTT client which simply connects to the broker, and publishes or subscribes to a topic. Here in the program, I try to Connect to Broker and then call the loop_forever() function and is execute successfully and gets a connect…
1
vote
1 answer

why libmosquitto close the connection after publish the first message to rabbitmq using it as mqtt broker?

I am doing this in windows with WSL, i don't know if its related I create a simple broker with docker compose version: "3.9" services: # Create service with RabbitMQ. broker: image: rabbitmq:3-management ports: - "5672:5672" …
Johnny Vm
  • 41
  • 6
1
vote
1 answer

How can I disable retries in mosquitto_connect() function?

Using this program: /* compile using: $ gcc -o libmosq libmosq.c -lmosquitto */ #include #include #include #include void connection_callback(struct mosquitto* mosq, void *obj, int rc) { if (rc) { …
fgalan
  • 11,732
  • 9
  • 46
  • 89
1
vote
1 answer

mosquitto MQTT parsing issue

I am using libmosquitto and the parson library in a C application running on my IoT device for doing stuff with MQTT and parsing JSON. When I publish a message to my device using the mosquitto_pub command on a Linux terminal as follows…
Engineer999
  • 3,683
  • 6
  • 33
  • 71
1
vote
1 answer

How to determine the type of encryption used when using libmosquitto

I am developing a C application for Linux using libmosquitto for the MQTT communication between my application and an MQTT broker elsewhere. I am enabling TLS for authentication and encryption. How do I actually find out which type of encryption is…
Engineer999
  • 3,683
  • 6
  • 33
  • 71
1
vote
1 answer

Libmosquitto publish doesn't deliver all messages to Azure IoT Hub

I'm trying to publish more than 100 messages per second to Azure Iot Hub built-in event hub. I'm using libmosquitto 1.6.8 library. I'm using the Free tier package for Azure Iot Hub, I know that there is throttle limit of 100 messages per second. But…
1
vote
0 answers

Need some help in Fuzzing Mosquitto lib

Here comes a bug while fuzzing Mosquitto lib, I would like to know the solution. Step1. compile the lib #:~/fuzz/fuzzmqtt/mosquitto$ ls about.html doc Makefile security aclfile.example docker man …
1
vote
1 answer

Cross compilation using Renesas G1E toolchain. Getting linker error though library files are already there in lib directory

I am trying cross compile C code (outside yocto) using toolchain (/home/amruta/Downloads/poky-glibc-x86_64-core-image-weston-sdk-cortexa7hf-neon-toolchain-2.4.2.sh) for renesas G1E module. Procedure followed to cross compile : Installed given…
APS
  • 59
  • 1
  • 7
1
vote
1 answer

Client using libmosquitto gets "tlsv1 alert internal error" using TLS, works fine without TLS

I am trying to set up a client utilizing libmosquitto. Connecting to the broker works like a charm, with and without TLS. But whenever I try to send data over the TLS connection, I get the error: Blockquote 1486712210: OpenSSL Error:…
Mathias
  • 31
  • 1
  • 9
1
vote
2 answers

How to Link to mosquitto lib in cmake?

I have installed mosquitto lib in my Rpi using this tutorial. /usr/local/bin has mosquitto_pub and mosquitto_sub and the mosquitto server deamon is in /usr/local/sbin. Then trying to link the library in my cmake file as…
batuman
  • 7,066
  • 26
  • 107
  • 229