|Subject:||Re: [lwip-users] Callbacks in MQTT|
|Date:||Tue, 9 Aug 2022 13:22:16 +0200|
A gentle reminder about these queries.
As mentioned in the previous mail, we are trying to use the MQTT application present in LWIP along with a local Mosquitto broker. The callbacks provided in the detailed description here - lwIP: MQTT client (nongnu.org) are being used.
In mqtt_connection_cb, it can be seen that the connection state needs to be MQTT_CONNECT_ACCEPTED for the the mqtt_set_inpub_callback to be called which in turn will call the incoming_publish and incoming_data callbacks which are needed for the subscribe data.
As per our observation, in the example_do_connect function, the connection state post mqtt_client_connect call is TCP_CONNECTING and not MQTT_CONNECT_ACCEPTED. Further, mqtt_connection_cb is not entered. This leads us to ask the following questions:
- When is the mqtt_connection_cb called?
- In mqtt_client_connect it can be observed that the connection state is manually set to TCP_CONNECTING. Thus, does it imply that the connection state needs to be manually set to another state?
- What is the flow for the connection state to reach MQTT_CONNECT_ACCEPTED?
Eagerly awaiting your response
lwip-users mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|