For this project, a captive portal at a train station, I needed to set up a raspberry pi so it can broadcast a wireless access point over a larger area than it can just with it’s own wireless adapter. It needed to do this without mains power. I couldn’t find anywhere online where this info was all in one place so I’ve collected it together here.
There were three parts to the set up at the train station: The Rasperry Pi, the mast with the Nano station and the solar power source (which consists of a controller, battery, panel and Power over Ethernet (PoE) Injector). I could not have set up the first two things without the help and generosity of Matthias Strubel at Piratebox
I have posted links to the parts on amazon and ebay – I’m not a huge fan of either so if you can find them at an independent retailer please do.
The raspberry pi – can be set up as an access point relatively simply by installing pirate box and having a play with modifying the interface etc. There is lots of documentation about this. However, due to the layout of the station, lots of high stone walls and buildings, the signal required extended using a Ubiquiti Nanostation. To get the pi to broadcasting through the Nanostation connected by ethernet, rather than it’s own wireless adapter, required changing some stuff in the pirate box configurations. For anyone who is interested I followed these instructions. The only difference was that I set
#Network
NET=192.168.77
The Ubiquiti Nano Station extended the signal. I started with an M5, but realised that the 5ghz signal is not as good at getting around and through obstructions as a 2.5ghz signal so changed to a M2. The only thing that really needed sorting was how the ip ranges work. The pi we set up is in the range of 192.168.77 at 1. for configuration the nanostation needs to be in this range too, so should be given a static ip of 192.168.77.2. This is done in the nano stations AirOS configuration – the Ubiquiti docs show you how to access and do this. Then (and this killed me) in order to access the nanostation AirOS page my mac needs to also be in this range so needs a static ip of 192.168.77.3. See below for the screenshots from the nanostation config pages and the network settings on my mac to allow me to access these. These are for the M5 but the M2 is the same.
The solar panel needed four parts to run the pi and nanostation, plus cables. The panel, a 12v battery, the controller and a 24-48v PoE injector. For the uninitiated, the solar panel doesn’t actually power the devices, a battery does. It’s just that the battery gets recharged by the solar panel so, theoretically, wont run down for ages. As this was working in the north of England during March, not a particularly sunny place or time of year, I opted for the biggest solar panel I could afford, a 100w Photonic Universe Monocrystalline Panel (£99). This charged a big 12v leisure battery. The size of these are measured in Amp hours. This one was 110 Ah (£89). Any experts reading would probably laugh out loud at the idea of running a raspberry pi and a small router off such a big battery and panel, but, like I say, I didn’t want to take any chances. The battery and solar panel run into a solar controller that manages the charge between the parts. I used the cheapest one I could find (£13), Sunix branded. Power is supplied to the nanostation via current ‘injected’ into an Ethernet cable (Power over Ethernet or PoE – who knew?). Usually this is done via the mains, so I had to get a PoE injector that could run from the solar controller. I bought one of these (£27).
To complicate things a bit further the garden was in shade a lot of the time so the panel itself had to be pretty much on another platform. Don’t ask. As it’s much sunnier now I’m getting together a version that is a bit more compact – to see how that gets on. It’s all the same principle, just a smaller battery and panel.
ps. Do It Yourself 12v Solar Power by Michel Daniek is a great, really accessible intro.