This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MQTT connect fail ENOMEM

Hello,

My application is a modified version of MQTT_simple.

I have moved all the code inside while(true) to a thread and set username as a device token.

The error -12 ENOMEM come from a file mqtt_encoder.c 

line 366 err_code = pack_utf8_str(client->user_name, buf);

I have tried increase CONFIG_HEAP_MEM_POOL_SIZE from 16384 to 20480 and increase thread size from 4096 to 6144 but not working.

Also, I have also searched nRF_Connect_SDK/doc but there is no KCONFIG related to memory.

I appreciate any suggestion on this problem. Thank you.

Related