-
Notifications
You must be signed in to change notification settings - Fork 743
Description
Hi all, thank you for your work. In our project, we are using the C SDK to send a telemetry message every 5 seconds, using the default MQTT protocol, using a low power single threaded CPU. However, if the internet connection is missing (for instance because we can't get a strong LTE signal), we noticed that the message frequency drops significantly, up to one message every 20 or 40 seconds.
Doing a little research, we found some old issues that could be relevant (#1626 , #1889 and #204 ), but they are old and we are not sure they are still relevant, if they were.
Notice that the period between packets is handled in our code using a simple (turned into pseudocode)
// Main loop
while (main_loop_continue) {
// Generate and send next packet
std::string payload = generate_new_packet();
// helper function wrote to send a single packet, taken from the samples
azure_helpers::send_packet(iot_handle, payload, "finitrice");
// Sleep until next sending
std::this_thread::sleep_for(azure_packet_timeout_seconds);
}
The code use the SAMPLE_MQTT
protocol, with the high level API (not _ll_
). What can be the cause of the slowing down? Thanks