ESP32 WiFi Hits 10km With A Little Help

[Jeija] was playing with some ESP32s and in true hacker fashion, he wondered how far he could pull them apart and still get data flowing. His video answer to that question covers the Friis equation and has a lot of good examples of using the equation, decibels, and even a practical example that covers about 10km. You can see the video below.

Of course, to get that kind of range you need a directional antenna. To avoid violating regulations that control transmit power, he’s using the antenna on the receiving end. That also means he had to hack the ESP32 WiFi stack to make the device listen only on one side. The hack involves putting the device in promiscuous mode and only monitoring the signals being sent. You can find the code involved on GitHub (complete with a rickrolling application).

Of course, antennas are nothing new–look at all the Pringle can antennas we’ve seen in the past. However, the use of a long range receive-only module is interesting and we can see this technique having applications to remote drone video or telemetry and — of course — wardriving. If you don’t have a big boss antenna lying around, you might try some duct tape. If you want a more detailed refresher on decibels, we did that last month.

32 thoughts on “ESP32 WiFi Hits 10km With A Little Help

    1. What’s the useful range without a special antenna? By useful I mean reliable, not necessarily fast. I need to send short asynchronous messages, maybe MQTT. I don’t need fast, I need it to work well.

  1. Or he could get a ham license and go wild on 2390-2450mhz where he would have tx privilege even with higher tx power. The license is easy and opens up plenty of opportunities for experimentation (legally even). I know I’ve had fun with mine so far. It even caused me to be a bit “old school” and pickup a HF radio. Now I just need to finish setting it all up with the PC and building another antenna for the 2m/70cm radio I just picked up (partially for playing with satellites).

    1. As a ham myself (US Extra, Swiss HB9), I can see how using the amateur bands may be problematic: one would need to periodically identify the transmitter and ensure that no encrypted communications take place. Hardly insurmountable obstacles, but still a bit of a pain compared to just using a bigger antenna for the receiver and using (mostly) standard WiFi.

      That said, HF stuff is fun. I’m not so keen on voice modes, but digital modes like JT65, JT9, and WSPR are both amazing and near-magical. I made a contact from central Switzerland to Tierra Del Fuego in southern Argentina using 10W and a random-wire antenna tied to a rock and tossed out of my apartment window using JT9. Incredible.

        1. What about public key signing? The content of messages sent would still be in the clear and anyone can verify if the message is authentic by using the public key. But a hacker, without access to the private key, would not be able to generate fake messages that pass the test.

          1. Shakespereian encryption. Encrypt your true message and convert it into ascii format, take one of his plays, use sonnets to represent individual ascii characters, convert asciis to sonnets, transmit the various sonnets, receiver reverses the process. Sonnet to ascii to decrypted file. To any listener it’s just poetry. Slower though. Maybe just use stanzas.

      1. I used to help in a West Australian wireless freenet and we were regularly achieving up to 10 to 15km links using regular 30dBm transmitters and 24dBi antennas at each end. With clear line of sight and low noise floor our record was about 18 to 20km.

  2. I wonder if anyone had problems because he used high-gain antenna with his WiFi module. My former ISP used USB WiFi modems with custom antennas to achieve line of sight range of 3-5km. They had no problems even if they exceeded ERP limits. They were closed when police discovered they were a money laundering firm belonging to local mafia…

    1. I know of a bunch of people doing long range WiFi (in the time of 11Mbit max., mid to end 1990ies) commercially as some sort of ISP up to several 10s of km, I think up to 70km. They used satellite dishes (mounted upside down) and some of them were on a big observation tower (also used for other radio services). Of course they had some modules “for high gain antenna operation” (with reduced transmit power), but preferred to use the normal ones as they were cheaper (and had more power :-) ). They did not really close but lost their business case when normal broadband access got cheaper and cheaper.

  3. Not a suprise. get a set of 10 foot dishes and mount the devices at the focal point and get even higher gain. BUT you have to keep objects out of the Fresnel zone to get the full gain.

  4. The distance isnt that much, although only having a decent gain antenna on RX makes it much harder.
    I used to work in the region and it was more interesting to see the area… The grub at the Neuffen is good ;-)

  5. I’m a bit confused because the USA FCC limits are 1 Watt for the power and 6dB for the antenna. Here a 24dB antenna is used on either end, producing 16 times the distance of two legal antennas. If this system were done legally in the US the distance would be closer to about 10/16 km which is like about 0.385 km! Or am I missing something?

  6. As a follow up to my previous comment, -6dB antenna gain is half the distance, right? so 24dB – 3*6dB = 6dB, so it’s 1/8 the distance per antenna, or 1/64 the total distance with USA legal antennas? 10/64 km is about 156 meters. Is that closer to the right answer? It’s been a loooong time since college telecom class! :)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.