This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF9160 TLS and MQTT

Hello guys,

We are working on the project and using DK 9160. We want to use LTE Cat M1 connection, mqtt tls and we need full functionality embed tls. We started with demo based on the BSD_socket library and as we understood contains partly tls security solution. But when we tried to use mbed tls library ported to Zephyr we had issue with multiple definition. Could you please clarify is it possible to use both libraries (zephyr ebed tls and bsd socket ) in common project?

BR, Denis.

Parents Reply Children
  • Yes, i definitely had a TLS connection.

    It requires more code changes than just turning on that one config.  I also had to change the configured port to 8883, and had to modify the client_init function like this: 

    #if defined(CONFIG_MQTT_LIB_TLS)
       client->transport.type = MQTT_TRANSPORT_SECURE;
       client->transport.tls.config.peer_verify = 0;
       client->transport.tls.config.cipher_count = 0;
       client->transport.tls.config.cipher_list = NULL;
       client->transport.tls.config.sec_tag_count = 0;
       client->transport.tls.config.seg_tag_list = NULL;
       client->transport.tls.config.hostname = NULL;
    #else
       client->transport.type = MQTT_TRANSPORT_NON_SECURE;
    #endif

Related