1 Kilometer Wifi range on the FiPy
This question has been asked before (link) and one of the replies on this question, from 2 years ago, stated that it would be implemented in the future. So I will ask this question again:
On the webpage of the FiPy (link) it states that the WiFi has a maximum range of 1 kilometer. I tested this with line-of-sight between 2 FiPys and I could only reach up to 30 meters using an external WiFi antenna also sold on the Pycom web store. After that I also implemented the lr (long range) WiFi protocol supported by the ESP32 in the FiPy firmware and I still could only achieve up to 71 meters of range. This is clearly not the 1 kilometer range advertised on the FiPy webpage.
So the question is: how was this 1 kilometer achieved? What kind of test setup was used?
The way I initialize my WLAN object for AP mode is:
wlan.init(mode=WLAN.AP, ssid='test', antenna=WLAN.EXT_ANT)
and for station mode is:
And then I used the default socket parameters on both FiPys for creating a socket on which I send 4 bytes every 1 second.
campbellsinclair last edited by
After that I also implemented the lr (long range) WiFi protocol supported by the ESP32 in the FiPy firmware
What changes did you make?
@stefan-1212 If someone stands between the devices, you don't have line-of-sight, so you have to count on a bounce on some nearby surface, which makes the distance longer and the loss higher, so it depends a lot on the environment.
Also note that in ideal conditions your antennas should be placed to avoid having any objects within the Fresnel zone, so even on 70 meters, your antennas should be about 1.5m above ground level (if you have flat ground with nothing on it between the devices).
To get to 1 km you would need to have both antennas 6 m above ground (this is very simplified, as the Fresnel zone is an ellipse).
@jcaron The packet loss simply gets to high and the connection gets unstable to the point that no packet are received when a person stands in between the 2 FiPys.
It could indeed be due to interference as I was testing close to an office building.
1 km probably requires directional antennas (though this may lead to issues with the maximum EIRP allowed), but I expect you should be able to get more than a few dozen meters if you have line-of-sight.
However if you are testing in a dense urban environment you may have issues with interference (the 2.4 GHz band is often very very busy). Do you get any packets through, or none at all, beyond the 30/71 m limit? It would seem strange that it drops off from 100% to nothing at all.
@jcaron Thank you for your response.
Yes, I did connect the antenna to the right connector because I noticed an increase in WiFi range when I switched from the internal WiFi antenna to the external one.
For this test I compiled and flashed the firmware that was available around the 30th of May from the GitHub master branch(link) to the FiPy.
I know this may sound stupid, but just in case, did you connect the antenna to the right connector (the one opposite the LED on the FiPy)?
Also I remember there being issues with the external antenna selection at some point, I don't remember if it was firmware-related, are you using the latest firmware version?