-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to configure network timeout (IDFGH-3905) #166
Conversation
Hi @david-cermak, the origins of this PR is the following. I have a secure connection to the MQTT broker. Sometimes WiFi stack is stacked for ~10seconds and network timeout is also 10 seconds, thus in most of the cases the connection is aborted and the reconnect process is issued. Since I use mbedTLS the reconnect process is very expensive (as you might know). My device has too few heap size and I want to avoid scenarios when I run out of heap. For me, the simplest solution is to increase this timeout and to avoid the connection to be aborted. That's why I want this option to be configurable. P.S. the initial error I had is: 13:00:41.881 [err] esp-idf: E (288902) MQTT_CLIENT: Error write data or timeout, written len = 0, errno=11 Then I tried to manually set it to 20s and then to 30s - work perfectly for me. |
Hi @david-cermak and thanks! The last question, I need this change in IDF-v4.2, is it possible to update the corresponding submodule to the latest version in esp-idf repo? If yes I will prepare a PR. |
@dshil Yes, no problem to reference this commit in |
@david-cermak got it. Will wait for the backport. |
Hi @david-cermak, apologies for the reminder but it seems that the option still not ported to master branch, correct? I understand you have a lot of another work to do, but probably I can elaborate somehow to speedup the process? |
Hi @david-cermak, almost 1.5 months have passed and I just checked the esp-mqtt component in master branch, no updates. Probably it is updated internally. Anyway, I am very interested in this configuration parameter, any chance to see it in the upcoming v4.2 release? |
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes #5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: espressif/esp-mqtt@8562437 Related espressif/esp-mqtt#179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: espressif/esp-mqtt@0a1d9d0 Related espressif/esp-mqtt#178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: espressif/esp-mqtt@673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: espressif/esp-mqtt@259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: espressif/esp-mqtt@845c2a3 Related espressif/esp-mqtt#173 Related espressif/esp-mqtt#174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: espressif/esp-mqtt@23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: espressif/esp-mqtt@a03228a Related espressif/esp-mqtt#166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: espressif/esp-mqtt@b9db8d9
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes #5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: espressif/esp-mqtt@8562437 Related espressif/esp-mqtt#179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: espressif/esp-mqtt@0a1d9d0 Related espressif/esp-mqtt#178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: espressif/esp-mqtt@673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: espressif/esp-mqtt@259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: espressif/esp-mqtt@845c2a3 Related espressif/esp-mqtt#173 Related espressif/esp-mqtt#174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: espressif/esp-mqtt@23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: espressif/esp-mqtt@a03228a Related espressif/esp-mqtt#166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: espressif/esp-mqtt@b9db8d9
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes #5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: espressif/esp-mqtt@8562437 Related espressif/esp-mqtt#179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: espressif/esp-mqtt@0a1d9d0 Related espressif/esp-mqtt#178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: espressif/esp-mqtt@673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: espressif/esp-mqtt@259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: espressif/esp-mqtt@845c2a3 Related espressif/esp-mqtt#173 Related espressif/esp-mqtt#174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: espressif/esp-mqtt@23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: espressif/esp-mqtt@a03228a Related espressif/esp-mqtt#166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: espressif/esp-mqtt@b9db8d9
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes #5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: espressif/esp-mqtt@8562437 Related espressif/esp-mqtt#179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: espressif/esp-mqtt@0a1d9d0 Related espressif/esp-mqtt#178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: espressif/esp-mqtt@673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: espressif/esp-mqtt@259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: espressif/esp-mqtt@845c2a3 Related espressif/esp-mqtt#173 Related espressif/esp-mqtt#174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: espressif/esp-mqtt@23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: espressif/esp-mqtt@a03228a Related espressif/esp-mqtt#166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: espressif/esp-mqtt@b9db8d9
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes #5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: espressif/esp-mqtt@8562437 Related espressif/esp-mqtt#179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: espressif/esp-mqtt@0a1d9d0 Related espressif/esp-mqtt#178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: espressif/esp-mqtt@673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: espressif/esp-mqtt@259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: espressif/esp-mqtt@845c2a3 Related espressif/esp-mqtt#173 Related espressif/esp-mqtt#174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: espressif/esp-mqtt@23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: espressif/esp-mqtt@a03228a Related espressif/esp-mqtt#166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: espressif/esp-mqtt@b9db8d9
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes espressif/esp-idf#5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: 8562437 Related #179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: 0a1d9d0 Related #178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: 673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: 259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: 845c2a3 Related #173 Related #174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: 23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: a03228a Related #166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: b9db8d9
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes espressif/esp-idf#5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: espressif@8562437 Related espressif#179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: espressif@0a1d9d0 Related espressif#178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: espressif@673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: espressif@259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: espressif@845c2a3 Related espressif#173 Related espressif#174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: espressif@23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: espressif@a03228a Related espressif#166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: espressif@b9db8d9
Updates esp-mqtt reference to include fixes below related mainly to: * configuration update (disable keepalive, network timeout) * minor fixes (size_t for all sizes, unbalanced lock, api for outbox-size) * extended error handle to include socket's errno Closes espressif/esp-idf#5906 Config: Added config value to disable keepalive mechanism esp-mqtt commit: espressif@8562437 Related espressif#179 Added esp_mqtt_client_get_outbox_size API esp-mqtt commit: espressif@0a1d9d0 Related espressif#178 mqtt_outbox: Removed unused retry_count field from outbox_item_t esp-mqtt commit: espressif@673086e config: Fixed typo for configuring OUTBOX_EXPIRED_TIMEOUT_MS esp-mqtt commit: espressif@259baae Fixed missing MQTT_API_UNLOCK in esp_mqtt_client_stop error path esp-mqtt commit: espressif@845c2a3 Related espressif#173 Related espressif#174 Extended mqtt error handle to capture transport's socket errno (IDF v4.3+) esp-mqtt commit: espressif@23c8e1e Config: Added configuration value to set network timeout esp-mqtt commit: espressif@a03228a Related espressif#166 Used size_t for all lengths to allow for other architectures esp-mqtt commit: espressif@b9db8d9
No description provided.