nrf9160 mqtt simple example configured to talk to test.mosquitto.org using mutual TLS on port 8884?

Is there a configuration / sample available of mqtt simple to talk to the mosquitto server using an authenticated client on port 8884?  I saw a message on here that was about 2 years old that looked like it was trying to solve the same issue, but the modified sample code does not seem to build with the latest SDK?

Mosquitto has instructions for building the private key and signing the certificate using openssl and a webpage to paste the csr into.

Thank you in advance.

Parents
  • Another oddity.  We modified the MQTT sample to configure it for TLS as described 9 hours ago.

    We took the code that connected to port 8884 and the proj.cnf file and merged it into our working code (with GPS, I2C, SPI Flash, etc.) and we can not connect to test.mosquitto.org on port 8884.  We seem to get random errors.   Errors -12, -111, -116, and -104 after some period of trying to connect to the server.

    Any suggestions on how to debug this?  How to get more information from the system as to what's going on?

    Back to frustrated...

  • After doing a lot more trial and error  (comparing source code and configs) it appears that we can get the failing code to work if we build for a non-debug configuration.  If I build for a debug configuration I get random failures.  This is unfortunate.

    Is this an indication of some issue?  Stack?  Heap?  Optimization timing?  I'm hoping we can resolve debugging -- I'm use to debugging with print and gpio lines, but having a debugger (either in VC or Ozone) is a big plus.

    FYI, we are using SDK 2.0.0, and modem firmware 1.3.2 (the latest).

    Thanks.

Reply
  • After doing a lot more trial and error  (comparing source code and configs) it appears that we can get the failing code to work if we build for a non-debug configuration.  If I build for a debug configuration I get random failures.  This is unfortunate.

    Is this an indication of some issue?  Stack?  Heap?  Optimization timing?  I'm hoping we can resolve debugging -- I'm use to debugging with print and gpio lines, but having a debugger (either in VC or Ozone) is a big plus.

    FYI, we are using SDK 2.0.0, and modem firmware 1.3.2 (the latest).

    Thanks.

Children
No Data
Related