Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: icauto on October 31, 2020, 10:34:55 PM

Title: MQQT
Post by: icauto on October 31, 2020, 10:34:55 PM
Hello,

I am setting up an MQTT setup. I seem to get a fail at the point of TLS handshake. I tried a different MQTT broker and I am getting the same thing.

Here is a screen shot of the DMLOGGER Dump.




Doug
Title: Re: MQQT
Post by: Controls Guy on November 01, 2020, 09:48:00 AM
What's your scan time?   For Gmail, I found that the process requires about 1.85 to 1.90 seconds of CPU time, and with the login timing out on Google's end after about 9 seconds, that means you must dedicate at least 21% of CPU time to logging in or it will time out.  Email has a 1666 us/scan timeslice, so I have to have a scan time below 6.2ms (when not logging in)  to log in.   I don't know if MQTT has a similar timeslice number, or it might even be the same one, but try again with a program that has nothing in it but the MQTT.  Then increase the scan time gradually and see it that makes it fail at some point.
Title: Re: MQQT
Post by: BobO on November 01, 2020, 08:09:15 PM
The connection is being dropped in less than a second. Don't know why that would be, but there is almost no chance that the handshake would be completed that quick.
Title: Re: MQQT
Post by: icauto on November 02, 2020, 08:36:03 AM
Seeing as I am getting  it on 2 brokers, I believe it is on my side. Do I have to open any ports on the router or anything adjusted on my side?
Title: Re: MQQT
Post by: BobO on November 02, 2020, 09:23:22 AM
Seeing as I am getting  it on 2 brokers, I believe it is on my side. Do I have to open any ports on the router or anything adjusted on my side?

You wouldn't get to the handshake if that were a problem.

Are the brokers public? We can try to test them from here.
Title: Re: MQQT
Post by: icauto on November 02, 2020, 11:12:09 AM
Hello,

We tried:

io.adafruit.com

www.maqiatto.com

Thanks
Title: Re: MQQT
Post by: BobO on November 02, 2020, 11:42:13 AM
I tried io.adafruit.com and it worked fine. It did kick me when I had the login wrong, but once I used the generated I/O key it connected. I then had to get the topic format correct, but once fixing that I was able to see my data on the dashboard.

The AdaFruit I/O system is pretty slick. I hadn't seen that before. Looks like in addition to MQTT you can use an HTTP REST API to access it.
Title: Re: MQQT
Post by: icauto on November 02, 2020, 12:34:46 PM
I do have the generated I\O key from adafruit. I went to device manager. Where do I put it in?
Title: Re: MQQT
Post by: BobO on November 02, 2020, 02:54:48 PM
I do have the generated I\O key from adafruit. I went to device manager. Where do I put it in?

The I/O key is used as the password in the MQTT device config.
Title: Re: MQQT
Post by: Ssweber on November 02, 2020, 08:09:18 PM
The AdaFruit I/O system is pretty slick. I hadn't seen that before. Looks like in addition to MQTT you can use an HTTP REST API to access it.

I?m about to try out Thingsboard.io - there?s a whole world of iot dashboards I?m just finding. I?ll post back once I try it out.