Page 1 of 1
MQTT tutorial not compiling
Posted: Mon Jul 06, 2020 2:03 pm
by DOCelectronics
I'm setting out to design a gateway for the custom IOT network we've developed (which currently uses a laptop as a gateway). I've selected NetBurner as the best option. I'm new to NetBurner so may have missed something here but when I tried following the MQTT tutorial I have struck problems. I've downloaded all the latests tools and purchased a MODM7AE70 development kit.
Re: MQTT tutorial not compiling
Posted: Mon Jul 06, 2020 4:11 pm
by Jon
Hi there! I've spent a fair amount of time working with the MQTT tutorials and would be happy to help. Just to be clear, are you talking about the MQTT tutorial that uses AWS, or the tutorial that uses the Paho library?
Re: MQTT tutorial not compiling
Posted: Mon Jul 06, 2020 5:31 pm
by DOCelectronics
Hi Jon, Thanks for your reply, I'm not sure how that got posted, I changed my mind and went to start a support ticket. Thanks for your offer. The post is only partial. I am talking about the MQTT/AWS tutorial. When I tried to compile it I got a large number of warnings and some errors. The errors related to the SSL error codes. Some are not defined in the SSl.h file. I tried the #defines from the NetBurner SSL.h file on the website and that had a different set of defines but it still didn't compile for the same reason (but different codes). I could probably mash them together but wanted a bit of guidance on why this might be happening. Thanks.
Re: MQTT tutorial not compiling
Posted: Tue Jul 07, 2020 11:12 am
by Jon
Hi DOCelectronics,
Ah! That's a great catch. We made a significant change to the SSL library in our latest 3.x toolset, which required some alterations to our error codes. I'll go through those and make the required adjustments, and then submit the changes to the repo. I'll also keep an eye out for any support tickets you submit and make sure I pick them up. =)
Kind Regards,
Jon
Re: MQTT tutorial not compiling
Posted: Tue Jul 07, 2020 12:22 pm
by Jon
Hi DOCElectronics,
I've updated the example on the repo. It should include the changes required to have the example built on NNDK 3.3. If you run into any issues (build or otherwise), feel free to reply here or open a support ticket.
Kind Regards,
Jon
Re: MQTT tutorial not compiling
Posted: Tue Jul 07, 2020 1:11 pm
by DOCelectronics
Thanks Jon,
I've downloaded the new src from the repo and the errors have gone. I don't quite have it building yet as I can't get the certificate and privatekey arrays working but I'm sure I will figure that out. BTW, I think there is a small error in the tutorial as well, the command line for compiling the certificates is given as:
compfile privatekey PRIVATE_KEY_LEN privatekey.cpp
where I think maybe it needs to be:
compfile [input file name] privatekey PRIVATE_KEY_LEN privatekey.cpp
Ditto for the certificate command line.
Thanks again.
Re: MQTT tutorial not compiling
Posted: Tue Jul 07, 2020 4:21 pm
by Jon
Hi DOCelectronics,
You are exactly right, thank you for pointing that out. The html characters for that weren't escaped properly, so they ended up getting absorbed into the page. It's been corrected now, and should show up properly. If you continue to have issues with the certificate, let me know and we'll get it sorted out.
Kind Regards,
Jon
Re: MQTT tutorial not compiling
Posted: Tue Jul 07, 2020 5:01 pm
by Jon
One more fix that will be pushed... in iot_tls_connect(), right before the call to SSL_ClientReadyCert(), you will need to add a call to SslInit(), or you will get a socket error.