Long Range WiFi for Remote Sensors and Connectivity
If you need to have network access from sensors which need more than a little bandwidth, cellular can get quite expensive. There are quite a few long-range wireless systems that are targeted towards sensors, however, trade bandwidth for range. If you need to stream video, send pictures, or have a constant stream of data from a range of sensors these wireless links might not be suitable. WiFi has rather limited range by comparison but does have exceptional bandwidth. Luckily, there are a number of options out there for extending network links wireless via WiFi and other technologies intended for use by internet/phone carriers for backhaul and network extension. The WiFi options available work great with sensors, remote IP cameras and the like.
I recently needed to bridge two networks across around 2km of an industrial estate. CAT6 would need multiple switches along the way due to the maximum cable length of 100m (328ft) - which would require power every 100m. This combined with gaps between buildings with a heavy concrete yard and no way to span the gaps (due to tall truck access) really didn’t make this feasible. Fibre was another option, but again, being able to span between buildings made life pretty difficult. After looking at many options, we settled on the Ubiquiti Nanostation M5 (the NanoStation AC is the newly-released update to this hardware), with one at either end of the link. The slightly lower cost LOCO M5 might have done the job, with an advertised range of 5km, however, I was expecting an adverse RF environment due to the number of metal-walled and roofed buildings, so went with the 15km range M5. The other advantage of the full station vs the LOCO is the extra ethernet port on the unit which you can directly plug your sensor/camera/device into - and give power over ethernet if you configure that in software. There are several other brands in the same price range, such as TP Link, however, I’ve had some bad experienced with setting up the same sort of link with consumer brands in the past. Ubiquity build systems primarily intended for use with network carriers so are very robust and have a lot of advanced features. The main downside of Ubiquiti’s offering, in my opinion, is the non-standard 24V Power Over Ethernet which could be an issue if you have 48v POE devices (ie: user error plugging in the wrong cables.) The cost difference between the carrier-grade hardware and consumer grade was negligible.
The documentation for the Ubiquiti operating system (standardized across all their products) is very extensive, and there wasn’t a quickstart guide for creating a simple bridge between two networks - this might be because it’s so easy (when you know how!). So this article is that guide - how to wirelessly connect your two networks for remote sensors or just extending internet out to somewhere remote.
Hardware you will require
Two AirMax units - these are an antenna and network hardware all-in-one. This means no coax to run, all you need to do is run CAT6 to the device. I’m using two NanoStation M5 units, which have an advertised 15km range.
Shielded (FTP or STP grade) CAT6 Outdoor ethernet cable. The outdoor cables come with a UV stable outer sheath and are typically a bit tougher than internal cables. Unless you have a spool of cable lying around, it's cheaper to just buy a cable of the length you need from Amazon or similar. Make sure you check the reviews, as some people sell CAT5 as CAT6. CAT6 has thicker conductors, making it better for Power Over Ethernet even if you don’t need the higher speed.
Ethernet cable from where you have AC power to where your network device/sensor is.
A pole to mount each AirMax unit to, at least 1 inch, but I’m using about 1.5inch poles without trouble mounting them. The NanoStation has a molded pole mount built into the case.
Heavy duty cable ties. The NanoStation came with some cable ties, but I went with ones over twice as wide to be sure the station couldn’t move when it was really windy.
AC power within 60 meters (200ft) of the antenna location, ideally right where your sensor/connection requirement is.
The hardware setup is very easy - plug your network cable into the AirMax unit, plug the other end into the PoE injector. Connect your device to the other port on the PoE injector, and plug the PoE injector in.
Once you have your device configured and tested, mount it on the pole and attach the pole to something to give it some ground clearance. Do this on both ends, and make sure the antennas are pointing at each other.
I suggest doing the config in your office so you can test the link first, in case you have a bad cable or do something with the configuration that needs you to press the reset button on the AirMax unit. I had a bad crimp on the cable I was using, so had to climb up a building again to swap it out.
Configuring the Devices
You will need to configure each device so you can follow these instructions for both of them, one after the other. Don’t plug both of them in at the same time until you have changed the IP Address settings in the NETWORK tab, or you won’t be able to get to either.
The NanoStation starts up with a static IP of 192.168.1.20, so once it is plugged in and has about 30 seconds to boot, you can head to http://192.168.1.20 in your web browser. You’re likely going to receive a “This site is not secure” or similar message from your browser, as the SSL certificate cannot be verified - don’t worry about it. Click Details or Advanced depending on your browser and choose to continue on to the website anyway.
The default username/password are both ‘ubnt’. The first thing you’ll want to do is change the admin password, head to the SYSTEM tab then click the Key icon next to the administrator user name to enter the new password.
While you are on the page, you might want to change the device name so it’s easy to tell the two apart after you have configured the second device. Click Change and then click the Apply button that has appeared on the blue bar.
Next, I’d recommend doing a firmware update. If you’re not connected to the internet, you can download the firmware files from the Ubiquiti website and upload it directly to the device. This can take a little while to complete.
Once that has finished, you can get to configuring the device. First, we’re going to set up the access point end, ie: the end that is on your network/not the remote endpoint. For just one remote device it doesn't really matter which way they are setup, but if you want to have multiple NanoStations pointing at one Access Point for connectivity, you’ll need to know which is which.
The Ubiquiti device you want to point all your ‘remote’ points to is an ‘Access Point’, the others are ‘Stations’. The access point is exactly the same type of system as your WiFi router/access point, and you can pair your phone or other devices to it as well if you want. The station will only connect to an access point - which doesn’t have to be a Ubiquiti device, however, using matching pairs ensures that you have the same transmit and receive range from both ends.
So we set the Wireless Mode to Access Point and the SSID to whatever you want your network to be called.
You will also want to set up the Wireless Security section, select WPA2-AES and enter in your preshared key - make a note of what this is so you can enter it into the Station device when you set it up.
You can now click the Change and then Apply button. You should see the new network visible on your phone/tablet/pc that has WiFi capabilities.
Finally, we need to change the IP address, so head to the NETWORK settings.
Check that the Network Role is set to Bridge, mine came factory set this way.
Then you can change your IP settings. I stuck with a static IP using 192.168.1.30 for the Access point and 192.168.1.21 for the Station end. This way it’s easy to bring another NanoStation online (with it’s default IP of 192.168.1.20) without an IP conflict. It also makes it easy to find the NanoStation without an IP Scanner if you need to change a configuration or check the link in the future! I’d also suggest turning on IPv6.
You can then hit Change and Apply.
Your access point is now setup, now on to the Station end.
Configure the Station
The Station is almost identical, except in the WIRELESS tab we’re using Station rather than Access Point which should come as no surprise.
Rather than entering the SSID, click the Select button instead. This will open a new window that will show you all access points the NanoStation can see.
Don’t be surprised to see access points that are kilometers up the road in the direction the NanoStation is facing. Choose the network that you’ve just set up, it will be an airMAX radio mode and will have a Device Name as you set up before as well. Click the Lock to AP button to select this network.
Once the scan window has closed, you’ll need to enter the same Wireless Security settings you set above for the Access Point.
Click Change and then Apply.
Make your changes to the NETWORK tab, and everything should be all set.
The NanoStation M5 units that I have are highly directional so when setting them up, ensure they are pointing at each other as well as possible. Over my relatively short link, even just a few degrees of angle change offered a slight improvement in the link budget. There is an Align Antenna tool available in the drop-down box under the AirOS logo which can be used to optimize the link - it will even play different beep sounds depending on how good the link is so you can align the antenna without looking at a screen. At the very edge of range for one link, due to some buildings being between the antennas, even changing the antenna angle by just several degrees gave me a 4-5dB gain in link budget which changed the signal from ‘spotty-at-best’ to ‘reliable-but-slow’.
I cable tied my NanoStation to a pole, which I then cable tied to a light pole on a roof. By attaching it to the pole, it saved me needing to get a man rider or scissor lift to get up to the point where the antenna would be, as well as making it very easy to point the antenna in the correct direction with fine adjustments. The other end is cable tied to a pole that is attached to a nearby wall with bolts.
The more height and ground/obstacle clearance you can get, the better your signal will be. If you can, try to get the two antennas at a similar height and ensure you can visually see the other end of the link without trees or buildings in the way for a maximum link budget and data speed.