Connecting two wifis at the same time for less latency

So, i have an raspberry pi and an esp32. making them talk to each other might take long if the esp32 is far from the router. instead of that; i want to host a network on esp32 and make raspberry pi connect to that WHILE keeping the connection to the router so it can fetch data from internet.

I'm not a Pi expert, but I'd be surprised if it could have two simultaneous WiFi connections. I don't think the hardware allows that; this is also true for virtually all regular WiFi adapters, save for perhaps a couple of oddballs that are really two adapters wrapped into one (they must exist...somewhere..)

I do not think you will have any problems.

Wi-Fi signals travel at the speed of light because they are a type of electromagnetic wave, just like visible light and radio waves. In a vacuum, the speed of light is approximately 300,000 kilometers per second (about 186,000 miles per second).

However, when traveling through materials like air, Wi-Fi signals slow down slightly due to the medium's refractive index, but this reduction is minimal. In practical terms, Wi-Fi signals in air travel at roughly 99% of the speed of light in a vacuum, which is still incredibly fast.

While They cannot operate on multiple channels concurrently, it can switch between different channels quickly if required. For example, in an ESP32 mesh network or in Wi-Fi sniffing mode, the ESP32 can hop between channels.

Important to Note:

  • Data Transfer Speed: While the signal itself travels at the speed of light, the data transfer speed (measured in megabits per second, Mbps) of Wi-Fi is determined by the technology (e.g., Wi-Fi 5, Wi-Fi 6), signal strength, interference, and network conditions. Typical home Wi-Fi networks today range between 100 Mbps to 1 Gbps.

  • Latency: The time it takes for data to travel to a server and back (latency) is affected by more than just signal speed. Factors like network congestion, physical distance between devices, and processing delays can increase the overall time.

  • Consumer Routers: Most modern consumer routers can handle between 50 to 250 simultaneous connections. This includes all connected devices like smartphones, laptops, tablets, smart TVs, IoT devices, and more.

  • High-end Routers: Some high-end consumer or gaming routers can support up to 500 devices or more.

  • Low-end Routers: Older or budget routers may struggle to handle more than 20 to 50 devices at once.

**Conclusion: **Wi-Fi signals themselves travel at nearly the speed of light, but data transfer speeds and latency are much slower due to other network and hardware factors. Your Idea should work with the appropriate software.

1 Like

Please show an example of a WiFi adapter that simultaneously associates with two access points.

Your story about the speed of radio waves is very interesting, but the problem that needs to be addressed is a couple of layers up in the OSI model.

Also, if this was one of your AI/LLM experiments again, please note that they're bloody annoying and you've just demonstrated why. Do what you must, but your credibility here is going down the drain FAST and you're starting to annoy the crap out of people. Choice is yours.

1 Like

Your laptop, phone, etc in your home can all talk to the same router.
Also they sell access points that connect to your existing WiFi and you can use more then one.

OK, one more time: show me an adapter (can be integrated) in a laptop, phone etc. that will associate simultaneously with two or more AP's.

Note the Pi apparently needs to associate with the ESP32's AP while remaining associated with the router. At least that's how I read the quoted requirement.

I have the impression that @gilshultz added some bold font tags to the usual chatbot spew.

If so, I wonder why.

Because I was/am curious myself, I googled quickly and found some clues.

It boils down to "no, it doesn't work", just like I said, but with two notable exceptions:

1: Dual-band (2.4 + 5GHz) adapters may (depending on type) be able to associate with multiple AP's, which is to say ONE AP on 2.4GHz and ONE on 5GHz. networking - Single wifi card, Connect to multiple access points simultaneously - Unix & Linux Stack Exchange Whether the Pi's WiFi adapter used by OP allows this, I don't know. Might be worth looking into.

2: Assuming a single band adapter (or dual band that still allows only operation at either 2.4 or 5), since there's only ONE radio, it needs to be tuned to ONE frequency and this means that associating with two AP's simultaneously is only possible if both AP's are on the same wireless channel (and some driver trickery is still necessary). wireless networking - Can a single Wi-Fi client connect to multiple access points concurrently? - Super User Forget about this if channel hopping comes into play as a means of reducing congestion.

So there are two 'sort of, maybe' loopholes that could be exploited. Neither sounds particularly robust or practical.

Whether it 1 foot away or 500 feet away the time will be the same.
Why do you think that the longer the distance, the longer it will take?

I've observed with ESP platforms they can take really long to associate with an AP if reception is poor. Since there's a relationship (not a perfect one of course) between distance and transmission quality, there's truth to what he says.

Thank you. i missed that, will be careful next time.

Because of the latency. sending / recieving data over wifi just takes longer when you have more latency. i'm aware of speed of light lol.

True but latency has nothing to do with distance. It related to the type of software and hardware you are using for communications.

1 Like

What? so it's the same latency if you have a huge wall between the router and pi? i'm literally having 1ms local ping time on ethernet vs around 20ms on pi w/wi-fi.

The delay is do the the fact that the signal quality is poor and the same data may have to be sent several times before a valid packet is recieved. Having two connections will not solve that problem. A bettor antenna and/or more power would be the fix.

if you do the data transmission between ESP32 and raspberry pi in AP mode you will have less latency or loss packets because you have very short distance between them. other network will be used to display / fetch non time sensitive data.

Which results in a stronger signal and less packet loss. If you increase power or use a directional antenna, you could achieve the same signal quality at a longer distance and thus the same latency.

And i'm looking for solutions where i can't increase power or use a better antenna.

@arteuspw

I would just try creating a wlan1 on the Pi with a USB WiFi dongle and see what happens.

If you did have two Wifi connections and both have the same poor signal quality would that be as good as one good connection?

I guess it would increase the probability of a packet getting through sooner. Never tried it don't know if it makes sense to even try