OpenThread and MQTT over TLS is single program.

Hi,

I use nrf52840 processor with esp32c3 as WiFi modem. I need to run OpenThread network and MQTT client on these processors. When I run only OpenThread network, it works correctly. When I run only MQTT client via WiFi, it works correctly too. But when I try to merge this two programs into one, only unencrypted MQTT works.

When I try to transfer some data via OpenThread network I get this error:
<err> coap_utils: Failed to create socket 106

And when I try to connect to MQTT broker over TLS I get this error:

<err> net_sock_tls: TLS handshake error: -7780
<err> net_sock: invalid access on sock 0 by thread 0x2000137


Here is my OpenThread program: https://github.com/Whirla/whbr_demos/tree/main/whbr_ot_coap
Here is my MQTT program: https://github.com/Whirla/whbr_demos/tree/main/whbr_wifi_mqtt

Here is merged program: https://github.com/Whirla/whbr_demos/tree/main/whbr_both
And here is a hardware I use: https://github.com/gblach/HexGateway

Could you point me out why encryption is not working in my program?

Parents Reply Children
Related