WIFI antenna

Mistroma or GHA (or anyone else who knows...). Would it be at all possible to post some instructions and recommended kit to set up the antenna/Rasp pi solution? I can be as technical as I need to be, but am certainly not familiar with the right combination of antenna and I've only used a pi once.

Any advice v gratefully received.

Many thanks!
 
Mistroma or GHA (or anyone else who knows...). Would it be at all possible to post some instructions and recommended kit to set up the antenna/Rasp pi solution? I can be as technical as I need to be, but am certainly not familiar with the right combination of antenna and I've only used a pi once.

Any advice v gratefully received.

Many thanks!

Stock was short when I ordered but I managed to get a Pi Zero W a couple of days ago. I managed to lose my only mini-HDMI adapter (probably in Sardinia) and am still waiting for one from eBay.

I did try a headless install (i.e. No monitor) of Openplotter but had problems getting any response from the Pi Zero W. I installed Raspian instead meantime and edited files on the SD card to enable connection to my home Wifi. I have it running now with a few add-ons but haven't had time to install bits needed to make an Access Point.

Now falling behind in list of things to do before leaving UK in 3 weeks for summer on board. I'll document my progress if I get time but it will be on hold for a week or so.

Perhaps GHA might be able to help more quickly as I think that he has already setup a Pi3 for this task.
 
Stock was short when I ordered but I managed to get a Pi Zero W a couple of days ago. I managed to lose my only mini-HDMI adapter (probably in Sardinia) and am still waiting for one from eBay.

I did try a headless install (i.e. No monitor) of Openplotter but had problems getting any response from the Pi Zero W. I installed Raspian instead meantime and edited files on the SD card to enable connection to my home Wifi. I have it running now with a few add-ons but haven't had time to install bits needed to make an Access Point.

Now falling behind in list of things to do before leaving UK in 3 weeks for summer on board. I'll document my progress if I get time but it will be on hold for a week or so.

Perhaps GHA might be able to help more quickly as I think that he has already setup a Pi3 for this task.
No rush at all. Happy to wait for instructions!
 
Mistroma or GHA (or anyone else who knows...). Would it be at all possible to post some instructions and recommended kit to set up the antenna/Rasp pi solution? I can be as technical as I need to be, but am certainly not familiar with the right combination of antenna and I've only used a pi once.
...

Cant help (yet) with the Pi; on kit recommendations for wifi antenna there are two fundamental choices - USB or Power over Ethernet (PoE). I've gone with a PoE solution for a similar set up, WiFi antenna feeding another router. The PoE route gives a more resilient solution to long cables than USB, IMO. There are many examples of low voltage causing problems with demanding loads, like a 4G dongle or a wifi antenna, that are exacerbated by the poor quality and cable size of many USB cables in addition to consideration of cable length. The PoE route also frees you from incompatible drivers but you do need a spare ethernet port configured as a WAN. Examples of PoE WiFi antennae are the Tube 2H or Ubiquiti Bullet.
 
Last edited:
The PoE route also frees you from incompatible drivers but you do need a spare ethernet port configured as a WAN. Examples of PoE WiFi antennae are the Tube 2H or Ubiquiti Bullet.

I looked at the Bullet. It seems to need a mains power supply. Is that correct? (Sorry, but the only pies I understand are the ones that come in tins)
 
I looked at the Bullet. It seems to need a mains power supply. Is that correct? (Sorry, but the only pies I understand are the ones that come in tins)

The spec says up to 24v DC, mine runs happily on the boats 11-15v supplied through something like this, http://www.solwise.co.uk/wireless-poe-injector-epe1212.htm. There are quite a few PoE injectors that come with a mains power supply. If you wanted to be sure you have a DC plug that will fit the injector buy one of those and cut the DC wire as it comes out of the mains box and rewire for a cigarette lighter plug (or however you want to power it).
 
The spec says up to 24v DC, mine runs happily on the boats 11-15v supplied through something like this, http://www.solwise.co.uk/wireless-poe-injector-epe1212.htm. There are quite a few PoE injectors that come with a mains power supply. If you wanted to be sure you have a DC plug that will fit the injector buy one of those and cut the DC wire as it comes out of the mains box and rewire for a cigarette lighter plug (or however you want to power it).

useful, thanks
 
No rush at all. Happy to wait for instructions!

