ESP32’s Wi-Fi Range Extended to 10 km with a Directional Antenna

Apr 27, 2017

A German programmer known as “Jeija” has extended the Wi-Fi range of ESP32 to 10 km, without exceeding regulatory limits, using a directional antenna.

The relevant test (for readers within China, please click here) took place in the area around the historical site of Hohenneuffen Castle, which was chosen as an easy-to-target landmark with optimal line of sight between the transmitter and the receiver. Approximately 10 km away from Hohenneuffen Castle, then, ESP32 was connected to an OV2640 module.To decide on the kind of antennas that should be used for this setup, the Friis Equation proved to be particularly helpful:

Pr = Pt Gt Gr (λ/4πR)² 

In general, this equation can be used to estimate the strength of received signs, where lambda (λ) is the wavelength, Pt is the signal power at the transmitter’s end, and Pr is the signal power at the receiver’s end. Gt and Gr are their respective antenna gains. The R in the Friis equation, which is the distance between the two antennas, is of particular significance here.  

In the case of the Hohenneuffen test, this equation initially seemed to suggest that the conditions of the test were rather disadvantageous, given that the R is in the denominator and gets squared. However, even consumer-grade Wi-Fi equipment can be surprisingly effective when it comes to decoding signals with signal strength of less than a femtowatt.  

In any event, the team conducting the test was specifically interested in measuring the change in power levels when increasing the distance between the transmitter and the receiver. According to the Friis equation, then, for every doubling of the distance between the two antennas 6 db of signal strength would be lost. 

To tackle this issue, the team had to take into account another important prerequisite. The law in most countries states that the equivalent isotropically-radiated power (EIRP) must not exceed 20 dBm. 

EIRPdBm  =   Pt,dBm  + Gt,dBi

EIRPdBm ≤ 20 dBm

Thus, adding a better antenna to the ESP32 would not have an overtly positive effect, for it would prompt the team conducting the test to reduce the transmission power. Instead, they opted to attach a high-quality antenna to the receiver.

Other hardware used with the receiver was a USB Wi-Fi adaptor which had a sensitivity of -99 dBm at 1 Mbps, and a 24 dBi directional 2.4 GHz antenna which allowed the team to cover a distance of up to 16 times more than usual. As it turned out, pointing the aerial manually in the general direction of the castle was enough to get decent signal strength. The image quality was probably not the best, but picking up signal from ESP32, from a distance of 10 km, proved to be fairly easy. 

One issue which could cause some degree of puzzlement, though, is the way in which it was possible to only receive data from ESP32 without sending anything back. On this note, Jeija himself commented: “Well, I do have one ‘confession’ to make: I’m technically not abiding by the Wi-Fi standard in this case. Typical Wi-Fi specifies access points and stations that need bidirectional communication. In my mode of operation, however, I’m using the receiver in what is know as ‘promiscuous’ or ‘monitor’ mode, while I’m exploiting functions hidden in the ESP32’s Wi-Fi stack, in order to send arbitrary data”. 

In any case, it is extraordinary how ESP32 can send data over such a long distance. If you want to learn more about the way in which sending arbitrary packets with ESP32 works, you can find more information here.

Share this article
Reuse this content