Hi,
I am following example to connect using TLS.
I am not polling, as in the example. Should I expect that after
Hi,
I am following example to connect using TLS.
I am not polling, as in the example. Should I expect that after
In the sample in the main, after 4 calls to mqtt_connect(&client) it returns -12.
It is poor of memory or some pointer is not correctly freed?
Regards
Hi,
Can you please share your code? Are you disconnecting via mqtt_disconnect() after each subsequent mqtt_connect call?
Kind regards,
Håkon
CMqttStandardThread.h
CMqttStandardThread.cpp
It is a porting of the code of exercise L4_e2_sol.
Thanks
As I do not receive any callback from server mqtt, after a timeout I reconnect. After 4 try I got error -12.
When timer expires, the state machine goes in disconnecting state and calls mqtt_disconnect.
Thanks
Hi,
You are not calling poll on the socket. Please see the L4_e2_sol:
Kind regards,
Håkon
Yes, in effect my question is if I need to poll the socket.
This way it is not an alternative to mqtt helper library.
Unfortunately it is so difficult to set up mqtt helper to work in TLS(((
Thanks
Did you add the poll() logic and the rest of the main-loop implementation? This is required in order for the socket data to be retrieved.
Kind regards,
Håkon
Did you add the poll() logic and the rest of the main-loop implementation? This is required in order for the socket data to be retrieved.
Kind regards,
Håkon
Hi
Thanks for your reply.
Actually I was using mqtt helper and it is a great library. Unfortunately to pass to tls communication, it is because I am not very able, I did not understand the samples/net/mqtt to move mqtt helper to tls. So I started with l4_e2.
But i do not want to poll the socket. So I go back to mqtt helper and try to understand how to move to tls.
I close this ticket. Will probably open another on mqtt helper.
Best regards