CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Thu Sep 20, 2018 11:56 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
 Post subject: MQTT
PostPosted: Tue May 29, 2018 8:45 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
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


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: MQTT
PostPosted: Wed May 30, 2018 10:27 pm 
Offline
User avatar

Joined: Fri Jan 19, 2018 3:38 pm
Posts: 34
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!

_________________
https://github.com/Aliazzzz


Top
   
 Post subject: Re: MQTT
PostPosted: Wed May 30, 2018 11:25 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
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


Top
   
 Post subject: Re: MQTT
PostPosted: Thu May 31, 2018 7:19 am 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
Hi!


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


have fun…

Stefan

Attachment:
MQTT.projectarchive


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: MQTT
PostPosted: Fri Jun 01, 2018 9:28 am 
Offline
User avatar

Joined: Fri Jan 19, 2018 3:38 pm
Posts: 34
Good work, thank you!

_________________
https://github.com/Aliazzzz


Top
   
 Post subject: Re: MQTT
PostPosted: Thu Jun 21, 2018 1:47 pm 
Offline

Joined: Tue May 15, 2018 11:03 am
Posts: 3
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


Top
   
 Post subject: Re: MQTT
PostPosted: Mon Jul 09, 2018 11:11 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
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


Top
   
 Post subject: Re: MQTT
PostPosted: Tue Jul 10, 2018 12:48 pm 
Offline
User avatar

Joined: Tue Jun 28, 2016 2:45 pm
Posts: 52
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

_________________
Building & Process Automation with HVAC Library for CODESYS© - www.hvac-automation.com


Top
   
 Post subject: Re: MQTT
PostPosted: Tue Jul 10, 2018 11:00 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
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


Top
   
 Post subject: Re: MQTT
PostPosted: Wed Jul 11, 2018 9:16 am 
Offline
User avatar

Joined: Tue Jun 28, 2016 2:45 pm
Posts: 52
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

_________________
Building & Process Automation with HVAC Library for CODESYS© - www.hvac-automation.com


Top
   
 Post subject: Re: MQTT
PostPosted: Wed Jul 11, 2018 5:14 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
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


Top
   
 Post subject: Re: MQTT
PostPosted: Sat Jul 21, 2018 8:40 pm 
Offline
User avatar

Joined: Fri Jan 19, 2018 3:38 pm
Posts: 34
Count me in if you post your code in github ..
The newly posted Crypto Example should help out also

_________________
https://github.com/Aliazzzz


Top
   
 Post subject: Re: MQTT
PostPosted: Tue Jul 31, 2018 12:43 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
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


Top
   
 Post subject: Re: MQTT
PostPosted: Tue Jul 31, 2018 12:56 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
Hello,

i forgot, please start here:

https://github.com/stefandreyer

BR

Stefan


Top
   
 Post subject: Re: MQTT
PostPosted: Wed Aug 01, 2018 12:08 pm 
Offline

Joined: Wed Nov 23, 2016 2:33 pm
Posts: 63
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 15 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited