Adding Secure Coap support in K32W(openthread stack)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Adding Secure Coap support in K32W(openthread stack)

2,053件の閲覧回数
sd05
Contributor III

I am trying to compile the reed example with minimal secure coap code but in the process i am getting following error for mbedtls
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /home/sunidhi/Downloads/bae/openthread/ot-nxp/build_k32w061/lib/libmbedtls.a(ssl_tls.c.obj): in function `mbedtls_ssl_config_defaults':
ssl_tls.c:(.text.mbedtls_ssl_config_defaults+0xa8): undefined reference to `mbedtls_x509_crt_profile_suiteb'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ssl_tls.c:(.text.mbedtls_ssl_config_defaults+0xb4): undefined reference to `mbedtls_x509_crt_profile_default'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /home/sunidhi/Downloads/bae/openthread/ot-nxp/build_k32w061/lib/libmbedtls.a(ssl_tls.c.obj): in function `mbedtls_ssl_parse_certificate':
ssl_tls.c:(.text.mbedtls_ssl_parse_certificate+0xda): undefined reference to `mbedtls_x509_crt_init'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ssl_tls.c:(.text.mbedtls_ssl_parse_certificate+0xf2): undefined reference to `mbedtls_x509_crt_free'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ssl_tls.c:(.text.mbedtls_ssl_parse_certificate+0x186): undefined reference to `mbedtls_x509_crt_verify_restartable'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ssl_tls.c:(.text.mbedtls_ssl_parse_certificate+0x1d2): undefined reference to `mbedtls_x509_crt_free'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ssl_tls.c:(.text.mbedtls_ssl_parse_certificate+0x26e): undefined reference to `mbedtls_x509_crt_parse_der_nocopy'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /home/sunidhi/Downloads/bae/openthread/ot-nxp/build_k32w061/lib/libopenthread-ftd.a(dtls.cpp.obj): in function `ot::MeshCoP::Dtls::FreeMbedtls()':
dtls.cpp:(.text._ZN2ot7MeshCoP4Dtls11FreeMbedtlsEv+0x10): undefined reference to `mbedtls_x509_crt_free'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: dtls.cpp:(.text._ZN2ot7MeshCoP4Dtls11FreeMbedtlsEv+0x18): undefined reference to `mbedtls_x509_crt_free'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /home/sunidhi/Downloads/bae/openthread/ot-nxp/build_k32w061/lib/libopenthread-ftd.a(dtls.cpp.obj): in function `ot::MeshCoP::Dtls::SetApplicationCoapSecureKeys()':
dtls.cpp:(.text._ZN2ot7MeshCoP4Dtls28SetApplicationCoapSecureKeysEv+0x22): undefined reference to `mbedtls_x509_crt_parse'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: dtls.cpp:(.text._ZN2ot7MeshCoP4Dtls28SetApplicationCoapSecureKeysEv+0x44): undefined reference to `mbedtls_x509_crt_parse'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /home/sunidhi/Downloads/bae/openthread/ot-nxp/build_k32w061/lib/libopenthread-ftd.a(dtls.cpp.obj): in function `ot::MeshCoP::Dtls::Setup(bool)':
dtls.cpp:(.text._ZN2ot7MeshCoP4Dtls5SetupEb+0x30): undefined reference to `mbedtls_x509_crt_init'
/usr/local/mcuxpressoide-11.4.1_6260/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: dtls.cpp:(.text._ZN2ot7MeshCoP4Dtls5SetupEb+0x38): undefined reference to `mbedtls_x509_crt_init'

0 件の賞賛
返信
3 返答(返信)

2,033件の閲覧回数
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi,

 

Hope you are doing well. Could you please describe the procedure you followed?

Can you clarify what do you mean with "reed example with minimal secure coap code"?

 

Best Regards,

Ricardo

Best Regards,
Ricardo
0 件の賞賛
返信

2,018件の閲覧回数
sd05
Contributor III

Hello @Ricardo_Zamora 

I am developing an apps based on k32w061dk6_reed_ble_wuart_bm example where i need to add the secure coap support. I added following lines in  <Proj Dir>/MCUXpresso_11.4.1_6260/workspace/k32w061dk6_reed_ble_wuart_bm/source/reed_app.c

otCoapSecureSetSslAuthMode(gpOpenThreadInstance, false);
otCoapSecureSetClientConnectedCallback(gpOpenThreadInstance, HandleConnected, NULL);

otCoapSecureSetDefaultHandler(gpOpenThreadInstance, DefaultHandler, NULL);


otCoapSecureStart(gpOpenThreadInstance, OT_DEFAULT_COAP_SECURE_PORT);

I tried defining OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE as 1 in <Proj Dir>/MCUXpresso_11.4.1_6260/workspace/k32w061dk6_reed_ble_wuart_bm/source/config.h

and when I tried to build I am getting following errors

undefined reference to `otCoapSecureSetClientConnectedCallback'

undefined reference to `otCoapSecureSetDefaultHandler'

undefined reference to `otCoapSecureStart'

Please guide the steps to enable the secure coap support in K32W SDK 2_6_4.

Thanks!!

0 件の賞賛
返信

2,014件の閲覧回数
sd05
Contributor III

Also one more question what are the steps to make changes in openthread libraries available with the SDK

0 件の賞賛
返信