ChipChop Support Forum
Log in
Log out
Join the forum
My Details
REPLIES: 1
VIEWS: 243
BACK
REPLY TO THIS POST
Tejas
10 May 2025
ESP8266 unable to establish socket connection
My Nodemcu v3 ESP8266 is unable to send heartbeat and logs 'socket seems to be closed'. Please check the photo attached of arduino IDE.

I don't know if it's a new problem with my wifi or not. I haven't made any changes to my wifi router settings. Is it possible my ISP decided to close web socket connections for some reason?

Which socket exactly does chipchop API use? Is it possible for me to change this socket to some other socket which is not closed?

Please help me resolve this issue as soon as possible, it's something I use every day!
Awaiting your response.


Attached images
Gizmo
10 May 2025
ACCEPTED

Hi Tejas,

I have just checked and there is absolutely nothing on the ChipChop end that should be blocking your device. I can (approximately) see some activity on your websocket around 45 minutes before you've posted here?

Your stuff has been running since 2023 and nothing has changed recently?

Anyway, let's see if we can figure it out here's a bunch of thoughts (in no particular order):

- If you want to send me your code I can replicate it here on an esp8266 and see if there is anything obvious. This may be the fastest option to figure out what is going on.
I would also need the exact ChipChop library that you are using (it's in your Documents/Arduino/library/ChipChop)
I don't need the servo stuff, just the .ino file and the ChipChop library
If you have my email just zip everything down and email it to me and I will try to do it as quickly as I can. If you don't have my email let me know here and I'll send you an email (I have the one you've used on your account registration, hope that's the right one)

- If you have upgraded your Arduino IDE, especially the esp8266 boards stuff, it could be that that's breaking things with the Arduino websockets library (happened before many times but with esp32). The solution would be to use a newer version of the ChipChop library and again it would be easiest if you send me your code and I will re-write it to use the latest ChipChop stuff.

- Looking at your screenshot I think you are using a very old library which is using websockets for communication. That is not a problem at all from the ChipChop side , websockets can work both on an encrypted and un-encrypted ports (80 & 443) and that can be changed in the String server_uri = "wss://....." (encrypted) and String server_uri = "ws://....." (not encrypted)
but the only difference changing that would make is to reduce the workload on the esp8266 and reduce the ram usage
if everything was working ok so far then I don't think that would do anything

- I don't think your ISP would be blocking a websocket channel, websockets operate on a standard http/https protocol and same ports as standard websites so unless they think you are hacking something by having too many requests I doubt that communication would be blocked by your ISP

- I have encountered twice with users in Philippines that their national DNS has gone bust for a day and they couldn't access chipchop.io domains without using a VPN (and many other foreign domains) but if that was the case you would be able to access this forum and it would have to be a national outage that you would hear about

- can you try to do a ping from your pc to api1.chipchop.io : open the windows powershell and type ping api1.chipchop.io if you get a response then it's not a dns issue

- I have put a tracker on your account channel but I am not seeing any activity or attempts for a connection. Is your device still trying to connect?

I have a feeling it's to do with your wifi, if there was something more sinister you would have had also error messages from espressif idk code deeper inside the esp8266 like "bad file number [9]"..."not able to resolve dns"...memory problems etc

G