Copyright ©

Mongoose OS Forum

ATTENTION! This forum has moved to:

Do not post any new messages.

Is using mgos_mqtt_num_unsent_bytes before deep sleep enough?

I am placing ESP32 into deep sleep state after publishing my last mqtt message. Currently I query mgos_mqtt_num_unsent_bytes() == 0 before shutting down. However sometimes my messages do not go out. I suspect that some data is still being processed by the TCP/IP software stack. What is the correct way to ensure the software stack has completed sending out packets before shutting down? I would also like to know if there is a recommended procedure to address a similar concern for BLE communication as well.


Sign In or Register to comment.