So, now you can see that your connection isn’t stable.
You also can see that the ping is high
this is mine
Réponse de 45.55.96.146 : octets=32 temps=105 ms TTL=49
Réponse de 45.55.96.146 : octets=32 temps=105 ms TTL=49
Réponse de 45.55.96.146 : octets=32 temps=104 ms TTL=49
Réponse de 45.55.96.146 : octets=32 temps=105 ms TTL=49
Your ping times seem to vary dramatically, so I guess you might be getting dropouts on your internet connection, maybe because of a contention issue?
Or, someone else in your household may be hogging the bandwidth (a bored teenager maybe?).
My router reboots every day and my families hardly use the wifi .
Is it possible that the distance between the router and arduino board is too far which causes the connection problem ? or the router is broken ?
I think that I had found the problem.
I used another board with the same code and put it closer to the AP.
It worked very well and keeping connecting with the server.
Then I thought that I put my original board in the metal box and it’s about 25m to the AP.
After I opened the cover of the metal box , it works very well in these two days.
He wasn’t kidding when he said he want an expert!
The problem is that with a metal box you really need screened (coax) cable between the board and the outside of the box, then a well designed antenna that’s going to be waterproof. Like this:
That antenna will work better if the ground connection is in contact with the metal box, the box will act as a ground plane then.
But, if you’re going to drill a hole in the box to mount the antenna then pit it on one of the sides or the bottom to stop water getting in when it rains.
I use the antenna as the picture . Do you mean that I can use the SMA to lock on the box ? I have drilled a hole on the side of the box ! I use it indoor so there is no water problem.
Yes, there should be some locknuts and washers with the antenna. Drill a hole and pass the brass bit through it then put the locknut and antenna on. Make sure you clean-up the area around the hold so that the brass part gets good electrical contact with the box.