319 points · by tucnak · 3y ago · 66 comments
I lead the technical efforts at one of the charities in Ukraine; we're now trying to rebuild connectivity for people in some of the areas where much of the civilian infrastructure was destroyed and Starlink® is not a viable option, or perhaps "not-to-be easily scaled option."
The world of long-range Wi-Fi is a wild one!
We are now trying to evaluate the cost of a point-to-point mesh network using commodity hardware, and so far have only experimented with Raspberry hardware to work the antenna, and some Atheros AR9331-based SoC's. The idea is to make a single device that can act as both a relay station, as well as an actual hotspot, it then can be placed in line-of-sight configuration to potentially cover huge areas (the accepted performance would be anywhere from 0.1-1 Mbit/s point-to-point over anywhere from 5-20km. We are aiming to bring the cost of such configuration down to $100 per unit at least. Hopefully, we also wouldn't need to do so and somebody else could do the whole thing for us at a similar price... Where would you start, i.e. with the vendors, as well as the commodity hardware, firmware that should work best for a setup like this? Bonus points; if it can be somewhat be aware of the current happenstance. In terms of bleed from Electronic warfare deployed by the enemy in Ukraine; it has to work hopefully in adversarial environment!
Best regards, Ilya The Stone Cross Foundation
Most of them are using commodity hardware from Mikrotik, Teltonika and Ubiquiti. Basic setup for a personal node is just an antenna + router. Then they usually have the concept of "supernodes" who are responsible for hooking up multiple personal nodes, and have uni-directional antennas + multiple ones + bigger routers to facilitate the routing.
I'm not sure you'll be able to put together a supernode with decent range for under $100 though, think the cost would be more than that, but I would be happy to be proven wrong.
In terms of firmware, I've almost exclusively seen OpenWRT being used (and the rest running default Mikrotik/Ubiquiti firmware), with various self-made patches done to it before installing it on the hardware.
Anecdote: A while back I was moving houses ~1km with trees obstructing line-of-sight and without connectivity at the new house for the first couple of months. I had to move but could keep the old place connected. I jerry-rigged Ubiqity PtPs that I had inherited from a friend at each end. Packets started dropping on rainy days but it was working surprisingly well.
Not necessarily a fan of Ubiquity and their closed ecosystem per se, and it might not be the best pick for a project like OPs if there are options.
(Throwaway because these hotspots were brought from abroad..)
They build and maintain long link wifi connectivity for villages in India.
They take and contribute nothing back. just a base to get up and running quick in their startup days.
Also most of their own pieces is just a awful api/shell that tries very hard to simulate the worse of cisco ios shell.
everything else (speed, uptime, ram/cpu power, beanforming magic, etc) you are better off with linksys devices when using open source drivers.
Use the router's switch ports to connect them with each other, and use one local router with stock antennas pointing straight up to serve local clients and mesh with possible nearby mesh nodes.
The electronic warfare resilience is going to involve hacking the collision avoidance techniques to be sufficiently less aggressive, and likely to get Freifunk to use encryption for the mesh links. If necessary, just set up P2P links with per-link encryption. Routing-table-affecting nodes in a mesh sadly need some inherent trust to be performant in the non-adversarial case, or at least, no one seems to have tackled that possible issue yet (to the point where you could just compile existing software for the router at hand and get something working by the end of next week).
Beware of some of the possible downsides: the default is for Freifunk nodes to be placed on a map and I'm not sure if this is a requirement or not but it might provide easy targeting information for the Russians. This will have to be taken into account, and if possible to be done without.
Also, Freifunk nodes are open enough that behind-the-lines enemy could use it to phone home without a trace, so likely you'll need some extra FOF kind of authentication mechanism.
People more versed at this than I am will most likely have a whole bunch of other concerns about setting up a system like this.
Finally, long haul is all about antenna tech, I would suggest to enlist the help of as many local HAMs as you can find.
An upside of highly directive, P2P links is that they can provide some protection against EW, simply by nature of having a constrained field of view. Also I'll note most consumer devices (laptops, cell phones) have pretty bad antennas, they're assuming you have a router right nearby. You might get much better coverage if you're also able to provide the user with a simple USB dongle that can attach to an external antenna (e.g. a 10dBi yagi-uda)
If there is need for any input on the antennas side, I'm more than happy to help (EM PhD, design antennas for a living). 2.4GHz is relatively forgiving, you can literally hand make antennas, with some attention to detail. If you have access to shipping (I really don't know the situation) they can be mass produced on PCB.
Gain seems to max out around 15 dBd, in that case, for a 90cm long antenna of ~5cm diameter. The beauty of circular polarization there is the independence of mounting angles/matching rotations, but I guess a small forest of H/V dual-polarization Yagi's (or, for routers with 3X3 MIMO, 3 equally-spaced polarization directions, assuming that works without breaking the workings of the Yagi) might be easier due to the potential for a solid metal center pillar to hold the elements.
A forest instead of a lone Yagi would be to increase gain more efficiently than by merely elongating a single Yagi, as the latter would quickly cause mechanical issues in wind.
I'm imagining access to an improvised spot welder to attach lengths of copper wire to a steel support pillar, then finished with some paint as an anti-corrosion coating. Or some more low-tech attachment process, like a styrofoam pillar with the wires pierced through in the right spots, mounted either indoors or in a drain pipe or such for weather protection.
Can you confirm that these approaches are appropriate for the situation/call some out that are not appropriate?
Tactical radios are specially designed for the problem. Eg using spread spectrum approaches, and plain not transmitting most of the time and only by the choice of the operator.
It's possible that open source SDR could be applied, but I guess that the Ukrainian side have been supplied with military radios by their allies.
Ideally, we'd have Wi-Fi NAN (Wi-Fi Aware/Neighbour Awareness Network) on all devices (including routers, smartphones), discovering devices close by and allowing Yggdrasil to work on top. That's very recent though. I blame Apple keeping AWDL proprietary.
Some of that can probably be approached by connecting handsets to multiple networks at once (the chips usually support it, but I don't know about the OS).
In the end, in this case it's probably better to ask a local ISP for cooperation (ask for a part of their spectrum, and put 4G antennaes and local 4G to Wi-Fi APs). It can still be meshed together.
(I have no affiliation with UBNT, I just use their stuff at home)
Honestly, as you are in Europe, you should look into the European Hamnet. See https://hamnet.eu/site/community.html and https://www.tapr.org/pdf/DCC2014-TheEuropeanHAMNET-DG8NGN.pd.... They aren't using WiFi, but the goal is the same.
Both of these require licensed amateur radio operators to use normally. (Maybe wartime is a different matter). I do believe I heard that Russia took radio transceivers away from operators in the Ukraine, but don't know much about it.
https://eindhoven.space/2022/10/08/ham-radio-usage-in-ukrain...
Regarding custom firmware: yeah, but it's really openwrt with some CGI scripts. If you're not trying to specifically join their preexisting networks, you can accomplish everything it does off of vanilla openwrt with not much effort. I think understanding what's actually going on under the hood in networking terms is valuable enough to skip the preconfiguration, though I guess that depends on the exact deployment case. If this isn't intended to be used militarily in any way and is just putting up infra in rear areas, maybe that doesn't matter.
This post ended up a bit more negative than I intended, so I should say that I have successfully used AREDN (or similarly configured openwrt) on Ubiquiti APs with yagis to do more or less what the OP is asking for, and it works pretty well. This is overall a good suggestion.
Also, keep an eye on different editions, as I believe last one is a little less tech focused and more into how to run a community project, both sets of knowledge are highly important but second edition might be outdated in regards to software availability in OpenWRT and Linux in general.
The only thing that matters for 2.4/5 GHz wifi long range is height above surrounding terrain to get line of sight. The highest technology is literally the technology to get the antennas highest; ie poles, towers, tops of tall buildings, actively lifted (and powered) drone platforms for antennas, sides of mountains, etc.
For long distances, you will probably need to "scavenge" bigger dishes (1m diameter) from other sources to be within budget. IIRC, any microwave dish will be useable, including satellite tv dishes, if you use a suitable transceiver-antenna "head" (DIY-able) and align it. In addition, tv dishes on buildings look inconspicuous.
Ideally, the wifi radio should be placed in the focal point of the dish and directed such that the reflected signal points to the horizon. But most TV dishes are not symmetric to allow them to be mounted vertically (and avoid collecting snow) while pointing into the sky.
You might need to read up and figure all this out.
It works, so, so much better with actual towers.
1.) Raspberry PI Zero antenna mod: https://www.youtube.com/watch?v=IZqaKZLIqFg
2.) Cheap DIY Antennas: https://www.youtube.com/watch?v=TPt-sw3kvw0
Be sure to check out this guys whole youtube channel (@andrewmcneil), he is awesome and its about DIY antennas (from cheap to expensive with real in depth tests)
3.) There also is a ready to use but expensive product from Ubiquity called "Air Fiber" for high performance connections over long range. See LTT for more details: https://www.youtube.com/watch?v=e9P_R-ApD-g
Some general hints:
- Reliability and a stable connection are probably even more important than just range, so reliabale hardware and a stable drivers are mandatory
- That's why I would not order too many devices at once but just check out, how they work (especially TPLink is known to have problems here, although their devices are best for the buck)
- If you could purchase devices, I would probably take a look at the recommended devices section on OpenWRT (https://openwrt.org/toh/recommended_routers) or try to buy bigger batches of used devices for real cheap money
- In the near future I would probably check out the GL.iNet GL-MT1300, which is cheap and small or maybe TPLink Archer A10, both with mediatek chips
Slot antennas are something flat and high-gain which might be easiest to deploy, once you get constructing them figured out.
I also built my own 3G range extender with an almost identical off-the-shelf $50 Yagi antenna at a country cottage (2.2 and 2.4GHz are close enough for an antenna to carry both), so I've spent a while pondering those kinds of scenarios.
But addressing your points directly, I would look for OpenWRT-compatible devices with external antenna ports and the ability to do both 2.4 and 5GHz - and most likely try to use 2.4 for long-distance point-to-point links with Yagi antennas.
Hitting the bitrates you mention seems perfectly doable, although I must point out that the antennas are conspicuous (about the length of two Pringles cans). The challenge I found is having router hardware that can pin SSIDs to separate radios, because most of the modern stuff aims for diversity and prioritizes throughput.
According to https://www.tomshardware.com/news/raspberry-pi-adds-100000-u..., second half of 2023 is when RasPi supply should be restored to pre-pandemic levels.
Number of online nodes per network as of today:
- NYC Mesh: 1281 (https://www.nycmesh.net/map)
- Freifunk: 42,524 (https://www.freifunk-karte.de/)
- Guifi: 37,721 (https://guifi.net/en/node/3671/view/nodes)
I don’t recall bitrates. The area was well over 500 km^2
project is here: telescopearray.org
Even if you don't buy from them it can give you an idea of what exists, some price ranges and availability. Some outdoor devices (small router + integrated antena + pole mount + weather proof) can be cheaper than a raspberry pi alone, example the TPLink CPE605 cost ~40€ without taxes.
Look for hardware that is supported by OpenWRT, so that all community firmware should work.
Ubiquity UAP AC LR also has long-range access points with up to 183 meters range for ~$109 USD: https://store.ui.com/products/unifi-ac-lr
If you are more ambitious, you can deploy an OpenWRT BATMAN-based mesh network: https://openwrt.org/docs/guide-user/network/wifi/mesh/batman
I recommend using something that supports OpenWRT out of the box, such as GL-iNet Mango Mini Router GL-MT300N-V2 (~$20 USD refurbished) https://openwrt.org/toh/gl.inet/gl-mt300n_v2 https://store.gl-inet.com/products/certified-refurbished-pro...
Please only use this information for humanitarian/civilian purposes and not for military objectives. Thank you!
Sounds like WiFi HaLow could be an option here
https://www.cnx-software.com/2021/12/21/wifi-halow-gateway-k...
The Internet Society have some resources on community networks here: https://www.internetsociety.org/action-plan/2022/community-n...
And then there's the Things Network, which operates over the LoRaWAN (Long Range Wide Area Network) protocol: https://www.thethingsnetwork.org/
Lastly (and potentially not super relevant), there was a talk at LibrePlanet 2021 about efforts to set up community networks in Turkey (although more from the perspective of ensuring user freedom): https://media.libreplanet.org/u/libreplanet/m/freeing-networ...
I think 20km point to point is not to be sniffed at if my back of a napkin calculations are correct (would love someone more knowledgeable to correct!)
Firstly on LOS - that’s like 15m+ masts at each end of the link (assuming perfect LOS path with no clutter like trees or buildings).
Then on free space path loss you’d be looking to overcome around 100db+ of path loss i think assuming 2.4ghz ISM band and perfect atmospheric conditions.
10dbi / 12 dbd log periodics for 2.4ghz are available off the shelf and are very reasonable to use (not too big, not too much wind loading at 15m elevation, weatherproof etc.)
Recieve sensitivity should be around -110dbm maybe? Assuming fairly rural conditions so that you’re not also dealing with a man made noise floor (and also benefitting from a very directional antenna to miss most noise too).
You’d need a 1 watt power amplifier minimum, again that’s more or less off the shelf but there’s restrictions globally on use and that may make sourcing harder.
The limiting factor isn’t the AP, in short.
Now, running LTE microcells - that’s a viable option in a desperate environment, and one that can be done with SDR. Only problem is then getting consumer equipment to authenticate with it. This is possible, either with eSims or with cooperation from local regulatory authorities - but not altogether trivial.
This is borne off the back of experience - I tried to do long range Wi-Fi, but for a usable experience from consumer gear (a phone), 2.5km was about as far as I could get with a 1 watt amp on a dipole.
Got much further with a yagi, but funkiness emerges beyond about 4km on 802.12g. You’d get further on b but your rates will be pants.
I would do LTE for this application. My solution where I am is a mast that receives LTE atop a hill and has four yagis doing 802.11g to receiver nodes, which each comprise a repeater with a yagi pointed at the mast, and a dipole omni to get a solid 500m radius around each repeater. I’ve covered 15ha of tortured terrain with Wi-Fi with this - and come to think of it, the highly directional signals could provide hardness against interference and would greatly mitigate interception issues.
Oh, and I’d you’re doing yagis, you need real ones, not the fake crap you’ll usually find for sale. The real deal is about 70cm long for 2.4ghz and will have tapered vanes to the point. Commercial models come in a plastic can.
This:
>10dbi / 12 dbd log periodics for 2.4ghz are available off the shelf [I assume this is actually talking about 12dBi and 10dBd which are equivalent]
combined with this:
>You’d need a 1 watt power amplifier minimum
Is very illegal in the US and probably most other places in the world. There is a hard 1W transmit power limit and a 6dBi antenna gain limit. Fixed point to point links can use higher gain antennas in combination with lower transmit power, but there is no situation in which 1W transmit power + 12dBi gain is legal.
A NanoVNA - (less than $200 on Amazon/Ebay) This little tool will help you understand how transmission lines work, along with antennas, matching, etc. You can use them to test antenna matching, and gain, etc. If you want to roll your own high-gain antennas, etc.. this is an amazing piece of kit to have at a low price.
Not as directly applicable, but effectively free. GNU Radio -- This will give you a feel for signal processing, and how RF stuff works internally... it works with audio I/O so you can experiment for effectively $0. If you get to the point where you understand I/Q signals and "negative" frequencies, a lot of things become clearer.
Existing point-to-point solutions would be even better but I am sure you (some other comments also point to this direction).
I also want to add that at low datarates like 0.1Mbps, you probably can't just bridge it to the internet and expect it to work well. You'll want to be careful about who and what access is allowed. 0.1Mbps is plenty for relaying messages point-to-point for multiple users, but even one user searching google or using slack will saturate it. A few users trying to load gmail will probably not work at all.
Lots of great ideas in there - even if you decide to not use their gear. They pioneered repurposing Intels otherwise failed wimax for long range links in lue of microwave. The other nice thing about Ubiquiti is you get really nice management platforms for "free" - included with the cost of the equipment. There is much to be said for being able to see all your radios and links within a nice, convenient dashboard.
Edit: I see now you mention the bandwidth difference and saying to use LoRa just for emergency broadcasts, that'd make sense.
BTW I'm in Kiev, first time hear about The Stone Cross Foundation. Could You tell more about it?
Happy to get in touch and tell all! https://keys.openpgp.org/search?q=ilya%40hrest.org
I'd rather have a way to do long range data directly between two phones.
A cantenna is cheap and can easily bridge around 2-5km if there's not much noise on the spectrum.
If you want to create a meshnet, you should look for OpenWRT compatible hardware in terms of routers and clients.
There's lots of ralink or RTL based USB wifi dongles that also have support for gnuradio so you could also switch frequency bandwidths if they got a tuner on them.
An easy and stealthy low-bandwidth meshnet can easily be created with old DVB-T usb sticks because the RTLSDR allows flexible channel hopping and key rotations, if necessary.
There's also lots of RTLSDR projects that use the LoRa spectrums, and they might work if you are looking for a text based communications network. That's why I mentioned it. There's also the OsmocomBB project which also has support for RTLSDR in case you want to create your own DIY GSM network with IMSI catchers and the like :)
Wi-Fi usually has the problem that the 2.4Ghz and 5Ghz frequencies are overloaded with noise, so they are hard to tweak into a long range mesh network.
For short range coverage you may want to consider repurposing commercial hardware (routers, access points etc) that supports OpenWRT, those should be easier to find, also used, and way cheaper than specialized hardware. https://openwrt.org/toh/start
Long range communications will require directional antennas, which implies mostly fixed and point to point. Also to achieve line of sight and avoid the fresnel zone obstruction the antennas need to be mounted higher than the highest obstacle in between. Solar power is viable, but battery backup should also be provided. Antenna masts and solar panels would make them visible from distance, and of course although the traffic can be encrypted, they scream all around the air that there is a station operating there; hidden SSID does not make their operation invisible to a spectrum analyzer or any specialized electronic warfare gear - of which the enemy has plenty - that should be taken into consideration.
Anyway, Mikrotik makes some interesting powerful wireless routers like the Metal 52 ac which can operate at over 1W both on 2.4GHz and 5GHz. They're conveniently bullet-shaped and can be supplied by PoE, so that you can connect them just behind the antenna (either directional or omni) to achieve minimum losses. I've bought some good WiFi hardware, cables and antennas at netek.eu (now wifimarket.eu) and batna24.com. Mikrotik is Latvian, Batna and Wifimarket are in Poland, you shouldn't have problems shopping from them. Wifimarket today seems to have a very reduced product line compared to a few years ago when I shopped there. They had really good antennas and cheap really good quality parts to build antennas (dipoles to make patch antennas by adding a reflector etc.) that would come very handy on the field. You may ask them if they still sell them elsewhere. (btw. no affiliation here, just a happy customer)
Think about using fiber optics at least for longer fixed paths: a couple routers with SFP can provide a gigabit connection over several kilometers, and the fiber cable can be easily buried so that it's not easy to notice and doesn't hint the enemy that a transmitter is operating nearby like WiFi would certainly do.
For very slow and long distance communication, namely text messages, LoRa can be an option to which encryption can be added externally. All other considerations about radio transmission remain valid for LoRa too, however. You may find these links interesting:
https://disaster.radio/ https://meshtastic.org/
Also worth of mentioning for different purposes: https://github.com/ExpressLRS/ExpressLRS
Best luck with everything. слава україні!