Forum > Ported from Delphi/Kylix

MQTT

(1/2) > >>

picstart:
MQTT is a communications protocol often used for IoT.
Has anyone got MQTT client modules for Lazarus?
 There is Delphi code available ..has anyone ported it to the lazarus IDE?

derek.john.evans:
I guess you are talking about this?
http://jamiei.com/blog/code/mqtt-client-library-for-delphi/

It uses Synapse (unit blcksock) which works with FreePascal. I looked at the code, and I cant see any issues.

I guess, try it and find out. You may need to place {$MODE DELPHI} at the top of the 2 files.

picstart:
Yes I brought the MQTT.pas and the MQTTReadThread.pas units and the needed synapse units. It compiles under  the Lazarus IDE with the addition of {$MODE DELPHI} to the two units. It mostly works but errors on a call to  MQTTClient.Free;
I was hoping with the increasing interest in IoT a perfected MQTT feature may have been available for Lazarus. Maybe I'm the first to consider Lazarus as useful for IoT
Thanks for the help.

d.ioannidis:

--- Quote from: picstart on September 25, 2015, 05:32:52 pm ---Yes I brought the MQTT.pas and the MQTTReadThread.pas units and the needed synapse units. It compiles under  the Lazarus IDE with the addition of {$MODE DELPHI} to the two units. It mostly works but errors on a call to  MQTTClient.Free;
I was hoping with the increasing interest in IoT a perfected MQTT feature may have been available for Lazarus. Maybe I'm the first to consider Lazarus as useful for IoT
Thanks for the help.

--- End quote ---

I succesfully used that code but for me the lack of QoS 1 and 2 is a showstopper.

Plz try this code from here https://github.com/pjde/delphi-mqtt.

Regards,

jdp:
Hi all. I need to have mqtt in Lazarus ob Raspberry Pi.
I managed to get a app working but it will crash at random when calling the ping or when receiving a payload. It works well on Windows but crashes on the Raspberry Pi.

Can sombody please help me as I need a GUI app on Raspberry Pi.
I can share the little app if it will help to try and fix the problem.

Navigation

[0] Message Index

[#] Next page

Go to full version