-->
Page 2 of 2

Re: MQTT connection timeout too short

PostPosted: Mon Sep 26, 2016 6:20 pm
by jbro
Thank you, devsaurus for taking the time to reply so thoroughly. I really appreciate your efforts. I had success but also had to increase MQTT_SEND_TIMEOUT as well. I did not use docker but instead used the full GCC toolchain. Now my esp8266 client can log in.

Re: MQTT connection timeout too short

PostPosted: Tue Sep 27, 2016 12:01 am
by marcelstoer
Good to know it works for you. We could of course make the timeout configurable through Lua but IMHO 5s is already fairly high. Is it your (network) infrastructure or your broker that's so slow?

Re: MQTT connection timeout too short

PostPosted: Wed Sep 28, 2016 10:07 pm
by jbro
So what's actually taking so long is I used the password authentication option of the broker and I encrypted both the stored password and username using a slow hashing function. Looking at the bcrypt module, I see that it's using the default of 10 rounds. It's obviously overkill on a Beaglebone Black as the whole authentication process takes about 6 seconds.

I'm going to look into other security solutions for the connection. At this time, I only know password authentication well so that's what I went with and I simply followed the provided examples for the broker and then added the encryption. But I'm not sure this was a good choice.