CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

MQTT
https://forum.codesys.com/viewtopic.php?f=21&t=8884
Page 1 of 2

Author:  Stefan2 [ Tue May 29, 2018 8:45 pm ]
Post subject:  MQTT

Hi there!

I did implementing an MQTT library, test it an have fun…

Greatings

Short info from short doku...:

Quote:
Hello There,

with this library you are able to send and recvice MQTT paket on all QoS levels 0-2.

Use Pubish to publish data(Strings and binary),

Use subscribe to recive MQTT data. On Subscribe you can tell the FB if you are expecting an String as data, so you will get one on the pointer output.

How to use you can see n de TestMqtt FB. This is my Test Case an it does up to 100 send and recives per second on an raspberry PI 1+ connectet to an mosquitto broker on an
windows 10 maschine.

If you find errors, or anny instability, tell me, i will have a look.

I started to implement TLS, but this will take a wile, so don't care about the TLS and crypto errors.

This Projekt i using some parts of the grat OSCAT libs, so take a look at oscat.de


Stefan

Attachment:
MQTT.projectarchive

Author:  Aliazzz [ Wed May 30, 2018 10:27 pm ]
Post subject:  Re: MQTT

Would you be so kind and repost the projectarchive again?
> but this time be sure to add "CmpCrypto" v3.5.11.0 compiledLibrary

I can't seem to download this missing lib from the codesys store, so the projectarchive will not compile.

Many thanx in advance!

Author:  Stefan2 [ Wed May 30, 2018 11:25 pm ]
Post subject:  Re: MQTT

Hi Aliazzz,

This CmpCrypto Lib is missing on my System too. I can Add it in My Librarymanager, but it isn't resolved.

So, how i write in the first post
Quote:
I started to implement TLS, but this will take a while, so don't care about the TLS and crypto errors.


This is a Problem i need to solve for the TLS implementation im working in.

On my System ist working without.



Greetings Stefan

Author:  Stefan2 [ Thu May 31, 2018 7:19 am ]
Post subject:  Re: MQTT

Hi!


Did some improvements and added some coments, CmpCrypto error is gone…


have fun…

Stefan

Attachment:
MQTT.projectarchive

Author:  Aliazzz [ Fri Jun 01, 2018 9:28 am ]
Post subject:  Re: MQTT

Good work, thank you!

Author:  hanels [ Thu Jun 21, 2018 1:47 pm ]
Post subject:  Re: MQTT

Hi Stefan,

i have the same Problem with my PLC Program, could you tell me please how you solved the Problem of the CmpCrypto?


Thank you very much !


Hani
Stefan2 wrote:
Hi!


Did some improvements and added some coments, CmpCrypto error is gone…


have fun…

Stefan

MQTT.projectarchive

Author:  Stefan2 [ Mon Jul 09, 2018 11:11 pm ]
Post subject:  Re: MQTT

Hello Hanels,

i just deleted the TlcCmp Lib, i go Forward, TLS is now supporte by my lib, but still i have to do much.(Long Topics and payloads)


The Error first disapears when the lib is link on an runtime System, i don't know why, i think the linking to OpenSSL works only if the Runtime System in known.



Bye


Stefan

Author:  KevinR [ Tue Jul 10, 2018 12:48 pm ]
Post subject:  Re: MQTT

Hey Stefano,

thanks for the publish.

Could you please make it available on github? So we could help you with TLS integration. I think this would be a great community project.

cheers,
KevinR

Author:  Stefan2 [ Tue Jul 10, 2018 11:00 pm ]
Post subject:  Re: MQTT

Hello Kevin,

TLS implementation is already done, works fine to test.mosquitto.org.


but i still improving the lib to be able to use Topics up to 64kB an Payloads up to 200MB....


i am glad about your offer to help, i am going to think about it.


for this i Need to have a github account, but this shouldn't be the Problem.

Bye

Stefan

Author:  KevinR [ Wed Jul 11, 2018 9:16 am ]
Post subject:  Re: MQTT

Hello Stefan,

If TLS is already implemented is it possible to use also own registered cert?

Let me know if you need some help. I also can do some tests.


BR,
Kevin

Author:  Stefan2 [ Wed Jul 11, 2018 5:14 pm ]
Post subject:  Re: MQTT

Hello Kevin,

no, certification is not implemented yet. But should be no problem.

when i am further with the lib i tell you.

And i have a gibhub account now...

BR

Stefan

Author:  Aliazzz [ Sat Jul 21, 2018 8:40 pm ]
Post subject:  Re: MQTT

Count me in if you post your code in github ..
The newly posted Crypto Example should help out also

Author:  Stefan2 [ Tue Jul 31, 2018 12:43 pm ]
Post subject:  Re: MQTT

Hello,

now all needed Projects are on GitHub. TLS and MQTT are now splittet, i am going on to work on MQTT further.

If you like to ad certificates, you Need to work on CommonTypesAndFunctions, there is an FB IP_CONTROL. This on supports TLS without certificates, take al look on testmqtttls in MQTT.libraray, this works with test.mosquitto.org.


Changing the interface is not longer needed, just extend TLS_CONFIG in CommonTypesAndFunctions.
I would like to see an string were i can give an name of an certificate installed with the Security Manager of CODESYS which then is used by the Connection. Take a look and tell me what you think

BR

Stefan

Author:  Stefan2 [ Tue Jul 31, 2018 12:56 pm ]
Post subject:  Re: MQTT

Hello,

i forgot, please start here:

https://github.com/stefandreyer

BR

Stefan

Author:  Stefan2 [ Wed Aug 01, 2018 12:08 pm ]
Post subject:  Re: MQTT

Hello,


Quote:
I would like to see an string were i can give an name of an certificate installed with the Security Manager of CODESYS which then is used by the Connection. Take a look and tell me what you think


sorry, i meant that i would be happy if it can Beo solved this way…


BR

Stefan

Page 1 of 2 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/