Sorry about the size of this post and the fact that few if any will need the information.

I managed to find a document giving all the information I needed to setup my Raspberry Pi Zero W as a wireless access point. The Pi Zero W is still very new so there are a few changes.

My starting point was a headless Pi Zero W install of latest Raspian Jessie OS. I used a Windows 10 laptop to communicate with the Pi via PuTTY and VNC-Viewer. I'd need to document that process but will only bother if the following instructions are clear enough.

The linked document explains how to setup an Access Point using an older Pi which gets its internet feed via cabled connection, not wireless.
https://cdn-learn.adafruit.com/downloads/pdf/setting-up-a-raspberry-pi-as-a-wifi-access-point.pdf

Setup for Pi Zero W (headless i.e. no monitor needed)

Hardware
1) P Zero W (I had a tiny plastic case so only bought the bare board)

2) 16GB SD Card (Actually 8GB would be OK but little price diff. now)

3) Compatible USB Wireless adapter (You can get a list of compatible units via Google)
e.g. http://www.wirelesshack.org/top-10-wifi-dongles-for-the-raspberry-pi-2016.html

However, you will be trying to get the best range possible and several models listed don't seem particularly suitable. I used an Alfa AWUS036H but these are discontinued (Crucial Wifi might have some left).

4) USB powered hub (You need this as the Pi can't power the wireless adapter)
I bought this unit on eBay for £3.87 and there are plenty of others being advertised. You can pay more by looking for the same kit advertised for Raspberry Pi use. :D:D
http://www.ebay.co.uk/itm/122146752767

5) 2 power supplies (Ordinary Phone/Tablet chargers or single dual output model)
You can actually just use one power supply and feed the Pi from the 2nd USB connector via the powered hub. However, I believe that the power only USB connector has circuitry in it to protect the board from surges. Most people have lots of these chargers lying around and I was just playing safe during setup.


Following instructions in the linked PDF file.

Preparation:
I ignored this as my Pi was up and running already. I didn't use a wired connection or monitor at all. You can always try to follow these instructions for the Pi3 but I haven't even looked at them.

I started at the next section and simply followed instructions. The Pi Zero's built-in wireless is named wlan0, which is the same at the external one in these instructions, so no need to alter anything.
Install software
Set up DHCP server
Set up wlan0 for static IP

Configure Access Point

Change some of the hostapd.conf text on page 18

interface=wlan0
driver=rtl871xdrv <<<<< Alter to read driver=nl80211
ssid=Pi_AP <<<<<<<<<< Change to whatever name you'd like. e.g. Boat_AP
.
.
wpa_passphrase=Raspberry <<<<< Change to any password you prefer

Configure Network Address Translation
Changes here because the link to internet is via an external USB adapter "wlan1" instead of a wired connection "eth0".

Document says "Run the following commands to create the network translation between the ethernet port
eth0 and the wifi port wlan0". But it's wlan1, not eth0.

Replace references to eth0 on page 21

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

Becomes

sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
sudo iptables -A FORWARD -i wlan1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT

Update hostapd (maybe)
Pi Zero W is already OK, so skip ahead to page 23

First test!
Page 23, no changes

Removing WPA-Supplicant
Page 26, ignore this step

Finishing up!
Connect and Test

No changes

OK to ignore remainder of the document
More!
Compiling hostapd
 
...I managed to find a document giving all the information I needed to setup my Raspberry Pi Zero W as a wireless access point. The Pi Zero W is still very new so there are a few changes.
...

Curiosity question; how do you access your Alfa WiFi antenna to set it up for the service youre trying to share ? In outline I understand what the setup youve described does, what I cant see is how you get it to connect to the remote service.
 
Curiosity question; how do you access your Alfa WiFi antenna to set it up for the service youre trying to share ? In outline I understand what the setup youve described does, what I cant see is how you get it to connect to the remote service.

Well spotted. Yes, the internal and external adapters are on different IP ranges.

