MQTT Connect fails with error -116 when using TLS

I'm building the `nrf/samples/net/mqtt` sample for the nrf9160dk, specifying a custom certificate inside `src/modules/transport/credentials` as directed in the Kconfig file.

The CA and client certificate / key are specified in the "correct" PEM format, formatted as a C string with newline characters. Sending `at AT%CMNG=2,24,0` correctly reads back the CA certificate.

I'm building with the following flags:

The result is that `mqtt_connect` fails with error code -116:

Checking the server logs, it doesn't appear that the board has attempted to make a connection with the MQTT server.

Parents
  • I can prove that the certificate is valid using `openssl`:

    In this case I see a log server-side showing that the connection was terminated because no username was provided.

  • Hi,

    Which NCS version do you use?

    Which modem firmware version do you use?

    Best regards,
    Dejan

  • Hi Dejan,

    It's `sdk-nrf` version `v2.4.2` and modem firmware `1.3.5`

Reply Children
No Data