How to interpret and resolve unsatisfied dependencies?

New to Zephyr it has been reasonably straightforward building the UDP sample application to enable an nRF9160 dev board to send and receive UDP messages via NB/IoT to/from a remote server (running a Python based UDP server).  For our target application I now need to secure this link with Mbed DTLS using PSKs but am having problems getting a modified sample to build properly.  The modifications include adding overlay-tls.conf taken from the client-echo example that incorporates DTLS but doesn't run on nRF9160 out of the box. Maybe a simple Zephyr misunderstanding.

There are several unsatisfied dependencies warnings during the build that I'm having trouble understanding.  

E.g.

warning: MBEDTLS_KEY_EXCHANGE_PSK_ENABLED (defined at
D:\Users\ron\ncs\v2.0.0\zephyr\modules\mbedtls\Kconfig.tls-generic:70,
D:\Users\ron\ncs\v2.0.0\nrfxlib\nrf_security\Kconfig.tls:343, modules\mbedtls\Kconfig.tls-
d:\Users\ron\ncs\v2.0.0\nrf\samples\nrf9160\udp\build\generic:70) was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies:
((!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-
generic.h" && MBEDTLS) || (MBEDTLS_HAS_CBC_OR_GCM_CIPHERSUITE_REQUIREMENTS && MBEDTLS_TLS_LIBRARY &&
NRF_SECURITY) || (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE
= "config-tls-generic.h" && MBEDTLS && 0)) (=n). See
docs.zephyrproject.org/.../kconfig.html and/or
look up MBEDTLS_KEY_EXCHANGE_PSK_ENABLED in the menuconfig/guiconfig interface. The Application
Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of
the manual might be helpful too.

Otherwise the build does complete ok, but clearly DTLS with PSK isn't operating properly.
This may seem dumb but it would be helpful if somebody could help interpret the above and indicate how such unsatisfied dependencies can be resolved.
Presumably this is down to Kconfig/Menuconfig or Guiconfig and possibly includes in the single main.c source file.

Cheers, Ron.
Parents Reply
  • We don't have any small and simple samples showing how to use DTLS, unfortunately.

    The lwm2m_client sample uses DTLS, but I don't think it is a good starting point unless you want to use LwM2M.

    So the simplest sample to use as a baseline is probably the https_client. It shows how to send a HTTP request over the socket API, with TLS for server authentication. However, the procedure for writing the credentials to the modem is the same, you just write a PSK instead of a CA certificate. Similarly, the way you open the socket is the same, just open a DTLS socket instead (SOCK_DGRAM instead of SOCK_STREAM, IPPROTO_DTLS_1_2 instead of IPPROTO_TLS_1_2).

Children
No Data
Related