wlan0 is the internal adapter (one being used as the boat's local Access Point)
wlan1 is the external adapter (one being used to connect to marina's Access Point)

Packets won't just magically find their way from one to t'other.

Network address translation (NAT) is exactly what's needed here. e.g. Remapping one IP address space into another by modifying network address information in IP datagram packet headers.

It is in the post above or the linked document but might not be explained in detail.

The following bits cover the NAT part in relation to creation of the tables, storing the configuration and initializing it again for each restart.

Data for tables
sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
sudo iptables -A FORWARD -i wlan1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT

Enable IP forwarding
The edit to file "etc/sysctl.conf" to uncomment "net.ipv4.ip_forward=1"

Saving the data in a file
The tables are saved to file "/etc/iptables/rules.v4"

Sorting things out at each restart
The document covers installation of a tool "iptables-persistent" which sorts things out at startup. There are some other bits but I'd need to look them up.

I hope that helps.

EDIT: Oooops
Suddenly wondered if you were asking a different, much simpler, question. How do I select the remote AP and connect?

The Pi Zero W setup covered above results in an operational local AP using internal adapter wlan0 after startup. You can connect a laptop or tablet but won't have internet access initially.

You can then connect using VNC Viewer to see the Raspian desktop on laptop (or tablet). Just a matter of pulling down the Wifi icon at the top, selecting the required Access Point for wlan1 and filling in the password. This will then give access to the internet for any devices connected to wlan0 AP.

Raspian will remember the password and try to connect to the selected external AP each time the Pi restarts.
 
Last edited:
....

You can then connect using VNC Viewer to see the Raspian desktop on laptop (or tablet). Just a matter of pulling down the Wifi icon at the top, selecting the required Access Point for wlan1 and filling in the password. This will then give access to the internet for any devices connected to wlan0 AP.

Raspian will remember the password and try to connect to the selected external AP each time the Pi restarts.

That was the question I was trying to ask! So Raspian has a standard built in facility that provides a scan function for the supported wifi drivers, thanks.
 
When I started to read this post I was hoping to find out if I could just buy an aerial to plug into my IPAD to get better reception.
The gobbldegook that follows just shows me that i have absolutely no hope & that whatever i do i am not going to get a decent WIFI connection in most marinas that I go in.
So just getting a weather report will be a lottery at best
Such is life !!!!

But I hasten to add that that is no reflection on previous posters- only my abilities !!!!!
 
Last edited:
When I started to read this post I was hoping to find out if I could just buy an aerial to plug into my IPAD to get better reception.
The gobbldegook that follows just shows me that i have absolutely no hope & that whatever i do i am not going to get a decent WIFI connection in most marinas that I go in.
So just getting a weather report will be a lottery at best
Such is life !!!!

I don't think that I am particularly stupid but this is the conclusion that I have come to as well... Still the upside is that I will HAVE TO go to bars along the way.
 
I don't think that I am particularly stupid but this is the conclusion that I have come to as well... Still the upside is that I will HAVE TO go to bars along the way.

I was worried that it had become very technical after GHA let me know that the Pi Zero W had just been launched. I could have PM'd the information to KAL & GHA but thought there was a slim chance it might help someone else if I posted it here.

The Pi zero W and Alfa AWUS036H are a really cheap option at around £10 + £25 + bits. However, you can buy other kit to achieve the same thing. Unfortunately, it's pretty much a rule that the cost goes up as the user knowledge required goes down.

Post#5 mentioned two options which are a good example of more expensive kit.

The Internet booster and router review appeared in YM June 2016 edition:
YM best value router = Wi-Fi On Board scoring 7/10 ~310 GBP
YM premium product = Hubba X4Go scoring 8/10 ~795 GBP


I tend to only look at the sub £100 market so can't really help in a very detailed fashion. I also avoid Apple kit on grounds of cost versus performance and tweakability.

I can comment on a full kit you could buy from Crucial Wifi for around £100 if it would help. However, I do know some people had problems setting it up. I found it easy but I realise others might have problems.

I can't think of a cheap turnkey solution for long range Wifi to feed multiple devices. I hope that someone else can suggest a simple, cheap answer. It will be a lot simpler if limited to direct connection to a laptop as the only device. There's lots of kit available for that purpose, though probably not for an iPad.

I do still go into bars, not going in isn't an option. :D:D:D However, it's nice to check email or browse back on board. I'm guessing that the best option for less techie types might be to use a SIM instead of spending cash on Wireless kit.
 
Last edited:
... I'm guessing that the best option for less techie types might be to use a SIM instead of spending cash on Wireless kit.

Absolutely (and also true for techie types), the availability of good mobile signals and ever cheaper mobile data means that my WiFi antenna kit has rarely come out of its box in the last 4-5 years. Its a MiFi device that provides an internet connection for most of my use on board these days - and even that isnt foolproof for some users as you usually need to figure out how to change the APN when changing SIM provider, though buying the MIFi with the SIM works around that for most.
 
Problem with sim cards is that if one is cruising france, belgium, holland & channel islands , as I do most years i cannot do this cheaply.
Local sims are not cheap regardless of what people say, especially if one does not actually know what one wants. ( I do not have data on my home mobile have data blocked)
For instance most french telecoms shops will not speak english ( Yes I have tried) & when I tried translation via a friend living in Cherbourg they told me I needed a French residency to get one so that stopped that one.
 
Mistroma or GHA (or anyone else who knows...). Would it be at all possible to post some instructions and recommended kit to set up the antenna/Rasp pi solution? I can be as technical as I need to be, but am certainly not familiar with the right combination of antenna and I've only used a pi once.

Any advice v gratefully received.

Many thanks!
Apologies, finally got round to checking this works on a Pi zero this morning, took maybe half an hour?

Scribbled notes possibly containing errors but here you are anyway ->


[OPENPLOTTER]
#HEADLESS


# uncomment to force screen resolution (only VNC remote desktop)
framebuffer_width=1000
framebuffer_height=800


# uncomment to set WiFi access point. wlan0, wlan1, wlan2 ... default=wlan0
device=wlan0


# uncomment to set WiFi access point. SSID must have a maximum of 32 characters, default=OpenPlotter
ssid=OpenPlotterZero


# uncomment to set WiFi access point. Password must have a minimum of 8 characters, default=12345678
pass=12345678


# uncomment to set WiFi access point. b=IEEE 802.11b, g=IEEE 802.11g, defaul=g
hw_mode=g


# uncomment to set WiFi access point. 1 to 11, default=6
channel=6


# uncomment to set WiFi access point. 1=WPA, 2=WPA2, 3=both, default=2
wpa=2


# uncomment to select device connected to Internet and share connection. wlan0, wlan1, wlan2 ... default=0
#share=0


_____________________________



  • Install a vnc viewer on your laptop - I use one in chrome -> https://chrome.google.com/webstore/search/vnc%20viewer?hl=en

  • Power up the Pi zero and wait a moment for it to boot up - there should now be a wifi access point called OpenPlotterZero (or whatever you called it in the config.txt file) . Connect laptop to this.
  • Open VNC viewer and connect to 10.10.10.1
    The Pi screen should now be visable.
  • Attach 2nd wifi dongle, top right of the scree just to the left of the bluetooth icon, press the icon which looks like a lead plugged into a wall - this should let you log onto any available networks - log onto your favourite.
  • Now edit the config.txt file again, change
    #share=0
    to ->
    share=wlan1
    (Note - you can do this with the SD card in the Pi, in a terminal just type ->
    sudo leafpad /boot/config.txt
    This means... "sudo", like administrator in windows, "leafpad" a text editor already loaded onto the Pi so basically means "Open the file config.txt in /boot/ and let me edit it as I'm a grownup.)
  • Now, reboot and log onto the openplotterzero network again, if all is well then the Pi is acting as a wifi hotspot rebroadcasting the othe wifi network.


This was done on a Pi Zero (no inbuilt wifi) , a nano wifi dongle and a TP link wn722N both plugged into a usb hub into the Pi Zero microUSB socket.
Seems pretty stable, I'm actually surprised the Zero has enough power out of the microUSB to power both dongles - a powered hub would be a wise addition for a real world solution.

And now you have openpotter running, so much more you can do with it - plug in any nmea data an it will broadcast it as NMEA and signalK data over wifi; a few quid you can add thermometers , add a voltmeter chip and tweet the battery voltage, turn on the fridge from the pub.... Loads of options with a few quid on ebay and some wiring. :cool:

(BTW - the opencpn which comes on the openplotter image won't run on a zero - you probably could compile it to work but might be too slow to be any use, Pi3 is what you really need to have a chartplotter running as well. )
 
Mistroma and GHA. Thank you both for the time that you have spent explaining this on here. My post might have sounded petulant and ungrateful. It was not meant that way - it was merely a bit of self analysis...Fortunately there are many on here who know much more than me and are a constant source of assistance. I hope that my post has not offended anyone.
 
Top