[fpc-pascal] MQTT package for freepascal/lazarus?
Bo Berglund
bo.berglund at gmail.com
Thu Oct 20 15:57:06 CEST 2022
On Thu, 20 Oct 2022 11:11:17 +0200, Bo Berglund via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
>On Tue, 11 Oct 2022 19:42:26 +0200 (CEST), Karoly Balogh via fpc-pascal
><fpc-pascal at lists.freepascal.org> wrote:
>
>>Hi,
>>
>>On Tue, 11 Oct 2022, Bo Berglund via fpc-pascal wrote:
>>
>>> I am looking for a pascal implementation of the MQTT protocol.
>>> I could not find anything inside Lazarus' OnLinePackageManager.
>>>
>>> Is there something like that available?
>>
>>I made a front-end Pascal library, and and Object Pascal wrapper for
>>libmosquitto a couple of years ago. It's available here. It's know to work
>>on Linux, Windows and macOS at least. It's against libmosquitto 1.x. Not
>>sure if 2.x got released meanwhile. I can update things if needed. (Pull
>>requests are welcomed.)
>>
>>It's available here:
>>https://github.com/chainq/mosquitto-p
>
>Well, the version of the mosquitto broker server that gets installed on my
>RaspberryPi4 is:
>
>$ mosquitto --version
>Error: Unknown option '--version'.
>mosquitto version 2.0.11
>mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker.
>
>So this is what I have to communicate with as a client.
>
>I need to be able to publish as well as subscribe to topics.
>
>In the Lazarus forum I have seen people having problems with this when they use
>various FPC packages while the native command line works OK (on Linux), probably
>because they are using old packages not updated for the changes made in MQTT in
>recent years.
>
>So this is why I am asking if there is some MQTT client package available for
>FPC/Lazarus that complies to the updated protocols?
I found this on the Lazarus forum:
https://forum.lazarus.freepascal.org/index.php/topic,54397.msg435050.html#msg435050
Not a poackage, but rather advice on how to utilize binary "drivers" installed
on the system via translated header files. Not optimal, but might be doable
anyway.
I will try that path going forward, just now dealing with the MQTT source
devices.
--
Bo Berglund
Developer in Sweden
More information about the fpc-pascal
mailing list