Adding Secure Coap support in K32W(MCUxpresso openthread stack)

56 views
Skip to first unread message

Sunidhi Dixit

unread,
Dec 15, 2021, 6:55:42 AM12/15/21
to openthread-users

Hello Community,

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!!

Jonathan Hui

unread,
Dec 15, 2021, 11:52:54 AM12/15/21
to Sunidhi Dixit, Doru-cristian Gucea, Marius Preda, openthread-users
Adding some people from NXP that may be able to point you in the right direction.

--
Jonathan Hui



This message contains confidential information and is for the intended recipients. If you are not intended recipients you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender or VOLANSYS (www.volansys.com) therefore does not accept liability for any errors or omissions in the contents of this message.

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/cafea4af-84d6-40a8-86d6-f80777fa6776n%40googlegroups.com.

Mihai Ignat

unread,
Dec 17, 2021, 3:26:27 AM12/17/21
to openthread-users
Hello.
OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE is a stack option which is not used by default on the compiled libraries. Further information about the stack configuration can be found in Chapter 3 of the OpenThread Demo Applications User Guide, found in the SDK_2_6_4_K32W061DK6\docs\wireless\OpenThread folder.

To enable this stack option, you need to add "#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 1" in SDK_2_6_4_K32W061DK6\middleware\wireless\openthread\openthread\examples\platforms\k32w\k32w061\openthread-core-k32w061-config.h and recompile the libraries according to the procedure described in SDK_2_6_4_K32W061DK6\middleware\wireless\openthread\openthread\examples\platforms\k32w\k32w061\README.md.

The resulting libraries will be placed in SDK_2_6_4_K32W061DK6\middleware\wireless\openthread\openthread\output\k32w061\lib and can be used to rebuild and import the package in MCUXpresso IDE, or simply copy the new libraries in the project's workspace OpenThread library folder (openthread\libs).
 
BR,

Mihai Ignat
Reply all
Reply to author
Forward
0 new messages