How do I connect to 1000 arduino at the same time?

I am wondering why exactly are you making this system if you obviously have no enough experience in either earthquake diagnostics or electronics?
After all, the lives of people directly depend on this system?

1 Like

Why you said so :pensive: thanks anyway

Why use MEGA's ?

Why do you need such a large form factor?



Arduino Mega without WiFi or Ethernet, have to buy separate modules.

ESP32 has WiFi built in and costs less then a Mega.

I'm a programmer, yes, I don't have experience in earthquakes, but I'm developing this with the help of some friends, who have experience in earthquakes.

I know that it's not accurate to detect earthquake like that, and I know scientists are using other ways, I live in turkey, and I lost my mom in the earthquake, I'm trying to solve this problem, sometimes you have to start from the ground, and think outside the box to solve a problem

How is that related to Arduino?

It's a matter of networking only, regardless of the node systems. Can you implement that system with a PC instead of an Arduino behind each router, and a data acquisition Arduino connected to each PC?

Why do you need to send a message to them?

Wouldn't it be enough for the 1000+ to pull a message when they send their IP addresses?

Arduino will send the IP every 1 min.
If an earthquake happened the server should send a msg to all devices to activate the alarm.

If Arduino keep sending and reading from the server every second that would be a huge load on the server.

1000 pc would be so expensive!

to access a server on internet you don't have to open a port on the router

Actually it's reversed, the server will send a msg to arduino behind a router

It's only an abstraction of your problem. You find network experts easier for PC than for Arduino. Once you have a PC solution you can port it to a suitable Arduino.

1 Like

I love your idea :bulb: thanks sooooo much

In the original post, you said:

These arduino are sending a msg to a website

I strongly suggest you review/investigate exactly how NAT firewalls function:

understanding tcp connections through a nat-based firewall at DuckDuckGo


What Is a NAT Firewall? (Simple Guide for Beginners) - TechNadu

Yes they are sending and receiving, i don't have a problem from arduino to server, my problem is from server to arduino

I know how it works, but how for example you can reach a xiaomi device behind a router without port forwarding!!!!

Unless the client device opens the session, you cannot unless you port-forward.
What often happens is the client opens a session to a server, then goes quiet but if too long, the local NAT router will close the connection! So, keep-alive packets must be seen from the client to the server to circumvent the default timeout. As such with a 1000 nodes, the backend server will always have a 1000 open connections, but little traffic as keep-alive is just a short packet.

2 Likes

It make sense, but how for example this service work!

Without port forwarding!

The client code opens a connection to the webserver via a callback; the websocket is always open, so the server must still contend with 1000 connections... nothing comes free!

Now that my code is running and I’m publishing data to the HiveMQ Cloud MQTT Broker, I can use an MQTT Client application such as MQTTfx to subscribe to the broker and view the data.

When I open my MQTT.fx application, which is already connected to the HiveMQ Cloud MQTT broker and subscribed to the same topic, I can see the data coming.

2 Likes

You're awesome, now everything is clear for me, I found the open source one

Thank you so much dude :pray: