Hi,
A gentle reminder about these queries.
Regards,
Ganesh

From: Ganesh Thambhahalli Satyen
Sent: 01 August 2022 13:10
To: '[email protected]' <[email protected]>; [email protected]
Cc: Dhanashree Mohite <[email protected]>
Subject: RE: Callbacks in MQTT

Hi,

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)<https://www.nongnu.org/lwip/2_0_x/group__mqtt.html> 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:

  1.  When is the mqtt_connection_cb called?
  2.  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?
  3.  What is the flow for the connection state to reach MQTT_CONNECT_ACCEPTED?
Eagerly awaiting your response
Regards,
Ganesh

From: Ganesh Thambhahalli Satyen
Sent: 28 July 2022 13:47
To: [email protected]<mailto:[email protected]>
Cc: Dhanashree Mohite <[email protected]<mailto:[email protected]>>
Subject: Callbacks in MQTT


Hi,

We are trying to use the MQTT application present in LWIP along with a local 
Mosquitto broker. As per the documentation, the connect callback is supposed to 
be called after the connection goes through. We are not able to replicate the 
same when we utilise the detailed description provided here -  lwIP: MQTT 
client (nongnu.org)<https://www.nongnu.org/lwip/2_0_x/group__mqtt.html>. The 
client gets connected, but the callback is not entered. The conclusion that the 
callback is not entered is based on the flags we have added at the start and 
end of the callback. Is there any parameter change/ change in the order of 
calling which needs to be done?

Eagerly awaiting your response

Regards,

Ganesh

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to