-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP8266 hangs when using HttpClient.getString #6033
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
Comments
I think i have had a similar issue. I do not know exactly when my esp got stuck, i have a big program, and few devices. In some of the devices with a little poor network, i faced that they just got stuck and no watchdog was triggered. Neither software nor hardware watchdog was triggered. I could not replicate the situation but it just occured 2-3 times in few of my devices. I trie with latest github repository as well as 2.5.0 |
Were you able to find any solution for this? |
Havent found it yet.. I am still working on it. |
@saikiranmpr Do you have poor connectivity like @arihantdaga has ?
Then re-run and enable |
@d-a-v Yes, I have poor internet connectivity. What making it worse is, we have deployed these devices in a remote area and this issue happens randomly and hence, I am unable to properly reproduce it with consistency at my location. However, to identify the issue this is the progress we made. Earlier, we used PubSubClient and HttpClient for communication. Now, we removed the HttpClient and are using only the PubSubClient for data transfer over MQTT. Even upon using the PubSubClient, the issue is happening. What I feel is the issue with WiFi and PubSubClient mentioned below is happening: For your reference, this is how we are handling MQTT in loop:
Please let me know if anything is wrong in what I am doing. Also, thank you very much for supporting. |
@saikiranmpr This may be is a different issue (no http client). |
@saikiranmpr I think what you are doing is , may not be a good idea. This is almost never ending while loop in poor connectivity. From what i can see, if the network is poor or if there is no internet in the wifi, then all the time, your code is just busy retrying connection with mqtt broker. I think you can change that and attempting retries after a certain time but without using the delay. (I am not sure, but if you are new to this, you can look for basic example of ledBlink without delay in arduino ide, u'll get an idea of what i am talking about). |
@arihantdaga There is a limit using condition (mqtt_count < mqtt_attempts) . |
Dear team, I have an issue with respect to getString() method. We are using ESP8266 where internet connection is little poor. Hence, after sending the HTTP POST request and when trying to read the response from the server, the ESP sometimes hangs and never comes out of it until hard reset is performed manually. This happens randomly. Kindly help me in resolving this. I am attaching the code below:
The text was updated successfully, but these errors were encountered: